5 #include <cpPlugins/Interface/Plugins.h>
7 // -------------------------------------------------------------------------
8 typedef cpPlugins::Interface::Plugins TPlugins;
10 // -------------------------------------------------------------------------
11 int main( int argc, char* argv[] )
16 << "Usage: " << argv[ 0 ]
18 << " input_image output_image" << std::endl;
24 cpPlugins::Interface::Plugins plugins;
25 if( !plugins.LoadPlugins( argv[ 1 ] ) )
27 std::cerr << "Failed to load plugins." << std::endl;
32 // Associate filenames
33 std::vector< std::string > fnames;
34 for( int i = 2; i < argc - 1; ++i )
35 fnames.push_back( argv[ i ] );
40 std::string name = plugins.ReadImage( fnames, "" );
41 plugins.WriteDataObject( argv[ argc - 1 ], name );
43 catch( std::exception& err )
45 std::cerr << err.what( ) << std::endl;