1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45
|
/*=========================================================================
Program: Image Guided Surgery Software Toolkit
Module: $RCSfile: OpenIGTLinkTrackingBroadcasterMainCommandLine.cxx,v $
Language: C++
Date: $Date: 2009-06-04 19:49:05 $
Version: $Revision: 1.1 $
Copyright (c) ISC Insight Software Consortium. All rights reserved.
See IGSTKCopyright.txt or http://www.igstk.org/copyright.htm for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notices for more information.
=========================================================================*/
#include "OpenIGTLinkTrackingBroadcaster.h"
int main( int argc, char *argv[] )
{
if( argc!=2 )
{
std::cerr<<"Usage: "<<argv[0];
std::cerr<<" tracker_xml_configuration_file.\n";
return EXIT_FAILURE;
}
try
{
std::string s = argv[1];
OpenIGTLinkTrackingBroadcaster *b = new OpenIGTLinkTrackingBroadcaster( s );
b->StartTracking();
while( 1 )
{
igstk::PulseGenerator::Sleep( 10 );
igstk::PulseGenerator::CheckTimeouts();
}
return EXIT_SUCCESS;
}
catch( std::exception &e )
{
std::cerr<<e.what()<<"\n";
return EXIT_FAILURE;
}
}
|