Skip to content
Browse files

Added ptk_server plus support

There needs to be a server for handling of project files to allow for multiple
process access. This server also conviently handles assignment of camera
numbers.
  • Loading branch information...
1 parent 6e12dcf commit 2b27f87899a6bf430111d67a0516ca647cd948c1 Zack Moratto committed Apr 25, 2010
View
7 .gitignore
@@ -13,6 +13,7 @@
*.DS_Store
*.pb.cc
*.pb.h
+*#
data/apollo
data/mi-stereo
@@ -69,6 +70,7 @@ src/asp/Tools/dem_profile
src/asp/Tools/geodiff
src/asp/Tools/rmax2cahvor
src/asp/Tools/rmax_adjust
+src/asp/Tools/hsv_merge
# Photometry Toolkit
src/asp/PhotometryTK/phodrg2plate
@@ -79,13 +81,18 @@ src/asp/PhotometryTK/phoitdem
src/asp/PhotometryTK/phoiterror
src/asp/PhotometryTK/phoitreflect
src/asp/PhotometryTK/phoittime
+src/asp/PhotometryTK/ptk_server
+src/asp/PhotometryTK/tests/TestProjectFileIO
+src/asp/PhotometryTK/tests/TestProjectService
+src/asp/PhotometryTK/tests/*.ptk*
# Doc
docs/book/*aux
docs/book/*log
docs/book/*out
docs/book/*pdf
docs/book/*toc
+docs/book/graph/*pdf
docs/photometry/*aux
docs/photometry/*log
docs/photometry/*out
View
23 configure.ac
@@ -302,13 +302,34 @@ dnl BLAS symbols in the event that we need them.
AX_PKG(ISIS3RDPARTY, [SUPERLU LAPACK GSL QWT GEOS SPICE XERCESC], [])
AX_PKG(ISIS, [ISIS3RDPARTY QT], [-lisis3], [SpecialPixel.h])
+AX_PKG(RABBITMQ_C, [], [-lrabbitmq], [stdlib.h stdint.h amqp.h])
AX_PKG(PROTOBUF, [PTHREADS], [-lprotobuf], [google/protobuf/stubs/common.h])
+dnl check for recent rabbitmq; this can go away soon, it's just to prevent a
+dnl flag-day upgrade
+if test x"$HAVE_PKG_RABBITMQ_C" = "xyes"; then
+ AS_VAR_PUSHDEF([ac_var], rabbitmq_void_rpc_reply)dnl
+ AC_COMPILE_IFELSE(AC_LANG_PROGRAM([[
+ #include <stdlib.h>
+ #include <stdint.h>
+ #include <amqp.h>
+ ]], [[
+ amqp_get_rpc_reply();
+ ]]), [AS_VAR_SET(ac_var,yes)], [AS_VAR_SET(ac_var,no)])
+
+ AS_IF([test x"$ac_var" = "xyes"],
+ [AC_DEFINE([RABBITMQ_VOID_RPC_REPLY], [1], [Is amqp_get_rpc_reply void?])],
+ [AC_DEFINE([RABBITMQ_VOID_RPC_REPLY], [0], [Is amqp_get_rpc_reply void?])])
+ AS_VAR_POPDEF([ac_var])dnl
+fi
+
# These are here (instead of inside the PKG macro where they belong)
# for backwards compatability with older versions of automake.
AM_CONDITIONAL(HAVE_PKG_SPICE, [test "$HAVE_PKG_SPICE" = "yes"])
AM_CONDITIONAL(HAVE_PKG_ISIS, [test "$HAVE_PKG_ISIS" = "yes"])
AM_CONDITIONAL(HAVE_PKG_OPENSCENEGRAPH, [test "$HAVE_PKG_OPENSCENEGRAPH" = "yes"])
+AM_CONDITIONAL(HAVE_PKG_RABBITMQ_C, [test "$HAVE_PKG_RABBITMQ_C" = "yes"])
+AM_CONDITIONAL(HAVE_PKG_PROTOBUF, [test "$HAVE_PKG_PROTOBUF" = "yes"])
##################################################
# module definitions
@@ -345,7 +366,7 @@ AX_APP(PLATEORTHOPROJECT,[src/asp/Tools], no, [SESSIONS ISISIO VW_PLATE])
AX_APP(HSVMERGE, [src/asp/Tools], yes, [VW_CARTOGRAPHY VW])
# Toolkits (like module, but doesn't build a library)
-AX_MODULE(PHOTOMETRYTK, [src/asp/PhotometryTK], [libaspPhotometryTK.la], no, [PROTOBUF VW_PLATE], [BOOST])
+AX_MODULE(PHOTOMETRYTK, [src/asp/PhotometryTK], [libaspPhotometryTK.la], no, [RABBITMQ_C PROTOBUF VW_PLATE], [BOOST])
# These are here (instead of inside the APP macro where they belong)
# for backwards compatability with older versions of automake.
View
16 src/asp/PhotometryTK/Makefile.am
@@ -17,8 +17,11 @@ protocol_sources = ProjectFile.pb.cc
BUILT_SOURCES = $(protocol_sources)
nodist_include_HEADERS = $(protocol_headers)
-include_HEADERS = ProjectFileIO.h
-libaspPhotometryTK_la_SOURCES = $(protocol_sources)
+include_HEADERS = ProjectFileIO.h ProjectService.h
+libaspPhotometryTK_la_SOURCES = $(protocol_sources) ProjectService.cc
+
+libaspPhotometryTK_la_LIBADD = @MODULE_PHOTOMETRYTK_LIBS@
+lib_LTLIBRARIES = libaspPhotometryTK.la
if ENABLE_EXCEPTIONS
@@ -46,14 +49,15 @@ phoitreflect_LDADD = @MODULE_PHOTOMETRYTK_LIBS@
phoittime_SOURCES = phoittime.cc
phoittime_LDADD = @MODULE_PHOTOMETRYTK_LIBS@
+ptk_server_SOURCES = ptk_server.cc
+ptk_server_LDADD = @MODULE_PHOTOMETRYTK_LIBS@ libaspPhotometryTK.la
+
bin_PROGRAMS = phodrg2plate phoinitalbedo phoinitfile phoitalbedo \
- phoitdem phoiterror phoitreflect phoittime
+ phoitdem phoiterror phoitreflect phoittime \
+ ptk_server
endif
-libaspPhotometryTK_la_LIBADD = @MODULE_PHOTOMETRYTK_LIBS@
-
-lib_LTLIBRARIES = libaspPhotometryTK.la
endif
View
53 src/asp/PhotometryTK/ProjectFile.proto
@@ -26,4 +26,57 @@ message CameraMeta {
optional int32 base_transaction_id = 4;
repeated double sun_vec = 5;
repeated double cam_vec = 6;
+}
+
+// Project File Service
+// ------------------------------------------------
+
+message ProjectOpenRequest {
+ required string name = 1;
+}
+message ProjectOpenReply {
+ required ProjectMeta meta = 1;
+ required int32 project_id = 2;
+}
+
+
+message CameraCreateRequest {
+ required int32 project_id = 1;
+ required CameraMeta meta = 2;
+}
+message CameraCreateReply {
+ required int32 project_id = 1; // echo if success
+ required int32 camera_id = 2; // assigns number
+}
+
+
+message CameraReadRequest {
+ required int32 project_id = 1;
+ required int32 camera_id = 2;
+}
+message CameraReadReply {
+ required int32 project_id = 1; // echo if success
+ required int32 camera_id = 2; // echo if success
+ required CameraMeta meta = 3;
+}
+
+
+message CameraWriteRequest {
+ required int32 project_id = 1;
+ required int32 camera_id = 2;
+ required CameraMeta meta = 3;
+}
+message CameraWriteReply {
+ required int32 project_id = 1; // echo if success
+ required int32 camera_id = 2; // echo if success
+}
+
+service ProjectService {
+ // Project start
+ rpc OpenRequest (ProjectOpenRequest) returns (ProjectOpenReply);
+
+ // Camera Interface
+ rpc CameraCreate (CameraCreateRequest) returns (CameraCreateReply);
+ rpc CameraRead (CameraReadRequest) returns (CameraReadReply);
+ rpc CameraWrite (CameraWriteRequest) returns (CameraWriteReply);
}
View
10 src/asp/PhotometryTK/ProjectFileIO.h
@@ -8,6 +8,7 @@
#define __PROJECT_FILE_IO_H__
#include <vw/Core/FundamentalTypes.h>
+#include <vw/Core/Exception.h>
#include <asp/PhotometryTK/ProjectFile.pb.h>
#include <algorithm>
#include <fstream>
@@ -50,7 +51,12 @@ namespace pho {
void write_pho_project( std::string const& file,
ProjectMeta const& prj,
IterT cam_start, IterT cam_end ) {
- std::fstream output( file.c_str(), std::ios::out | std::ios::trunc | std::ios::binary );
+ // Forcing file extension type
+ std::string filename = file.substr(0,file.rfind("."));
+ filename += ".ptk";
+
+ std::fstream output( filename.c_str(),
+ std::ios::out | std::ios::trunc | std::ios::binary );
output << vw::int32( prj.ByteSize() );
prj.SerializeToOstream(&output);
@@ -66,6 +72,8 @@ namespace pho {
ContainerT& cams ) {
cams.clear(); prj.Clear();
std::fstream input( file.c_str(), std::ios::in | std::ios::binary );
+ if ( !input )
+ vw::vw_throw( vw::IOErr() << "Unable to open \"" << file << "\"." );
{
vw::int32 bytes;
input >> bytes;
View
170 src/asp/PhotometryTK/ProjectService.cc
@@ -0,0 +1,170 @@
+#include <vw/Core/Log.h>
+#include <vw/Core/Exception.h>
+#include <asp/PhotometryTK/ProjectService.h>
+#include <asp/PhotometryTK/ProjectFileIO.h>
+using namespace vw;
+using namespace asp::pho;
+
+#include <boost/regex.hpp>
+#include <boost/filesystem.hpp>
+namespace fs = boost::filesystem;
+
+// Search Function
+std::vector<std::string> inline
+glob_ptk_filenames( std::string const& root_directory ) {
+ std::vector<std::string> result;
+
+ if ( !fs::exists( root_directory ) )
+ vw_throw( IOErr() << "Could not access the root directory: \"" <<
+ root_directory << "\"" );
+
+ boost::regex re;
+ re.assign(".*\\.ptk", boost::regex_constants::icase);
+
+ fs::directory_iterator end_itr; // eof
+
+ for ( fs::directory_iterator itr( root_directory ); itr != end_itr; ++itr ) {
+ if (boost::regex_match(itr->leaf(), re))
+ result.push_back(itr->leaf());
+ }
+
+ return result;
+}
+
+// Range checking macros
+#define CHECK_PROJECT_RANGE() \
+ if ( request->project_id() < 0 || \
+ request->project_id() >= int32(m_project_metas.size()) ) { \
+ response->set_project_id( -1 ); \
+ response->set_camera_id( -1 ); \
+ done->Run(); \
+ return; \
+ }
+
+
+#define CHECK_CAMERA_RANGE() \
+ if ( request->camera_id() < 0 || \
+ request->camera_id() >= \
+ int32(m_camera_metas[ request->project_id() ].size()) ) { \
+ response->set_project_id( request->project_id() ); \
+ response->set_camera_id( -1 ); \
+ done->Run(); \
+ return; \
+ }
+
+// Public Methods
+// ---------------------------------------------
+
+ProjectServiceImpl::ProjectServiceImpl( std::string root_directory ) :
+ m_root_directory( fs::system_complete(root_directory).string() ) {
+
+ // Search for all the project files within a given root directory.
+ // Project files end in a ptk
+ std::vector<std::string> ptkfiles = glob_ptk_filenames( root_directory );
+ if ( ptkfiles.size() < 1 )
+ vw_throw( IOErr() << "There are no project files where the server started.\n" );
+
+ for (size_t i = 0; i < ptkfiles.size(); ++i ) {
+ m_ptk_lookup[fs::path(ptkfiles[i]).relative_path().string()] =
+ m_ptk_lookup.size()+1;
+ m_project_metas.push_back( ProjectMeta() );
+ m_camera_metas.push_back( std::vector<CameraMeta>() );
+ read_pho_project( root_directory+"/"+ptkfiles[i],
+ m_project_metas.back(),
+ m_camera_metas.back() );
+ m_project_metas.back().set_name( fs::path(ptkfiles[i]).relative_path().string() );
+ }
+}
+
+void ProjectServiceImpl::sync() {
+ for ( size_t i = 0; i < m_project_metas.size(); i++ ) {
+ vw_out() << "\t--> Syncing project files for "
+ << m_project_metas[i].name() << " to disk.\n";
+ // Delete bak
+ fs::remove(m_root_directory+"/"+m_project_metas[i].name()+".bak");
+
+ // Move current ptk to bak
+ fs::rename(m_root_directory+"/"+m_project_metas[i].name(),
+ m_root_directory+"/"+m_project_metas[i].name()+".bak");
+
+ // Save ptk
+ write_pho_project( m_root_directory+"/"+m_project_metas[i].name(),
+ m_project_metas[i],
+ m_camera_metas[i].begin(),
+ m_camera_metas[i].end() );
+ }
+}
+
+void
+ProjectServiceImpl::OpenRequest(::google::protobuf::RpcController* /*controller*/,
+ const ::asp::pho::ProjectOpenRequest* request,
+ ::asp::pho::ProjectOpenReply* response,
+ ::google::protobuf::Closure* done) {
+ std::string request_ptk = request->name();
+ {
+ size_t findx = request_ptk.find("ptk/");
+ if ( findx != std::string::npos )
+ request_ptk = request_ptk.substr(findx+4);
+ }
+
+ std::map<std::string,int>::iterator it =
+ m_ptk_lookup.find( request_ptk );
+ if ( it != m_ptk_lookup.end() ) {
+ // Success
+ response->set_project_id( it->second );
+ *(response->mutable_meta()) = m_project_metas[ it->second ];
+ } else {
+ // Fail
+ response->set_project_id( -1 );
+ *(response->mutable_meta()) = ProjectMeta();
+ }
+ done->Run();
+}
+
+void
+ProjectServiceImpl::CameraCreate(::google::protobuf::RpcController* /*controller*/,
+ const ::asp::pho::CameraCreateRequest* request,
+ ::asp::pho::CameraCreateReply* response,
+ ::google::protobuf::Closure* done) {
+ CHECK_PROJECT_RANGE();
+
+ // Adding camera meta
+ response->set_project_id( request->project_id() );
+ response->set_camera_id( m_camera_metas[request->project_id()].size() );
+ m_camera_metas[request->project_id()].push_back( request->meta() );
+ m_project_metas[request->project_id()].set_num_cameras( response->camera_id() );
+ done->Run();
+}
+
+void
+ProjectServiceImpl::CameraRead(::google::protobuf::RpcController* /*controller*/,
+ const ::asp::pho::CameraReadRequest* request,
+ ::asp::pho::CameraReadReply* response,
+ ::google::protobuf::Closure* done) {
+ // Set empty meta .. for the error checking
+ *(response->mutable_meta()) = CameraMeta();
+ CHECK_PROJECT_RANGE();
+ CHECK_CAMERA_RANGE();
+
+ // echo correct
+ response->set_project_id( request->project_id() );
+ response->set_camera_id( request->camera_id() );
+
+ *(response->mutable_meta()) =
+ m_camera_metas[request->project_id()][request->camera_id()];
+}
+
+void
+ProjectServiceImpl::CameraWrite(::google::protobuf::RpcController* /*controller*/,
+ const ::asp::pho::CameraWriteRequest* request,
+ ::asp::pho::CameraWriteReply* response,
+ ::google::protobuf::Closure* done) {
+ CHECK_PROJECT_RANGE();
+ CHECK_CAMERA_RANGE();
+
+ // echo correct
+ response->set_project_id( request->project_id() );
+ response->set_camera_id( request->camera_id() );
+ m_camera_metas[request->project_id()][request->camera_id()] =
+ request->meta();
+}
View
50 src/asp/PhotometryTK/ProjectService.h
@@ -0,0 +1,50 @@
+#ifndef __ASP_PHOTOMETRYTK_PROJECT_SERVICE_H__
+#define __ASP_PHOTOMETRYTK_PROJECT_SERVICE_H__
+
+#include <vw/Core/FundamentalTypes.h>
+#include <asp/PhotometryTK/ProjectFile.pb.h>
+
+#include <google/protobuf/service.h>
+
+namespace asp {
+namespace pho {
+
+ // Implementation
+ // This is what the server interacts with. Clients just call ProjectService.
+ // This server implementation does not ever deal with the creation of project
+ // files, but only dishes out their information and allows for modification
+ // of their camera information.
+ class ProjectServiceImpl : public ProjectService {
+ std::string m_root_directory;
+
+ std::map<std::string,vw::int32> m_ptk_lookup;
+ std::vector<ProjectMeta> m_project_metas;
+ std::vector<std::vector<CameraMeta> > m_camera_metas;
+
+ public:
+ ProjectServiceImpl(std::string root_directory);
+
+ void sync(); // Write to disk
+
+ virtual void OpenRequest(::google::protobuf::RpcController* controller,
+ const ::asp::pho::ProjectOpenRequest* request,
+ ::asp::pho::ProjectOpenReply* response,
+ ::google::protobuf::Closure* done);
+ virtual void CameraCreate(::google::protobuf::RpcController* controller,
+ const ::asp::pho::CameraCreateRequest* request,
+ ::asp::pho::CameraCreateReply* response,
+ ::google::protobuf::Closure* done);
+ virtual void CameraRead(::google::protobuf::RpcController* controller,
+ const ::asp::pho::CameraReadRequest* request,
+ ::asp::pho::CameraReadReply* response,
+ ::google::protobuf::Closure* done);
+ virtual void CameraWrite(::google::protobuf::RpcController* controller,
+ const ::asp::pho::CameraWriteRequest* request,
+ ::asp::pho::CameraWriteReply* response,
+ ::google::protobuf::Closure* done);
+
+ };
+
+}} //end namespace asp::pho
+
+#endif//__ASP_PHOTOMETRYTK_PROJECT_SERVICE_H__
View
168 src/asp/PhotometryTK/ptk_server.cc
@@ -0,0 +1,168 @@
+#include <vw/Core/Stopwatch.h>
+#include <vw/Plate/RpcServices.h>
+#include <vw/Plate/AmqpConnection.h>
+#include <asp/PhotometryTK/ProjectService.h>
+#include <google/protobuf/descriptor.h>
+#include <signal.h>
+
+#include <boost/program_options.hpp>
+namespace po = boost::program_options;
+using namespace vw;
+using namespace vw::platefile;
+using namespace asp::pho;
+
+// Global variable
+boost::shared_ptr<ProjectServiceImpl> g_service;
+
+// -- Signal Handler ---------------------
+
+volatile bool process_messages = true;
+volatile bool force_sync = false;
+
+void sig_unexpected_shutdown( int sig_num ) {
+ signal(sig_num, SIG_IGN);
+ process_messages = false;
+ signal(sig_num, sig_unexpected_shutdown);
+}
+
+void sig_sync( int sig_num ) {
+ signal(sig_num, SIG_IGN);
+ force_sync = true;
+ signal(sig_num, sig_sync);
+}
+
+// -- Main Loop --------------------------
+
+class ServerTask {
+ boost::shared_ptr<AmqpRpcServer> m_server;
+
+public:
+
+ ServerTask(boost::shared_ptr<AmqpRpcServer> server) : m_server(server) {}
+
+ void operator()() {
+ std::cout << "\t--> Listening for messages.\n";
+ m_server->run();
+ }
+
+ void kill() { m_server->shutdown(); }
+};
+
+int main(int argc, char** argv) {
+ std::string exchange_name, root_directory;
+ std::string hostname;
+ float sync_interval;
+ int port;
+
+ po::options_description general_options("Runs a mosaicking daemon that listens for mosaicking requests coming in over the AMQP bus..\n\nGeneral Options:");
+ general_options.add_options()
+ ("exchange,e", po::value<std::string>(&exchange_name)->default_value("ptk"),
+ "Specify the name of the AMQP exchange to use for the index service.")
+ ("hostname", po::value<std::string>(&hostname)->default_value("localhost"),
+ "Specify the hostname of the AMQP server to use for remote procedure calls (RPCs).")
+ ("port,p", po::value<int>(&port)->default_value(5672),
+ "Specify the port of the AMQP server to use for remote procedure calls (RPCs).")
+ ("sync-interval,s", po::value<float>(&sync_interval)->default_value(60),
+ "Specify the time interval (in minutes) for automatically synchronizing the index to disk.")
+ ("debug", "Output debug messages.")
+ ("help,h", "Display this help message");
+
+ po::options_description hidden_options("");
+ hidden_options.add_options()
+ ("root-directory", po::value<std::string>(&root_directory));
+
+ po::options_description options("Allowed Options");
+ options.add(general_options).add(hidden_options);
+
+ po::positional_options_description p;
+ p.add("root-directory", -1);
+
+ po::variables_map vm;
+ po::store( po::command_line_parser( argc, argv ).options(options).positional(p).run(), vm );
+ po::notify( vm );
+
+ std::ostringstream usage;
+ usage << "Usage: " << argv[0] << " root_directory" << std::endl << std::endl;
+ usage << general_options << std::endl;
+
+ if( vm.count("help") ) {
+ std::cout << usage.str();
+ return 0;
+ }
+
+ if( vm.count("root-directory") != 1 ) {
+ std::cerr << "Error: must specify a root directory that contains plate files!"
+ << std::endl << std::endl;
+ std::cout << usage.str();
+ return 1;
+ }
+
+ std::string queue_name = AmqpRpcClient::UniqueQueueName("ptk_server");
+
+ boost::shared_ptr<AmqpConnection> connection( new AmqpConnection(hostname, port) );
+ boost::shared_ptr<AmqpRpcServer> server( new AmqpRpcServer(connection, exchange_name,
+ queue_name, vm.count("debug")) );
+ g_service.reset( new ProjectServiceImpl(root_directory) );
+ server->bind_service(g_service, "ptk");
+
+ // Start the server task in another thread
+ boost::shared_ptr<ServerTask> server_task( new ServerTask(server) );
+ Thread server_thread( server_task );
+
+ // Install Unix Signal Handlers. These will help us to gracefully
+ // recover and salvage the index under most unexpected error
+ // conditions.
+ signal(SIGINT, sig_unexpected_shutdown);
+ signal(SIGUSR1, sig_sync);
+
+ std::cout << "Starting photometry project server\n\n";
+ long long t0 = Stopwatch::microtime();
+
+
+ long long sync_interval_seconds = uint64(sync_interval * 60);
+ long long seconds_until_sync = sync_interval_seconds;
+
+ while(process_messages) {
+ // Check to see if the user generated a sync signal.
+ if (force_sync) {
+ std::cout << "\nReceived signal USR1. Synchronizing project files to disk:\n";
+ long long sync_t0 = Stopwatch::microtime();
+ g_service->sync();
+ float sync_dt = float(Stopwatch::microtime() - sync_t0) / 1e6;
+ std::cout << "Sync complete (took " << sync_dt << " seconds).\n";
+ force_sync = false;
+ }
+
+ // Check to see if our sync timeout has occurred.
+ if (seconds_until_sync-- <= 0) {
+ std::cout << "\nAutomatic sync of project files started (interval = " << sync_interval << " minutes).\n";
+ long long sync_t0 = Stopwatch::microtime();
+ g_service->sync();
+ float sync_dt = float(Stopwatch::microtime() - sync_t0) / 1e6;
+ std::cout << "Sync complete (took " << sync_dt << " seconds).\n";
+
+ // Restart the count-down
+ seconds_until_sync = sync_interval_seconds;
+ }
+
+ int queries = server->queries_processed();
+ size_t bytes = server->bytes_processed();
+ int n_outstanding_messages = server->incoming_message_queue_size();
+ server->reset_stats();
+
+ float dt = float(Stopwatch::microtime() - t0) / 1e6;
+ t0 = Stopwatch::microtime();
+
+ std::cout << "[index_server] : "
+ << float(queries/dt) << " qps "
+ << float(bytes/dt)/1000.0 << " kB/sec "
+ << n_outstanding_messages << " outstanding messages \r"
+ << std::flush;
+ sleep(1.0);
+ }
+
+ std::cout << "\nShutting down the index service safely.\n";
+ g_service->sync();
+
+ return 0;
+}
View
5 src/asp/PhotometryTK/tests/Makefile.am
@@ -11,9 +11,10 @@
if MAKE_MODULE_PHOTOMETRYTK
-TestProjectFileIO_SOURCES = TestProjectFileIO.cxx
+TestProjectFileIO_SOURCES = TestProjectFileIO.cxx
+TestProjectService_SOURCES = TestProjectService.cxx
-TESTS = TestProjectFileIO
+TESTS = TestProjectFileIO TestProjectService
endif
View
4 src/asp/PhotometryTK/tests/TestProjectFileIO.cxx
@@ -26,14 +26,14 @@ TEST(ProjectFileIO, circle_test) {
cam_st.back().set_name( "back" );
cam_st.front().set_exposure_t( 2 );
cam_st.back().set_exposure_t( 4 );
- write_pho_project( "test.prj", proj_st,
+ write_pho_project( "test.ptk", proj_st,
cam_st.begin(), cam_st.end() );
// Read test data
{
ProjectMeta proj_end;
std::list<CameraMeta> cam_end;
- read_pho_project( "test.prj", proj_end,
+ read_pho_project( "test.ptk", proj_end,
cam_end );
EXPECT_EQ( proj_st.name(), proj_end.name() );
View
19 src/asp/PhotometryTK/tests/TestProjectService.cxx
@@ -0,0 +1,19 @@
+// __BEGIN_LICENSE__
+// Copyright (C) 2006-2009 United States Government as represented by
+// the Administrator of the National Aeronautics and Space Administration.
+// All Rights Reserved.
+// __END_LICENSE__
+
+#include <gtest/gtest.h>
+#include <asp/PhotometryTK/ProjectService.h>
+#include <list>
+
+using namespace vw;
+using namespace asp;
+using namespace asp::pho;
+
+TEST(ProjectService, Instantiation) {
+
+ std::cout << "This will do something in the future.\n";
+
+}

0 comments on commit 2b27f87

Please sign in to comment.
Something went wrong with that request. Please try again.