${PROJECT_BINARY_DIR}
${PROJECT_SOURCE_DIR}/lib
${PROJECT_BINARY_DIR}/lib
+ ${PROJECT_SOURCE_DIR}/lib/cpPlugins_Instances
+ ${PROJECT_BINARY_DIR}/lib/cpPlugins_Instances
${PROJECT_SOURCE_DIR}/plugins
${PROJECT_BINARY_DIR}/plugins
${PROJECT_SOURCE_DIR}/lib/third_party
+#include <fstream>
+#include <iostream>
+
#include <algorithm>
+#include <cctype>
#include <cstring>
-#include <iostream>
-#include <iterator>
-#include <fstream>
#include <map>
-#include <set>
-#include <sstream>
-#include <streambuf>
-#include <string>
#include <vector>
+#include <sstream>
// -------------------------------------------------------------------------
-typedef std::set< std::string > TSet;
-typedef std::map< std::string, TSet > TInstances;
-typedef std::vector< std::string > TVector;
+typedef std::vector< std::string > TLines;
+typedef std::map< char, TLines > TParsedLines;
+typedef std::map< std::string, TLines > TVariables;
// -------------------------------------------------------------------------
-TVector Tokenize( const std::string& str, const std::string& delims );
-TSet Combine( const TSet& X, const TSet& Y );
-void Replace(
- std::string& str, const std::string& sub, const std::string& nsub
+TLines Tokenize( const std::string& str, const std::string& delims );
+std::string Replace(
+ const std::string& str, const std::string& sub, const std::string& nsub
+ );
+bool ReadFile( TParsedLines& lines, const std::string& fname );
+void ExpandGroups( TLines& res, const TLines& lines );
+void ExpandVariables( TLines& res, const TLines& lines, const TVariables& vars );
+void ParseIncludes( TLines& res, const TLines& lines, const std::string& ext );
+void PrintLines(
+ const std::string& prefix, const std::string& suffix,
+ const TLines& lines, std::ostream& out
);
// -------------------------------------------------------------------------
{
std::cerr
<< "Usage: " << argv[ 0 ]
- << " input_definitions dir library_name header_filename"
+ << " input_definitions library_name header_file source_file"
<< std::endl;
return( 1 );
} // fi
- std::string input_definitions_file_name = argv[ 1 ];
- std::string dir = argv[ 2 ];
- std::string library_name = argv[ 3 ];
- std::string head_fname = argv[ 4 ];
+ std::string lname = argv[ 2 ];
- // Load file into a buffer
- std::ifstream file_stream( input_definitions_file_name.c_str( ) );
- if( !file_stream )
+ // Read file and simple parse it
+ TParsedLines lines;
+ if( !ReadFile( lines, argv[ 1 ] ) )
{
std::cerr
<< "Error opening file: \""
- << input_definitions_file_name << "\""
+ << argv[ 1 ] << "\""
<< std::endl;
return( 1 );
} // fi
- std::string buf;
- file_stream.seekg( 0, std::ios::end );
- buf.reserve( file_stream.tellg( ) );
- file_stream.seekg( 0, std::ios::beg );
- buf.assign(
- ( std::istreambuf_iterator< char >( file_stream ) ),
- std::istreambuf_iterator< char >( )
- );
- file_stream.close( );
- std::istringstream input_str( buf );
-
- // Process file
- std::string line;
- TVector incl, first_incl;
- TInstances instances;
- TVector classes;
- while( std::getline( input_str, line ) )
- {
- if( line[ 0 ] == 'f' )
- {
- first_incl.push_back( line.substr( line.find_first_not_of( ' ', 1 ) ) );
- }
- else if( line[ 0 ] == 'i' )
- {
- incl.push_back( line.substr( line.find_first_not_of( ' ', 1 ) ) );
- }
- else if( line[ 0 ] == 'c' )
- {
- classes.push_back( line.substr( line.find_first_not_of( ' ', 1 ) ) );
- }
- else if( line[ 0 ] == 'a' )
- {
- TVector tokens = Tokenize( line, "=" );
-
- // Get argument name
- TVector arg_tokens = Tokenize( tokens[ 0 ], " " );
- std::string arg = arg_tokens[ 0 ];
- unsigned int i = 0;
- while( arg[ 0 ] != '#' && i < arg_tokens.size( ) )
- arg = arg_tokens[ ++i ];
-
- // Get values
- TVector values_tokens = Tokenize( tokens[ 1 ], ";" );
- for( auto t = values_tokens.begin( ); t != values_tokens.end( ); ++t )
- {
- std::string value = t->substr( t->find_first_not_of( ' ' ) );
- unsigned int value_len = value.size( );
- while( value[ value_len - 1 ] == ' ' && value_len > 0 )
- value_len--;
- value = value.substr( 0, value_len );
-
- if( value == "#integers" )
- {
- instances[ arg ].insert( "char" );
- instances[ arg ].insert( "short" );
- instances[ arg ].insert( "int" );
- instances[ arg ].insert( "long" );
- instances[ arg ].insert( "unsigned char" );
- instances[ arg ].insert( "unsigned short" );
- instances[ arg ].insert( "unsigned int" );
- instances[ arg ].insert( "unsigned long" );
- }
- else if( value == "#integers_ptr" )
- {
- instances[ arg ].insert( "char*" );
- instances[ arg ].insert( "short*" );
- instances[ arg ].insert( "int*" );
- instances[ arg ].insert( "long*" );
- instances[ arg ].insert( "unsigned char*" );
- instances[ arg ].insert( "unsigned short*" );
- instances[ arg ].insert( "unsigned int*" );
- instances[ arg ].insert( "unsigned long*" );
- }
- else if( value == "#floats" )
- {
- instances[ arg ].insert( "double" );
- instances[ arg ].insert( "float" );
- }
- else if( value == "#floats_ptr" )
- {
- instances[ arg ].insert( "double*" );
- instances[ arg ].insert( "float*" );
- }
- else if( value == "#all_dims" )
- {
- instances[ arg ].insert( "1" );
- instances[ arg ].insert( "2" );
- instances[ arg ].insert( "3" );
- instances[ arg ].insert( "4" );
- }
- else if( value == "#all_visual_dims" )
- {
- instances[ arg ].insert( "2" );
- instances[ arg ].insert( "3" );
- }
- else
- instances[ arg ].insert( value );
-
- } // rof
- } // fi
-
- } // elihw
-
- // Span all possible types
- TVector all_real_classes;
- for( auto clsIt = classes.begin( ); clsIt != classes.end( ); ++clsIt )
+ // Build definitions
+ TVariables vars;
+ for( auto dIt = lines[ 'd' ].begin( ); dIt != lines[ 'd' ].end( ); ++dIt )
{
- // Extract types
- std::string name = clsIt->substr( clsIt->find_first_not_of( " " ) );
- std::string tok = name;
- auto sharpPos = tok.find_first_of( "#" );
- TInstances li;
- while( sharpPos != std::string::npos )
- {
- tok = tok.substr( sharpPos );
- auto spacePos = tok.find_first_of( " " );
- auto arg = tok.substr( 0, spacePos );
- auto aIt = instances.find( arg );
- if( aIt != instances.end( ) )
- li[ arg ] = aIt->second;
- tok = tok.substr( spacePos );
- sharpPos = tok.find_first_of( "#" );
-
- } // eliwh
- if( li.size( ) > 0 )
- {
- // Combine types
- TSet combs;
- if( li.size( ) > 1 )
- {
- auto iIt = li.begin( );
- auto jIt = iIt;
- jIt++;
- for( ; jIt != li.end( ); ++iIt, ++jIt )
- {
- if( iIt == li.begin( ) )
- combs = Combine( iIt->second, jIt->second );
- else
- combs = Combine( combs, jIt->second );
-
- } // rof
- }
- else
- combs = li.begin( )->second;
-
- // Write instantiations
- for( auto combIt = combs.begin( ); combIt != combs.end( ); ++combIt )
- {
- char* buffer = new char[ combIt->size( ) + 1 ];
- std::strcpy( buffer, combIt->c_str( ) );
- buffer[ combIt->size( ) ] = '\0';
- char* tok = std::strtok( buffer, "#" );
- std::map< std::string, std::string > real_instance;
- for( auto lIt = li.begin( ); lIt != li.end( ); ++lIt )
- {
- real_instance[ lIt->first ] = std::string( tok );
- tok = std::strtok( NULL, "#" );
-
- } // rof
- delete buffer;
-
- std::string real_name = name;
- auto riIt = real_instance.begin( );
- for( ; riIt != real_instance.end( ); ++riIt )
- Replace( real_name, riIt->first, riIt->second );
- all_real_classes.push_back( real_name );
-
- } // rof
- }
- else
- all_real_classes.push_back( name );
+ auto tokens = Tokenize( *dIt, "=;" );
+ auto tIt = tokens.begin( );
+ auto vName = *tIt;
+ tIt++;
+ for( ; tIt != tokens.end( ); ++tIt )
+ vars[ vName ].push_back( *tIt );
} // rof
- // Write files
- std::ofstream out_str( head_fname.c_str( ) );
- if( !out_str )
+ // First include section
+ TLines first_includes;
+ ParseIncludes( first_includes, lines[ 'f' ], "" );
+
+ TLines normal_includes;
+ ParseIncludes( normal_includes, lines[ 'i' ], "" );
+
+ TLines template_includes;
+ ParseIncludes( template_includes, lines[ 't' ], "" );
+
+ TLines template_sources;
+ ParseIncludes( template_sources, lines[ 't' ], "xx" );
+
+ // Expand groups
+ TLines classes;
+ ExpandGroups( classes, lines[ 'c' ] );
+
+ // Expand variables
+ TLines real_classes;
+ ExpandVariables( real_classes, classes, vars );
+
+ // Prepare precompiler options
+ TLines global_header;
+ std::stringstream global_header_stream;
+ global_header_stream
+ << "#ifndef __" << lname << "__H__" << std::endl
+ << "#define __" << lname << "__H__" << std::endl<< std::endl
+ << "#include <cpPlugins_Config.h>" << std::endl << std::endl;
+ global_header.push_back( global_header_stream.str( ) );
+
+ TLines macro_header;
+ std::stringstream macro_header_stream;
+ macro_header_stream
+ << "#ifdef " << lname << "_EXPORTS" << std::endl
+ << "# define " << lname << "_PREFIX template class "
+ << lname << "_EXPORT" << std::endl
+ << "#else // " << lname << "_EXPORTS" << std::endl
+ << "# define " << lname << "_PREFIX extern template class" << std::endl
+ << "#endif // " << lname << "_EXPORTS" << std::endl;
+ macro_header.push_back( macro_header_stream.str( ) );
+
+ TLines end_global_header;
+ std::stringstream end_global_header_stream;
+ end_global_header_stream
+ << "#endif // __" << lname << "__H__" << std::endl;
+ end_global_header.push_back( end_global_header_stream.str( ) );
+
+ // Write header file
+ std::ofstream header_file( argv[ 3 ] );
+ if( !header_file )
{
- std::cerr << "Error opening file \"" << head_fname << "\"" << std::endl;
+ std::cerr
+ << "Error opening \"" << argv[ 3 ] << "\" for writing." << std::endl;
return( 1 );
} // fi
+ PrintLines( "", "", global_header, header_file );
+ header_file
+ << "#include <" << lname << "_Export.h>" << std::endl << std::endl;
+ PrintLines( "", "", lines[ 'b' ], header_file );
+ header_file << std::endl;
+ PrintLines( "", "", first_includes, header_file );
+ PrintLines( "", "", macro_header, header_file );
+ PrintLines( "", "", normal_includes, header_file );
+ PrintLines( "", "", template_includes, header_file );
+ header_file << std::endl << "#ifdef " << lname << "_EXPORTS" << std::endl;
+ PrintLines( "", "", template_sources, header_file );
+ header_file << "#endif // " << lname << "_EXPORTS" << std::endl;
+ header_file << std::endl;
+ PrintLines( lname + std::string( "_PREFIX " ), ";", real_classes, header_file );
+ header_file << std::endl;
+ PrintLines( "", "", end_global_header, header_file );
+ header_file.close( );
+
+ // Write source file
+ std::ofstream source_file( argv[ 4 ] );
+ if( !source_file )
+ {
+ std::cerr
+ << "Error opening \"" << argv[ 3 ] << "\" for writing." << std::endl;
+ return( 1 );
- out_str << "#ifndef __" << dir << "__" << library_name << "__H__" << std::endl;
- out_str << "#define __" << dir << "__" << library_name << "__H__" << std::endl << std::endl;
- out_str << "#include <" << dir << "/" << library_name << "_Export.h>" << std::endl;
-
- // First incl
- for( auto inclIt = first_incl.begin( ); inclIt != first_incl.end( ); ++inclIt )
- out_str
- << "#include <" << *inclIt << ">" << std::endl;
- out_str << std::endl;
-
- std::string base_name = dir + std::string( "_" ) + library_name;
- out_str
- << std::endl
- << "#ifdef " << base_name << "_EXPORTS" << std::endl
- << "# undef ITK_MANUAL_INSTANTIATION" << std::endl
- << "# define " << base_name << "_PREFIX template class " << base_name << "_EXPORT" << std::endl
- << "#else" << std::endl
- << "# define ITK_MANUAL_INSTANTIATION" << std::endl
- << "# define " << base_name << "_PREFIX extern template class" << std::endl
- << "#endif" << std::endl << std::endl;
-
- // Incl
- for( auto inclIt = incl.begin( ); inclIt != incl.end( ); ++inclIt )
- out_str
- << "#include <" << *inclIt << ">" << std::endl;
- out_str << std::endl;
-
- // All classes
- for( auto clsIt = all_real_classes.begin( ); clsIt != all_real_classes.end( ); ++clsIt )
- out_str
- << base_name << "_PREFIX " << *clsIt << ";" << std::endl;
- out_str << std::endl;
-
- out_str << "#endif // __" << dir << "__" << library_name << "__H__" << std::endl;
- out_str << std::endl << "// eof" << std::endl;
-
- out_str.close( );
-
+ } // fi
+ source_file
+ << "#include \"" << argv[ 3 ] << "\"" << std::endl;
+ /* TODO
+ PrintLines( "", "", first_includes, source_file );
+ PrintLines( "", "", template_includes, source_file );
+ source_file << std::endl;
+ PrintLines(
+ std::string( "template class " ) + lname + std::string( "_EXPORT " ),
+ ";", real_classes, source_file
+ );
+ */
+ source_file.close( );
return( 0 );
}
// -------------------------------------------------------------------------
-TVector Tokenize( const std::string& str, const std::string& delims )
+TLines Tokenize( const std::string& str, const std::string& delims )
{
- TVector tokens;
+ TLines tokens;
if( str.size( ) > 0 )
{
char* buffer = new char[ str.size( ) + 1 ];
}
// -------------------------------------------------------------------------
-TSet Combine( const TSet& X, const TSet& Y )
+std::string Replace(
+ const std::string& str, const std::string& sub, const std::string& nsub
+ )
+{
+ std::string res = str;
+ size_t index = 0;
+ while( true )
+ {
+ index = res.find( sub, index );
+ if( index == std::string::npos ) break;
+ res.replace( index, sub.size( ), nsub );
+ index += sub.size( );
+
+ } // elihw
+ return( res );
+}
+
+// -------------------------------------------------------------------------
+bool ReadFile( TParsedLines& lines, const std::string& fname )
{
- TSet Z;
- for( auto xIt = X.begin( ); xIt != X.end( ); ++xIt )
+ // Load file into a string stream
+ std::ifstream file_stream( fname.c_str( ) );
+ if( !file_stream )
+ return( false );
+ std::string buffer;
+ file_stream.seekg( 0, std::ios::end );
+ buffer.reserve( file_stream.tellg( ) );
+ file_stream.seekg( 0, std::ios::beg );
+ buffer.assign(
+ ( std::istreambuf_iterator< char >( file_stream ) ),
+ std::istreambuf_iterator< char >( )
+ );
+ file_stream.close( );
+ std::istringstream input_stream( buffer );
+
+ // Read line by line
+ std::string line;
+ while( std::getline( input_stream, line ) )
{
- for( auto yIt = Y.begin( ); yIt != Y.end( ); ++yIt )
+ auto cmd_pos = line.end( );
+ auto arg_pos = line.end( );
+ auto lIt = line.begin( );
+ while( lIt != line.end( ) )
{
- std::stringstream val;
- val << *xIt << "#" << *yIt;
- Z.insert( val.str( ) );
+ if( !std::isblank( *lIt ) )
+ {
+ if( cmd_pos == line.end( ) )
+ {
+ cmd_pos = lIt;
+ ++lIt;
+ }
+ else if( arg_pos == line.end( ) )
+ {
+ arg_pos = lIt;
+ lIt = line.end( );
+
+ } // fi
+ }
+ else
+ ++lIt;
+
+ } // elihw
+ char cmd = *cmd_pos;
+ std::string arg;
+ arg.resize( line.end( ) - arg_pos );
+ std::copy( arg_pos, line.end( ), arg.begin( ) );
+ lines[ cmd ].push_back( arg );
+
+ } // elihw
+ return( true );
+}
- } // rof
+// -------------------------------------------------------------------------
+void ExpandGroups( TLines& res, const TLines& lines )
+{
+ for( auto lIt = lines.begin( ); lIt != lines.end( ); ++lIt )
+ {
+ auto b_pos = lIt->find( "#{" );
+ if( b_pos != std::string::npos )
+ {
+ auto e_pos = lIt->find( "}" );
+ auto expansion = lIt->substr( b_pos + 2, e_pos - b_pos - 2 );
+ auto tokens = Tokenize( expansion, ";" );
+ for( auto tIt = tokens.begin( ); tIt != tokens.end( ); ++tIt )
+ *tIt = lIt->substr( 0, b_pos ) + *tIt + lIt->substr( e_pos + 1 );
+ ExpandGroups( res, tokens );
+ }
+ else
+ res.push_back( *lIt );
} // rof
- return( Z );
}
// -------------------------------------------------------------------------
-void Replace(
- std::string& str, const std::string& sub, const std::string& nsub
- )
+void ExpandVariables( TLines& res, const TLines& lines, const TVariables& vars )
{
- size_t index = 0;
- while( true )
+ const char* int_types[] = { "char", "short", "int", "long" };
+ const char* float_types[] = { "float", "double" };
+ unsigned int n_int_types = 4, n_float_types = 2;
+ for( auto lIt = lines.begin( ); lIt != lines.end( ); ++lIt )
{
- index = str.find( sub, index );
- if( index == std::string::npos ) break;
- str.replace( index, sub.size( ), nsub );
- index += sub.size( );
+ auto b_pos = lIt->find( "#" );
+ if( b_pos != std::string::npos )
+ {
+ auto tokens = Tokenize( lIt->substr( b_pos ), " ,;:{}[]()\"$&<>" );
+ std::string cmd = tokens[ 0 ];
+ if(
+ cmd == "#int_types" || cmd == "#uint_types" || cmd == "#float_types"
+ )
+ {
+ const char** types = ( cmd == "#float_types" )? float_types: int_types;
+ unsigned int size = ( cmd == "#float_types" )? n_float_types: n_int_types;
+ std::string ustr = ( ( cmd == "#uint_types" )? "unsigned ": "" );
+ TLines new_res;
+ for( unsigned int i = 0; i < size; ++i )
+ new_res.push_back( Replace( *lIt, cmd, ustr + types[ i ] ) );
+ ExpandVariables( res, new_res, vars );
+ }
+ else
+ {
+ auto vIt = vars.find( cmd );
+ if( vIt != vars.end( ) )
+ {
+ TLines new_res;
+ for(
+ auto wIt = vIt->second.begin( ); wIt != vIt->second.end( ); ++wIt
+ )
+ new_res.push_back( Replace( *lIt, cmd, *wIt ) );
+ ExpandVariables( res, new_res, vars );
- } // elihw
+ } // fi
+
+ } // fi
+ }
+ else
+ res.push_back( *lIt );
+
+ } // rof
+}
+
+// -------------------------------------------------------------------------
+void ParseIncludes( TLines& res, const TLines& lines, const std::string& ext )
+{
+ for( auto lIt = lines.begin( ); lIt != lines.end( ); ++lIt )
+ res.push_back(
+ std::string( "#include <" ) + *lIt + ext + std::string( ">" )
+ );
+}
+
+// -------------------------------------------------------------------------
+void PrintLines(
+ const std::string& prefix, const std::string& suffix,
+ const TLines& lines, std::ostream& out
+ )
+{
+ for( auto i = lines.begin( ); i != lines.end( ); ++i )
+ out << prefix << *i << suffix << std::endl;
}
// eof - $RCSfile$
ItkVtkGlue
third_party
cpExtensions
- cpPlugins_ITKInstances
+ cpPlugins_Instances
cpPlugins
)
IF(USE_QT4)
SET(
target_LIBRARIES
+ cpPlugins_Base
+ cpPlugins_Image
+ cpPlugins_Mesh
+ cpPlugins_ImageFiltersBase
+ cpPlugins_ImageIO
+ cpPlugins_ImageIterators
+ cpPlugins_ImageITK2VTK
cpPlugins_tinyxml2
- cpPlugins_ITKInstances_Base
- cpPlugins_ITKInstances_Image
- cpPlugins_ITKInstances_ImageIterators
- cpPlugins_ITKInstances_ImageFilters
- cpPlugins_ITKInstances_Paths
- cpPlugins_ITKInstances_Mesh
- ${VTK_LIBRARIES}
)
IF(NOT WIN32)
SET(
#define __CPPLUGINS__CONFIG__H__
#include <cpPlugins/cpPlugins_Export.h>
+#include <cpPlugins_Config.h>
#include <string>
/*
* =========================================================================
*/
-#define ITK_MANUAL_INSTANTIATION
#define cpPlugins_CONFIG_FILE "plugins.cfg"
#define cpPlugins_QT4_USED @QT4_FOUND@
#ifndef __CPPLUGINS__IMAGE__HXX__
#define __CPPLUGINS__IMAGE__HXX__
-#include <cpPlugins_ITKInstances/Image.h>
+#include <cpPlugins_Instances/ImageITK2VTK.h>
// -------------------------------------------------------------------------
template< unsigned int D >
#include <itkMacro.h>
+#define ITK_MANUAL_INSTANTIATION
+
#ifndef ITK_DELETE_FUNCTION
# define ITK_DELETE_FUNCTION
#endif // ITK_DELETE_FUNCTION
+++ /dev/null
-#include <cpPlugins_ITKInstances/Base.h>
-
-// -------------------------------------------------------------------------
-#define cpPlugins_ITKInstances_Base_ostream( O, T, D ) \
- template cpPlugins_ITKInstances_Base_EXPORT std::ostream& operator<< < T, D >( std::ostream& o, const O< T, D >& r )
-
-namespace itk
-{
- cpPlugins_ITKInstances_Base_ostream( FixedArray, float, 2 );
- cpPlugins_ITKInstances_Base_ostream( FixedArray, double, 2 );
- cpPlugins_ITKInstances_Base_ostream( FixedArray, float, 3 );
- cpPlugins_ITKInstances_Base_ostream( FixedArray, double, 3 );
-
- cpPlugins_ITKInstances_Base_ostream( Point, float, 1 );
- cpPlugins_ITKInstances_Base_ostream( Vector, float, 1 );
- cpPlugins_ITKInstances_Base_ostream( Point, double, 1 );
- cpPlugins_ITKInstances_Base_ostream( Vector, double, 1 );
- cpPlugins_ITKInstances_Base_ostream( Point, float, 2 );
- cpPlugins_ITKInstances_Base_ostream( Vector, float, 2 );
- cpPlugins_ITKInstances_Base_ostream( Point, double, 2 );
- cpPlugins_ITKInstances_Base_ostream( Vector, double, 2 );
- cpPlugins_ITKInstances_Base_ostream( Point, float, 3 );
- cpPlugins_ITKInstances_Base_ostream( Vector, float, 3 );
- cpPlugins_ITKInstances_Base_ostream( Point, double, 3 );
- cpPlugins_ITKInstances_Base_ostream( Vector, double, 3 );
- cpPlugins_ITKInstances_Base_ostream( Point, float, 4 );
- cpPlugins_ITKInstances_Base_ostream( Vector, float, 4 );
- cpPlugins_ITKInstances_Base_ostream( Point, double, 4 );
- cpPlugins_ITKInstances_Base_ostream( Vector, double, 4 );
-}
-
-// ...aaand that's all folks!
-
-// eof - $RCSfile$
+++ /dev/null
-f cpPlugins_Config.h
-i complex
-i map
-i string
-i vector
-i itkArray.h
-i itkArray2D.h
-i itkConvertPixelBuffer.h
-i itkDefaultConvertPixelTraits.h
-i itkFixedArray.h
-i itkImportImageContainer.h
-i itkIndex.h
-i itkMatrix.h
-i itkPoint.h
-i itkCovariantVector.h
-i itkVector.h
-i itkRGBPixel.h
-i itkRGBAPixel.h
-i itkSimpleDataObjectDecorator.h
-i itkDataObjectDecorator.h
-i itkAffineTransform.h
-i itkTransform.h
-c itk::Array< #1 >
-c itk::FixedArray< #1 , #2 >
-c itk::FixedArray< float , 6 >
-c itk::FixedArray< double , 6 >
-c itk::Point< #5 , #2 >
-c itk::Vector< #5 , #2 >
-c itk::CovariantVector< #5 , #2 >
-c itk::Matrix< #5 , #2 , #2 >
-c #7 < #1 >
-c itk::Array2D < #5 >
-c itk::Transform < #5 , #2 , #2 >
-c itk::DataObjectDecorator< itk::Transform < #5 , #2 , #2 > >
-c itk::SimpleDataObjectDecorator< #1 >
-c itk::SimpleDataObjectDecorator< #3 >
-c itk::SimpleDataObjectDecorator< std::vector< itk::Index< #6 > > >
-c itk::SimpleDataObjectDecorator< std::vector< itk::Point< #5 , #6 > > >
-c itk::SimpleDataObjectDecorator< itk::Array< #1 > >
-c itk::ConvertPixelBuffer< #1 , #4 , itk::DefaultConvertPixelTraits< #4 > >
-c itk::ConvertPixelBuffer< #1 , std::complex< #5 > , itk::DefaultConvertPixelTraits< std::complex< #5 > > >
-c itk::ConvertPixelBuffer< #1 , #7 < #4 > , itk::DefaultConvertPixelTraits< #7 < #4 > > >
-c itk::ImportImageContainer< unsigned long , #1 >
-c itk::ImportImageContainer< unsigned long , std::complex< #5 > >
-c itk::ImportImageContainer< unsigned long , #7 < #1 > >
-c itk::ImportImageContainer< unsigned long , #8 < #5 , #2 > >
-a #1 = #integers;#floats
-a #2 = #all_dims
-a #3 = bool;std::string
-a #4 = #integers;#floats
-a #5 = #floats
-a #6 = #all_visual_dims
-a #7 = itk::RGBPixel;itk::RGBAPixel
-a #8 = itk::Vector;itk::CovariantVector
+++ /dev/null
-SET(lib_DIR cpPlugins_ITKInstances)
-SET(target_LIBRARIES ${ITK_LIBRARIES} ${VTK_LIBRARIES})
-SET(
- libs_SOURCES
- Base
- Image
- ImageIterators
- ImageFilters
- Paths
- Mesh
- )
-FOREACH(lib_SRC ${libs_SOURCES})
- SET(desc_NAME "${lib_SRC}_explicit_description.txt")
- SET(header_NAME "${CMAKE_CURRENT_BINARY_DIR}/${lib_SRC}.h")
- SET(source_NAME "${lib_SRC}.cxx")
- SET(lib_NAME cpPlugins_ITKInstances_${lib_SRC})
- ADD_CUSTOM_COMMAND(
- OUTPUT ${header_NAME}
- DEPENDS cpPlugins_CreateInstances ${desc_NAME}
- COMMAND cpPlugins_CreateInstances ${CMAKE_CURRENT_SOURCE_DIR}/${desc_NAME} ${lib_DIR} ${lib_SRC} ${header_NAME}
- )
- ADD_LIBRARY(${lib_NAME} SHARED ${source_NAME} ${header_NAME})
- SET_TARGET_PROPERTIES(
- ${lib_NAME} PROPERTIES
- VERSION "${prj_VER}"
- SOVERSION "${prj_sVER}"
- )
- GENERATE_EXPORT_HEADER(
- ${lib_NAME}
- BASE_NAME ${lib_NAME}
- EXPORT_MACRO_NAME ${lib_NAME}_EXPORT
- EXPORT_FILE_NAME ${PROJECT_BINARY_DIR}/lib/${lib_DIR}/${lib_SRC}_Export.h
- STATIC_DEFINE ${lib_NAME}_BUILT_AS_STATIC
- )
-ENDFOREACH(lib_SRC)
-TARGET_LINK_LIBRARIES(
- cpPlugins_ITKInstances_Base
- ${target_LIBRARIES}
- )
-TARGET_LINK_LIBRARIES(
- cpPlugins_ITKInstances_Image
- cpPlugins_ITKInstances_Base
- )
-TARGET_LINK_LIBRARIES(
- cpPlugins_ITKInstances_ImageIterators
- cpPlugins_ITKInstances_Image
- )
-TARGET_LINK_LIBRARIES(
- cpPlugins_ITKInstances_ImageFilters
- cpPlugins_ITKInstances_ImageIterators
- )
-TARGET_LINK_LIBRARIES(
- cpPlugins_ITKInstances_Paths
- cpPlugins_ITKInstances_Base
- )
-TARGET_LINK_LIBRARIES(
- cpPlugins_ITKInstances_Mesh
- cpPlugins_ITKInstances_Base
- )
-
-# # ===================================
-# # = Integrate all source file names =
-# # ===================================
-
-# SET(
-# lib_HEADERS
-# ${lib_HEADERS_H}
-# ${lib_HEADERS_HPP}
-# ${lib_HEADERS_HXX}
-# )
-
-# SET(
-# lib_SOURCES
-# ${lib_SOURCES_C}
-# ${lib_SOURCES_CPP}
-# ${lib_SOURCES_CXX}
-# )
-
-# ## =====================
-# ## = Compilation rules =
-# ## =====================
-
-# ## ========================
-# ## == Installation rules ==
-# ## ========================
-
-# INSTALL(
-# TARGETS ${lib_NAME}
-# RUNTIME DESTINATION bin
-# LIBRARY DESTINATION lib
-# ARCHIVE DESTINATION lib/static
-# )
-# INSTALL(
-# FILES
-# ${lib_HEADERS}
-# DESTINATION include/${lib_DIR}
-# )
-
-# ## eof - $RCSfile$
+++ /dev/null
-#include <cpPlugins_ITKInstances/Image.h>
-#include <itkFixedArray.h>
-
-// -------------------------------------------------------------------------
-#define cpPlugins_ITKInstances_Image_ImageRegion( D ) \
- template cpPlugins_ITKInstances_Image_EXPORT std::ostream& operator<< < D >( std::ostream& o, const itk::ImageRegion< D >& r )
-
-namespace itk
-{
- cpPlugins_ITKInstances_Image_ImageRegion( 1 );
- cpPlugins_ITKInstances_Image_ImageRegion( 2 );
- cpPlugins_ITKInstances_Image_ImageRegion( 3 );
- cpPlugins_ITKInstances_Image_ImageRegion( 4 );
-}
-
-// ...aaand that's all folks!
-
-// eof - $RCSfile$
+++ /dev/null
-#include <cpPlugins_ITKInstances/ImageFilters.h>
-
-// ...aaand that's all folks!
-
-// eof - $RCSfile$
+++ /dev/null
-f cpPlugins_ITKInstances/ImageIterators.h
-i itkImageSource.h
-i itkImageToImageFilter.h
-i itkInPlaceImageFilter.h
-i itkImageTransformer.h
-c itk::ImageSource< itk::Image< #1 , #2 > >
-c itk::ImageSource< itk::Image< std::complex< #3 > , #2 > >
-c itk::ImageSource< itk::Image< #5 < #1 > , #2 > >
-c itk::ImageToImageFilter< itk::Image< #1 , #2 > , itk::Image< #4 , #2 > >
-c itk::ImageToImageFilter< itk::Image< #1 , 2 > , itk::Image< #1 , 3 > >
-c itk::ImageToImageFilter< itk::Image< #1 , 3 > , itk::Image< #1 , 2 > >
-c itk::InPlaceImageFilter< itk::Image< #1 , #2 > , itk::Image< #4 , #2 > >
-c itk::InPlaceImageFilter< itk::Image< #1 , 3 > , itk::Image< #1 , 2 > >
-c itk::ImageTransformer< itk::Image< #1 , #2 > >
-a #1 = #integers;#floats
-a #2 = #all_dims
-a #3 = #floats
-a #4 = #integers;#floats
-a #5 = itk::RGBPixel;itk::RGBAPixel
+++ /dev/null
-#define ITK_LEGACY_REMOVE
-
-#include <cpPlugins_ITKInstances/ImageIterators.h>
-
-// ...aaand that's all folks!
-
-// eof - $RCSfile$
+++ /dev/null
-f cpPlugins_ITKInstances/Image.h
-i itkImageConstIteratorWithIndex.h
-i itkImageIteratorWithIndex.h
-i itkImageLinearConstIteratorWithIndex.h
-i itkImageLinearIteratorWithIndex.h
-i itkImageRegionConstIterator.h
-i itkImageRegionIterator.h
-i itkImageRegionConstIteratorWithIndex.h
-i itkImageRegionIteratorWithIndex.h
-i itkImageScanlineConstIterator.h
-i itkImageScanlineIterator.h
-i itkConstNeighborhoodIterator.h
-i itkNeighborhoodIterator.h
-i itkConstShapedNeighborhoodIterator.h
-i itkShapedNeighborhoodIterator.h
-c #5 < itk::Image< #1 , #2 > >
-c #5 < itk::Image< std::complex< #3 >, #2 > >
-c #5 < itk::Image< itk::RGBPixel< #1 > , #2 > >
-c #5 < itk::Image< itk::RGBAPixel< #1 > , #2 > >
-c #4 < itk::Image< #1 , #2 >, itk::Image< #1 , #2 > >
-c itk::ConstNeighborhoodIterator< itk::Image< #1 , #2 >, #4 < itk::Image< #1 , #2 >, itk::Image< #1 , #2 > > >
-c itk::NeighborhoodIterator< itk::Image< #1 , #2 >, #4 < itk::Image< #1 , #2 >, itk::Image< #1 , #2 > > >
-c itk::ConstShapedNeighborhoodIterator< itk::Image< #1 , #2 >, #4 < itk::Image< #1 , #2 >, itk::Image< #1 , #2 > > >
-c itk::ShapedNeighborhoodIterator< itk::Image< #1 , #2 >, #4 < itk::Image< #1 , #2 >, itk::Image< #1 , #2 > > >
-a #1 = #integers;#floats
-a #2 = #all_dims
-a #3 = #floats
-a #4 = itk::ZeroFluxNeumannBoundaryCondition
-a #5 = itk::ImageRegionConstIterator;itk::ImageRegionIterator;itk::ImageRegionConstIteratorWithIndex;itk::ImageRegionIteratorWithIndex;itk::ImageConstIteratorWithIndex;itk::ImageIteratorWithIndex;itk::ImageLinearConstIteratorWithIndex;itk::ImageLinearIteratorWithIndex;itk::ImageScanlineConstIterator;itk::ImageScanlineIterator
+++ /dev/null
-f cpPlugins_ITKInstances/Base.h
-i complex
-i itkHistogram.h
-i itkHistogramAlgorithmBase.h
-i itkImage.h
-i itkImageToVTKImageFilter.h
-i itkNeighborhood.h
-c itk::Neighborhood< #1 , #2 , itk::NeighborhoodAllocator< #1 > >
-c itk::Neighborhood< #5 , #2 , itk::NeighborhoodAllocator< #5 > >
-c itk::Statistics::Histogram< #1 >
-c itk::HistogramAlgorithmBase< itk::Statistics::Histogram< #1 > >
-c itk::ImageRegion< #2 >
-c itk::Image< #1 , #2 >
-c itk::Image< std::complex< #4 > , #2 >
-c itk::Image< #6 < #1 > , #2 >
-c itk::Image< #7 < #4 , #2 > , #2 >
-c itk::ImageToVTKImageFilter< itk::Image< #1 , #3 > >
-c itk::ImageToVTKImageFilter< itk::Image< #6 < #1 > , #3 > >
-a #1 = #integers;#floats
-a #2 = #all_dims
-a #3 = #all_visual_dims
-a #4 = #floats
-a #5 = #integers_ptr;#floats_ptr
-a #6 = itk::RGBPixel;itk::RGBAPixel
-a #7 = itk::Vector;itk::CovariantVector
+++ /dev/null
-#include <cpPlugins_ITKInstances/Mesh.h>
-
-// ...aaand that's all folks!
-
-// eof - $RCSfile$
+++ /dev/null
-f cpPlugins_ITKInstances/Base.h
-i itkBoundingBox.h
-i itkPointSet.h
-i itkMesh.h
-i itkLineCell.h
-i itkPolygonCell.h
-i itkTriangleCell.h
-c itk::VectorContainer < unsigned long , itk::CellInterface< #1 , itk::CellTraitsInfo< #2 , float , float , unsigned long , unsigned long , unsigned long , itk::Point< float , #2 > , itk::VectorContainer< unsigned long , itk::Point< float , #2 > > , std::set< unsigned long , std::less< unsigned long > , std::allocator< unsigned long > > > >* >
-c itk::VectorContainer< unsigned long, itk::Point< #1 , #2 > >
-c itk::BoundingBox< unsigned long , #2 , float, itk::VectorContainer< unsigned long , itk::Point< float , #2 > > >
-c itk::PointSet< #1 , #2 >
-c #4 < #1 , #2 >
-c #3 < itk::CellInterface< #1 , itk::CellTraitsInfo< #2 , float , float , unsigned long , unsigned long , unsigned long , itk::Point< float , #2 > , itk::VectorContainer< unsigned long , itk::Point< float , #2 > > , std::set< unsigned long , std::less< unsigned long > , std::allocator< unsigned long > > > > >
-a #1 = #floats
-a #2 = #all_visual_dims
-a #3 = itk::LineCell;itk::PolygonCell;itk::TriangleCell
-a #4 = itk::Mesh
+++ /dev/null
-#include <cpPlugins_ITKInstances/Paths.h>
-
-// ...aaand that's all folks!
-
-// eof - $RCSfile$
+++ /dev/null
-f cpPlugins_ITKInstances/Base.h
-i itkPolyLineParametricPath.h
-c itk::VectorContainer< unsigned int, itk::ContinuousIndex< double, #1 > >
-c itk::PolyLineParametricPath< #1 >
-a #1 = #all_visual_dims
--- /dev/null
+i string
+i vector
+i itkIndex.h
+t itkArray.h
+t itkFixedArray.h
+t itkCovariantVector.h
+t itkMatrix.h
+t itkPoint.h
+t itkVector.h
+t itkRGBPixel.h
+t itkRGBAPixel.h
+t itkSimpleDataObjectDecorator.h
+t itkVectorContainer.h
+
+c itk::Array< #scalars >
+c itk::FixedArray< #scalars, #dims >
+c itk::FixedArray< float, 6 >
+c #{itk::CovariantVector;itk::Point;itk::Vector}< #float_types, #dims >
+c #{itk::RGBPixel;itk::RGBAPixel}< #scalars >
+c itk::Matrix< #float_types, #dims, #dims >
+c itk::SimpleDataObjectDecorator< #{#scalars;std::string} >
+c itk::SimpleDataObjectDecorator< std::vector< itk::Index< #{2;3} > > >
+c itk::SimpleDataObjectDecorator< std::vector< itk::Point< #float_types, #{2;3} > > >
+c itk::VectorContainer< unsigned long, itk::Point< #float_types, #dims > >
+
+d #scalars=#int_types;#uint_types;#float_types
+d #dims=1;2;3;4
--- /dev/null
+#include <cpPlugins_Base_Export.h>
+#include <cpPlugins_Config.h>
+
+#include <itkImageRegion.h>
+#include <itkPoint.h>
+#include <itkVector.h>
+
+#include <itkImageRegion.hxx>
+#include <itkPoint.hxx>
+#include <itkVector.hxx>
+
+// -------------------------------------------------------------------------
+#define cpPlugins_Base_extra_SimpleArray( V, D ) \
+ template cpPlugins_Base_EXPORT \
+ std::ostream& itk::operator<< < D >( \
+ std::ostream& a, itk::V< D > const& b \
+ )
+
+cpPlugins_Base_extra_SimpleArray( ImageRegion, 1 );
+cpPlugins_Base_extra_SimpleArray( ImageRegion, 2 );
+cpPlugins_Base_extra_SimpleArray( ImageRegion, 3 );
+cpPlugins_Base_extra_SimpleArray( ImageRegion, 4 );
+
+// -------------------------------------------------------------------------
+#define cpPlugins_Base_extra_Array( V, T, D ) \
+ template cpPlugins_Base_EXPORT \
+ std::ostream& itk::operator<< < T, D >( \
+ std::ostream& a, itk::V< T, D > const& b \
+ )
+
+cpPlugins_Base_extra_Array( Point, double, 1 );
+cpPlugins_Base_extra_Array( Point, double, 2 );
+cpPlugins_Base_extra_Array( Point, double, 3 );
+cpPlugins_Base_extra_Array( Point, double, 4 );
+
+cpPlugins_Base_extra_Array( Vector, double, 1 );
+cpPlugins_Base_extra_Array( Vector, double, 2 );
+cpPlugins_Base_extra_Array( Vector, double, 3 );
+cpPlugins_Base_extra_Array( Vector, double, 4 );
+
+// eof - $RCSfile$
--- /dev/null
+FILE(
+ GLOB libs_DEFS RELATIVE
+ "${CMAKE_CURRENT_SOURCE_DIR}"
+ "${CMAKE_CURRENT_SOURCE_DIR}/*.i"
+ )
+
+FOREACH(i ${libs_DEFS})
+ GET_FILENAME_COMPONENT(l_DEF ${i} NAME_WE)
+ SET(i_FILE "${CMAKE_CURRENT_SOURCE_DIR}/${l_DEF}.i")
+ SET(h_FILE "${CMAKE_CURRENT_BINARY_DIR}/${l_DEF}.h")
+ SET(s_FILE "${CMAKE_CURRENT_BINARY_DIR}/${l_DEF}.cxx")
+ SET(o_FILE "${CMAKE_CURRENT_SOURCE_DIR}/${l_DEF}_extra.cxx")
+ SET(l_NAME "cpPlugins_${l_DEF}")
+ ADD_CUSTOM_COMMAND(
+ OUTPUT ${h_FILE} ${s_FILE}
+ DEPENDS cpPlugins_CreateInstances ${i_FILE}
+ COMMAND cpPlugins_CreateInstances ${i_FILE} ${l_NAME} ${h_FILE} ${s_FILE}
+ )
+ IF(EXISTS ${o_FILE})
+ ADD_LIBRARY(${l_NAME} SHARED ${s_FILE} ${o_FILE})
+ ELSE(EXISTS ${o_FILE})
+ ADD_LIBRARY(${l_NAME} SHARED ${s_FILE})
+ ENDIF(EXISTS ${o_FILE})
+ SET_TARGET_PROPERTIES(
+ ${l_NAME} PROPERTIES
+ VERSION "${prj_VER}"
+ SOVERSION "${prj_sVER}"
+ )
+ GENERATE_EXPORT_HEADER(
+ ${l_NAME}
+ BASE_NAME ${l_NAME}
+ EXPORT_MACRO_NAME ${l_NAME}_EXPORT
+ EXPORT_FILE_NAME ${CMAKE_CURRENT_BINARY_DIR}/${l_NAME}_Export.h
+ STATIC_DEFINE ${l_NAME}_BUILT_AS_STATIC
+ )
+ENDFOREACH(i)
+
+## Target links
+TARGET_LINK_LIBRARIES(
+ cpPlugins_Base
+ ${ITK_LIBRARIES}
+ ${VTK_LIBRARIES}
+ )
+TARGET_LINK_LIBRARIES(
+ cpPlugins_Image
+ cpPlugins_Base
+ )
+TARGET_LINK_LIBRARIES(
+ cpPlugins_Mesh
+ cpPlugins_Base
+ )
+TARGET_LINK_LIBRARIES(
+ cpPlugins_ImageFiltersBase
+ cpPlugins_Image
+ )
+TARGET_LINK_LIBRARIES(
+ cpPlugins_ImageITK2VTK
+ cpPlugins_ImageFiltersBase
+ )
+TARGET_LINK_LIBRARIES(
+ cpPlugins_ImageIterators
+ cpPlugins_Image
+ )
+TARGET_LINK_LIBRARIES(
+ cpPlugins_ImageIO
+ cpPlugins_ImageFiltersBase
+ cpPlugins_ImageIterators
+ )
+TARGET_LINK_LIBRARIES(
+ cpPlugins_ThresholdFilters
+ cpPlugins_ImageFiltersBase
+ )
+TARGET_LINK_LIBRARIES(
+ cpPlugins_DistanceMapFilters
+ cpPlugins_ThresholdFilters
+ )
+
+# # ===================================
+# # = Integrate all source file names =
+# # ===================================
+
+# SET(
+# lib_HEADERS
+# ${lib_HEADERS_H}
+# ${lib_HEADERS_HPP}
+# ${lib_HEADERS_HXX}
+# )
+
+# SET(
+# lib_SOURCES
+# ${lib_SOURCES_C}
+# ${lib_SOURCES_CPP}
+# ${lib_SOURCES_CXX}
+# )
+
+# ## =====================
+# ## = Compilation rules =
+# ## =====================
+
+# ## ========================
+# ## == Installation rules ==
+# ## ========================
+
+# INSTALL(
+# TARGETS ${l_NAME}
+# RUNTIME DESTINATION bin
+# LIBRARY DESTINATION lib
+# ARCHIVE DESTINATION lib/static
+# )
+# INSTALL(
+# FILES
+# ${lib_HEADERS}
+# DESTINATION include/${lib_DIR}
+# )
+
+## eof - $RCSfile$
--- /dev/null
+f cpPlugins_Instances/ImageFiltersBase.h
+f cpPlugins_Instances/ImageIterators.h
+t itkSignedMaurerDistanceMapImageFilter.h
+
+c itk::SignedMaurerDistanceMapImageFilter< itk::Image< #scalars, #dims >, itk::Image< #float_types, #dims > >
+
+d #scalars=#int_types;#uint_types;#float_types
+d #dims=1;2;3;4
--- /dev/null
+f cpPlugins_Instances/Base.h
+i complex
+t itkImageRegion.h
+t itkImportImageContainer.h
+t itkImageBase.h
+t itkImage.h
+
+c itk::ImageRegion< #dims >
+c itk::ImportImageContainer< unsigned long, #{#scalars;#colors;#complex} >
+c itk::ImportImageContainer< unsigned long, #vectors< #float_types, #dims > >
+c itk::ImageBase< #dims >
+c itk::Image< #{#scalars;#colors;#complex}, #dims >
+c itk::Image< #vectors< #float_types, #dims >, #dims >
+
+d #scalars=#int_types;#uint_types;#float_types
+d #colors=itk::RGBPixel< #scalars >;itk::RGBAPixel< #scalars >
+d #complex=std::complex< #float_types >
+d #vectors=itk::CovariantVector;itk::Point;itk::Vector
+d #dims=1;2;3;4
--- /dev/null
+f cpPlugins_Instances/Image.h
+t itkImageSource.h
+t itkImageToImageFilter.h
+
+c itk::ImageSource< itk::Image< #{#scalars;#colors;#complex}, #dims > >
+c itk::ImageSource< itk::Image< #vectors< #float_types, #dims >, #dims > >
+
+d #scalars=#int_types;#uint_types;#float_types
+d #colors=itk::RGBPixel< #scalars >;itk::RGBAPixel< #scalars >
+d #complex=std::complex< #float_types >
+d #vectors=itk::CovariantVector;itk::Point;itk::Vector
+d #dims=1;2;3;4
--- /dev/null
+b #include <ITKIOImageBaseExport.h>
+b #undef ITKIOImageBase_HIDDEN
+b #define ITKIOImageBase_HIDDEN
+f cpPlugins_Instances/Image.h
+t itkImageFileReader.h
+t itkImageFileWriter.h
+t itkImageSeriesReader.h
+t itkConvertPixelBuffer.h
+t itkImageAlgorithm.h
+i itkImageIOFactory.h
+i itkGDCMSeriesFileNames.h
+
+c #{itk::ImageFileReader;itk::ImageFileWriter;itk::ImageSeriesReader}< itk::Image< #{#scalars;#colors;#complex}, #dims > >
+c #{itk::ImageFileReader;itk::ImageFileWriter;itk::ImageSeriesReader}< itk::Image< #vectors< #float_types, #dims >, #dims > >
+
+d #scalars=#int_types;#uint_types;#float_types
+d #colors=itk::RGBPixel< #scalars >;itk::RGBAPixel< #scalars >
+d #complex=std::complex< #float_types >
+d #vectors=itk::CovariantVector;itk::Point;itk::Vector
+d #dims=1;2;3;4
--- /dev/null
+f cpPlugins_Instances/Image.h
+t itkImageToVTKImageFilter.h
+t itkVTKImageToImageFilter.h
+t itkVTKImageExport.h
+t itkVTKImageImport.h
+
+c #filters< itk::Image< #{#scalars;#colors}, #dims > >
+c #filters< itk::Image< #vectors< #float_types, #dims >, #dims > >
+
+d #scalars=#int_types;#uint_types;#float_types
+d #colors=itk::RGBPixel< #scalars >;itk::RGBAPixel< #scalars >
+d #vectors=itk::CovariantVector;itk::Point;itk::Vector
+d #dims=2;3
+d #filters=itk::ImageToVTKImageFilter;itk::VTKImageToImageFilter
--- /dev/null
+b #define ITK_LEGACY_REMOVE
+f cpPlugins_Instances/Image.h
+t itkImageRegionConstIterator.h
+t itkImageRegionIterator.h
+t itkImageScanlineConstIterator.h
+t itkImageScanlineIterator.h
+
+c #iterators< itk::Image< #{#scalars;#colors;#complex}, #dims > >
+c #iterators< itk::Image< #vectors< #float_types, #dims >, #dims > >
+
+d #scalars=#int_types;#uint_types;#float_types
+d #colors=itk::RGBPixel< #scalars >;itk::RGBAPixel< #scalars >
+d #complex=std::complex< #float_types >
+d #vectors=itk::CovariantVector;itk::Point;itk::Vector
+d #dims=1;2;3;4
+d #iterators=itk::ImageRegionConstIterator;itk::ImageRegionIterator;itk::ImageScanlineConstIterator;itk::ImageScanlineIterator
\ No newline at end of file
--- /dev/null
+f cpPlugins_Instances/Base.h
+t itkMesh.h
+t itkPointSet.h
+t itkBoundingBox.h
+t itkMapContainer.h
+t itkVectorContainer.h
+
+c #{itk::PointSet;itk::Mesh}< #float_types, #dims >
+
+d #dims=2;3
--- /dev/null
+f cpPlugins_Instances/ImageFiltersBase.h
+t itkBinaryThresholdImageFilter.h
+
+c itk::BinaryThresholdImageFilter< itk::Image< #scalars, #dims >, itk::Image< #{unsigned char;#float_types}, #dims > >
+
+d #scalars=#int_types;#uint_types;#float_types
+d #dims=1;2;3;4
SUBDIRS(
cpPluginsIO
- cpPluginsImageFilters
- cpPluginsMeshFilters
- cpPluginsImageMeshFilters
- cpPluginsVisualization
cpPluginsWidgets
)
## = Source code =
## ===============
-FILE(GLOB lib_HEADERS_H "*.h")
-FILE(GLOB lib_HEADERS_HPP "*.hpp")
-FILE(GLOB lib_HEADERS_HXX "*.hxx")
-FILE(GLOB lib_SOURCES_C "*.c")
-FILE(GLOB lib_SOURCES_CPP "*.cpp")
-FILE(GLOB lib_SOURCES_CXX "*.cxx")
+FILE(GLOB lib_HEADERS_H "${CMAKE_CURRENT_SOURCE_DIR}/*.h")
+FILE(GLOB lib_HEADERS_HPP "${CMAKE_CURRENT_SOURCE_DIR}/*.hpp")
+FILE(GLOB lib_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx")
+FILE(GLOB lib_SOURCES_C "${CMAKE_CURRENT_SOURCE_DIR}/*.c")
+FILE(GLOB lib_SOURCES_CPP "${CMAKE_CURRENT_SOURCE_DIR}/*.cpp")
+FILE(GLOB lib_SOURCES_CXX "${CMAKE_CURRENT_SOURCE_DIR}/*.cxx")
# ===================================
# = Integrate all source file names =
# ===================================
+SET(
+ lib_HOST
+ ${CMAKE_CURRENT_BINARY_DIR}/${lib_NAME}_Host.cxx
+ )
+
SET(
lib_HEADERS
${lib_HEADERS_H}
## =====================
ADD_CUSTOM_COMMAND(
- OUTPUT ${lib_NAME}_Host.cxx
+ OUTPUT ${lib_HOST}
DEPENDS cpPlugins_HostCreator ${LIB_HEADERS_H}
- COMMAND cpPlugins_HostCreator ${lib_NAME}_Host.cxx ${lib_HEADERS_H}
+ COMMAND cpPlugins_HostCreator ${lib_HOST} ${lib_HEADERS_H}
)
-ADD_LIBRARY(${lib_NAME} SHARED ${lib_NAME}_Host.cxx ${lib_SOURCES})
+ADD_LIBRARY(${lib_NAME} SHARED ${lib_HOST} ${lib_SOURCES})
SET_TARGET_PROPERTIES(
${lib_NAME} PROPERTIES
VERSION "${prj_VER}"
#include <QVBoxLayout>
#include <cpPlugins/ParametersQtDialog.h>
-
-#include <itkGDCMSeriesFileNames.h>
+#include <cpPlugins_Instances/ImageIO.h>
/**
*/
#include <cpPluginsIO/ImageReader.h>
#include <cpPlugins/Image.h>
-
-#include <itkImageFileReader.h>
-#include <itkImageSeriesReader.h>
-#include <itkImageFileReader.hxx>
-#include <itkImageSeriesReader.hxx>
-#include <itkImageAlgorithm.hxx>
+#include <cpPlugins_Instances/ImageIO.h>
// -------------------------------------------------------------------------
cpPluginsIO::ImageReader::
#include <cpPluginsIO/ImageWriter.h>
#include <cpPlugins/Image.h>
-
-#include <itkImageFileWriter.h>
-#include <itkImageFileWriter.hxx>
-#include <itkImageAlgorithm.hxx>
+#include <cpPlugins_Instances/ImageIO.h>
// -------------------------------------------------------------------------
cpPluginsIO::ImageWriter::
std::string cpPluginsIO::ImageWriter::
_GD1( _TInput* image )
{
+ typedef itk::ImageFileWriter< _TInput > _TFilter;
+
if( image == NULL )
return( "IO::ImageWriter: Invalid pixel type." );
- auto f = this->_CreateITK< itk::ImageFileWriter< _TInput > >( );
+ auto f = this->_CreateITK< _TFilter >( );
f->SetFileName( this->m_Parameters.GetSaveFileName( "FileName" ) );
f->SetInput( image );
f->Update( );