// ========================================================================= // @author Leonardo Florez-Valencia (florez-l@javeriana.edu.co) // ========================================================================= #include #include #include int main( int argc, char* argv[] ) { typedef cpPlugins::Pipeline TPipeline; typedef cpPlugins::Filter TFilter; if( argc != 3 ) { std::cerr << "Usage: " << argv[ 0 ] << " input output" << std::endl; return( 1 ); } // end if try { TPipeline::SharedPtr pipeline = TPipeline::New( ); TFilter* reader = pipeline->CreateNode( "cpPluginsBase::RawFileReader" )-> Cast< TFilter >( ); reader->SetInValue( "FileName", std::string( argv[ 1 ] ) ); TFilter* writer = pipeline->CreateNode( "cpPluginsBase::RawFileWriter" )-> Cast< TFilter >( ); writer->SetInValue( "FileName", std::string( argv[ 2 ] ) ); writer->SetInput( "Input", reader->GetOutput( "Output" ) ); writer->Update( ); } catch( std::exception& err ) { std::cerr << "ERROR CAUGHT: " << err.what( ) << std::endl; return( 1 ); } // end try return( 0 ); } // eof - $RCSfile$