]> Creatis software - cpPlugins.git/commitdiff
More macos issues...
authorLeonardo Florez-Valencia <florez-l@javeriana.edu.co>
Sun, 10 Apr 2016 03:52:52 +0000 (22:52 -0500)
committerLeonardo Florez-Valencia <florez-l@javeriana.edu.co>
Sun, 10 Apr 2016 03:52:52 +0000 (22:52 -0500)
46 files changed:
CMakeLists.txt
appli/bash/CMakeLists.txt
appli/bash/cpPlugins_CreateInstances.cxx
cmake/CMakeLists.txt
cmake/cpPluginsConfig.cmake.in
lib/cpPlugins/CMakeLists.txt
lib/cpPlugins_Config.h
lib/cpPlugins_Instances/Base.i [deleted file]
lib/cpPlugins_Instances/BaseObjects.i [new file with mode: 0644]
lib/cpPlugins_Instances/BaseObjects_extra.cxx [new file with mode: 0644]
lib/cpPlugins_Instances/Base_extra.cxx [deleted file]
lib/cpPlugins_Instances/CMakeLists.txt
lib/cpPlugins_Instances/ColorImages.i [new file with mode: 0644]
lib/cpPlugins_Instances/ColorPixels.i [new file with mode: 0644]
lib/cpPlugins_Instances/Decorators.i [new file with mode: 0644]
lib/cpPlugins_Instances/DistanceMapFilters.i
lib/cpPlugins_Instances/GaussianImageFilters.i
lib/cpPlugins_Instances/Image.i [deleted file]
lib/cpPlugins_Instances/ImageFiltersBase.i [deleted file]
lib/cpPlugins_Instances/ImageIO.i [deleted file]
lib/cpPlugins_Instances/ImageITK2VTK.i
lib/cpPlugins_Instances/ImageIterators.i [deleted file]
lib/cpPlugins_Instances/ImageMeshFilters.i
lib/cpPlugins_Instances/ImagesIO.i [new file with mode: 0644]
lib/cpPlugins_Instances/InPlaceImageFiltersBase.i [deleted file]
lib/cpPlugins_Instances/Mesh.i
lib/cpPlugins_Instances/NeighborhoodIterators.i [new file with mode: 0644]
lib/cpPlugins_Instances/Paths.i
lib/cpPlugins_Instances/ResamplingFilters.i
lib/cpPlugins_Instances/ScalarImages.i [new file with mode: 0644]
lib/cpPlugins_Instances/ScalarImagesBaseFilters.i [new file with mode: 0644]
lib/cpPlugins_Instances/ScalarVectorImagesBaseFilters.i [new file with mode: 0644]
lib/cpPlugins_Instances/ThresholdFilters.i
lib/cpPlugins_Instances/Transforms.i
lib/cpPlugins_Instances/VectorImages.i [new file with mode: 0644]
plugins/cpPluginsIO/CMakeLists.txt
plugins/cpPluginsIO/DicomSeriesReader.cxx
plugins/cpPluginsIO/ImageReader.cxx
plugins/cpPluginsIO/ImageWriter.cxx
plugins/cpPluginsImageFilters/CMakeLists.txt
plugins/cpPluginsImageMeshFilters/CMakeLists.txt
plugins/cpPluginsMeshFilters/CMakeLists.txt
plugins/cpPluginsWidgets/CMakeLists.txt
third_party_installers/cpPlugins_Install_ITK.sh [new file with mode: 0755]
third_party_installers/cpPlugins_Install_QT4.sh [new file with mode: 0755]
third_party_installers/cpPlugins_Install_VTK.sh [new file with mode: 0755]

index fc58dd71f2819d768ce91e76c83688655d944d93..7a6b789897cf756c5f3b962d3cf7a497c457011e 100644 (file)
@@ -1,9 +1,9 @@
 CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
 INCLUDE(cmake/cpPlugins_Policies.cmake)
 
-## ================
-## = Project name =
-## ================
+## ==================
+## == Project name ==
+## ==================
 
 PROJECT(cpPlugins)
 SET(prj_MAJ_VER "0")
@@ -12,23 +12,23 @@ SET(prj_REL_VER "0")
 SET(prj_VER "${prj_MAJ_VER}.${prj_MIN_VER}.${prj_REL_VER}")
 SET(prj_sVER "${prj_MAJ_VER}")
 
-## ===========
-## = Options =
-## ===========
+## =============
+## == Options ==
+## =============
 
 OPTION(BUILD_EXAMPLES "Build examples" OFF)
 
-## ========================
-## = Packages and options =
-## ========================
+## ==========================
+## == Packages and options ==
+## ==========================
 
 INCLUDE(cmake/cpPlugins_Options.cmake)
 INCLUDE(cmake/cpPlugins_KitwareTools.cmake)
 INCLUDE(cmake/cpPlugins_Qt4Tools.cmake)
 
-## =======================
-## = Include directories =
-## =======================
+## =========================
+## == Include directories ==
+## =========================
 
 INCLUDE_DIRECTORIES(
   ${PROJECT_SOURCE_DIR}
@@ -47,9 +47,9 @@ INCLUDE_DIRECTORIES(
   ${PROJECT_BINARY_DIR}/lib/ItkVtkGlue
   )
 
-## ===========================
-## = Subdirs containing code =
-## ===========================
+## =============================
+## == Subdirs containing code ==
+## =============================
 
 SUBDIRS(
   cmake
index 7d9154ca54ccf8fcb49076c81e52fabbc41e80fc..a4988506ca4edcbaa6dd691c540b5a94c8b0941a 100644 (file)
@@ -1,17 +1,36 @@
-SET(
-  bash_SOURCES
-  cpPlugins_HostCreator
-  cpPlugins_CreateInstances
+## ============================
+## == Configure source files ==
+## ============================
+
+FILE(
+  GLOB all_SOURCE_CXX_FILES RELATIVE
+  "${CMAKE_CURRENT_SOURCE_DIR}"
+  "${CMAKE_CURRENT_SOURCE_DIR}/*.cxx"
   )
 
-FOREACH(program ${bash_SOURCES})
-  ADD_EXECUTABLE(${program} ${program}.cxx)
+## ==========================
+## == Compile source files ==
+## ==========================
+
+FOREACH(source ${all_SOURCE_CXX_FILES})
+  GET_FILENAME_COMPONENT(name ${source} NAME_WE)
+  ADD_EXECUTABLE(${name} ${source})
   INSTALL(
-    TARGETS ${program}
+    TARGETS ${name}
     RUNTIME DESTINATION bin
     LIBRARY DESTINATION lib
     ARCHIVE DESTINATION lib/static
     )
-ENDFOREACH(program)
+ENDFOREACH(source)
+
+## =============================
+## == Create global variables ==
+## =============================
+
+SET(
+  cpPluginsInstances_APP
+  ${PROJECT_BINARY_DIR}/cpPlugins_CreateInstances
+  CACHE INTERNAL "Target location"
+  )
 
 ## eof - $RCSfile$
index 6dccd2b5a36f6e7dbbd8cde275681fc7d38a0583..a286d9311d1737034fe37feb8efe92fecbf926be 100644 (file)
@@ -1,33 +1,19 @@
-#include <fstream>
-#include <iostream>
-
-#include <algorithm>
-#include <cstring>
+#include <cpPlugins_Config.h>
 #include <map>
 #include <vector>
 #include <sstream>
 
-#if defined( WIN32 ) || defined( _WIN32 ) || defined( __WIN32__ )
-#  define cpPlugins_STRTOK( A, B, N ) strtok_s( A, B, N )
-#else // defined( WIN32 ) || defined( _WIN32 ) || defined( __WIN32__ )
-#  define cpPlugins_STRTOK( A, B, N ) std::strtok( A, B )
-#endif // defined( WIN32 ) || defined( _WIN32 ) || defined( __WIN32__ )
-
 // -------------------------------------------------------------------------
 typedef std::vector< std::string >      TLines;
 typedef std::map< char, TLines >        TParsedLines;
 typedef std::map< std::string, TLines > TVariables;
 
 // -------------------------------------------------------------------------
-bool cpPlugins_ISBLANK( const char& value );
-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, const TVariables& vars );
-void ExpandVariables( TLines& res, const TLines& lines, const TVariables& vars );
-void ParseIncludes( TLines& res, const TLines& lines, const std::string& ext = "" );
+void ExpandGroups( TLines& res, const TLines& lines );
+void ExpandDefinitions(
+  TLines& res, const TLines& lines, const TVariables& vars
+  );
 void PrintLines(
   const std::string& prefix, const std::string& suffix,
   const TLines& lines, std::ostream& out
@@ -62,11 +48,12 @@ int main( int argc, char* argv[] )
 
   } // fi
 
-  // Expand variable definitions
+  // Expand definitions
   TVariables vars;
   for( auto dIt = lines[ 'd' ].begin( ); dIt != lines[ 'd' ].end( ); ++dIt )
   {
-    auto tokens = Tokenize( *dIt, "=;" );
+    TLines tokens;
+    cpPlugins::TokenizeString( tokens, *dIt, "=;" );
     auto tIt = tokens.begin( );
     auto vName = *tIt;
     tIt++;
@@ -74,27 +61,26 @@ int main( int argc, char* argv[] )
       vars[ vName ].push_back( *tIt );
 
     TLines res;
-    ExpandVariables( res, vars[ vName ], vars );
+    ExpandDefinitions( res, vars[ vName ], vars );
     vars[ vName ] = res;
 
   } // rof
 
-  // First include section
-  TLines first_includes, normal_includes, template_includes, template_sources;
-  ParseIncludes( first_includes, lines[ 'f' ] );
-  ParseIncludes( normal_includes, lines[ 'i' ] );
-  ParseIncludes( template_includes, lines[ 't' ] );
-  ParseIncludes( template_sources, lines[ 't' ], "xx" );
-
   // Expand groups
-  TLines pre_classes;
-  ExpandGroups( pre_classes, lines[ 'c' ], vars );
-
-  // Expand variables
-  TLines real_classes;
-  ExpandVariables( real_classes, pre_classes, vars );
-
-  // Prepare header file
+  TLines f_includes_groups, includes_groups, templates_groups, classes_groups;
+  ExpandGroups( f_includes_groups, lines[ 'f' ] );
+  ExpandGroups( includes_groups, lines[ 'i' ] );
+  ExpandGroups( templates_groups, lines[ 't' ] );
+  ExpandGroups( classes_groups, lines[ 'c' ] );
+
+  // Expand definitions
+  TLines f_includes_list, includes_list, templates_list, classes_list;
+  ExpandDefinitions( f_includes_list, f_includes_groups, vars );
+  ExpandDefinitions( includes_list, includes_groups, vars );
+  ExpandDefinitions( templates_list, templates_groups, vars );
+  ExpandDefinitions( classes_list, classes_groups, vars );
+
+  // Write header file
   std::ofstream header_file( header_file_fname.c_str( ) );
   if( !header_file )
   {
@@ -113,7 +99,7 @@ int main( int argc, char* argv[] )
     << "#include <" << library_name << "_Export.h>" << std::endl << std::endl;
   PrintLines( "", "", lines[ 'b' ], header_file );
   header_file << std::endl;
-  PrintLines( "", "", first_includes, header_file );
+  PrintLines( "#include <", ">", f_includes_list, header_file );
   header_file
     << "#ifdef " << library_name << "_EXPORTS" << std::endl
     << "#  define " << library_name << "_PREFIX template class "
@@ -122,16 +108,16 @@ int main( int argc, char* argv[] )
     << "#  define " << library_name
     << "_PREFIX extern template class" << std::endl
     << "#endif // "
-    << library_name << "_EXPORTS" << std::endl;
-  PrintLines( "", "", normal_includes, header_file );
-  PrintLines( "", "", template_includes, header_file );
+    << library_name << "_EXPORTS" << std::endl << std::endl;
+  PrintLines( "#include <", ">", includes_list, header_file );
+  PrintLines( "#include <", ">", templates_list, header_file );
   header_file
     << std::endl << "#ifdef " << library_name << "_EXPORTS" << std::endl;
-  PrintLines( "", "", template_sources, header_file );
-  header_file << "#endif // " << library_name << "_EXPORTS" << std::endl;
-  header_file << std::endl;
+  PrintLines( "#include <", "xx>", templates_list, header_file );
+  header_file
+    << "#endif // " << library_name << "_EXPORTS" << std::endl << std::endl;
   PrintLines(
-    library_name + std::string( "_PREFIX " ), ";", real_classes, header_file
+    library_name + std::string( "_PREFIX " ), ";", classes_list, header_file
     );
   header_file
     << std::endl << "#endif // __" << library_name << "__H__" << std::endl;
@@ -149,134 +135,87 @@ int main( int argc, char* argv[] )
   source_file
     << "#include \"" << header_file_fname << "\"" << std::endl;
   source_file.close( );
-  return( 0 );
-}
 
-// -------------------------------------------------------------------------
-bool cpPlugins_ISBLANK( const char& value )
-{
-  return( value == ' ' || value == '\t' || value == '\n' || value == '\r' );
-}
-
-// -------------------------------------------------------------------------
-TLines Tokenize( const std::string& str, const std::string& delims )
-{
-  TLines tokens;
-  if( str.size( ) > 0 )
-  {
-    auto ssize = str.size( );
-    char* buffer = new char[ ssize + 1 ];
-    for( unsigned long i = 0; i < ssize; ++i )
-      buffer[ i ] = str[ i ];
-    buffer[ ssize ] = '\0';
-    char* next;
-    char* it = cpPlugins_STRTOK( buffer, delims.c_str( ), &next );
-    while( it != NULL )
-    {
-      tokens.push_back( std::string( it ) );
-      it = cpPlugins_STRTOK( NULL, delims.c_str( ), &next );
-
-    } // elihw
-    delete [] buffer;
-
-  } // fi
-  return( tokens );
-}
-
-// -------------------------------------------------------------------------
-std::string Replace(
-  const std::string& str, const std::string& sub, const std::string& nsub
-  )
-{
-  std::string res = str;
-  size_t index;
-  while( ( index = res.find( sub ) ) != std::string::npos )
-    res.replace( index, sub.size( ), nsub );
-  return( res );
+  return( 0 );
 }
 
 // -------------------------------------------------------------------------
 bool ReadFile( TParsedLines& lines, const std::string& fname )
 {
-  // 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( ( unsigned int )( 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 ) )
+  if( cpPlugins::ReadFileIntoString( buffer, fname ) )
   {
-    auto cmd_pos = line.end( );
-    auto arg_pos = line.end( );
-    auto lIt = line.begin( );
-    while( lIt != line.end( ) )
+    std::istringstream input_stream( buffer );
+
+    // Read line by line
+    std::string line;
+    while( std::getline( input_stream, line ) )
     {
-      if( !cpPlugins_ISBLANK( *lIt ) )
+      auto cmd_pos = line.end( );
+      auto arg_pos = line.end( );
+      auto lIt = line.begin( );
+      while( lIt != line.end( ) )
       {
-        if( cmd_pos == line.end( ) )
+        if( !cpPlugins::IsBlank( *lIt ) )
         {
-          cmd_pos = lIt;
-          ++lIt;
+          if( cmd_pos == line.end( ) )
+          {
+            cmd_pos = lIt;
+            ++lIt;
+          }
+          else if( arg_pos == line.end( ) )
+          {
+            arg_pos = lIt;
+            lIt = line.end( );
+
+          } // fi
         }
-        else if( arg_pos == line.end( ) )
-        {
-          arg_pos = lIt;
-          lIt = line.end( );
+        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 );
 
-        } // 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 );
+    return( true );
+  }
+  else
+    return( false );
 }
 
 // -------------------------------------------------------------------------
-void ExpandGroups( TLines& res, const TLines& lines, const TVariables& vars )
+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 )
+      unsigned int braces_count = 1;
+      auto e_pos = b_pos;
+      e_pos += 2;
+      while( braces_count != 0 && e_pos < lIt->size( ) )
       {
-        auto vIt = vars.find( *tIt );
-        if( vIt != vars.end( ) )
-        {
-          auto wIt = vIt->second.begin( );
-          std::string values = *wIt;
-          for( wIt++; wIt != vIt->second.end( ); ++wIt )
-            values += ";" + *wIt;
-          *tIt = Replace( *lIt, vIt->first, values );
-        }
-        else
-          *tIt = lIt->substr( 0, b_pos ) + *tIt + lIt->substr( e_pos + 1 );
+        auto v = ( *lIt )[ e_pos ];
+        braces_count += ( v == '{' )? 1: ( ( v == '}' )? -1: 0 );
+        e_pos++;
+
+      } // elihw
+      if( braces_count == 0 )
+      {
+        auto replace = lIt->substr( b_pos, e_pos - b_pos );
+        auto expansion = replace.substr( 2, replace.size( ) - 3 );
+        TLines tokens;
+        cpPlugins::TokenizeString( tokens, expansion, ";" );
+        for( auto tIt = tokens.begin( ); tIt != tokens.end( ); ++tIt )
+          *tIt = cpPlugins::ReplaceString( *lIt, replace, *tIt );
+        ExpandGroups( res, tokens );
 
-      } // rof
-      ExpandGroups( res, tokens, vars );
+      } // fi
     }
     else
       res.push_back( *lIt );
@@ -285,14 +224,19 @@ void ExpandGroups( TLines& res, const TLines& lines, const TVariables& vars )
 }
 
 // -------------------------------------------------------------------------
-void ExpandVariables( TLines& res, const TLines& lines, const TVariables& vars )
+void ExpandDefinitions(
+  TLines& res, const TLines& lines, const TVariables& vars
+  )
 {
+  std::string seps = " ,;:{}[]()\"$&<>*.";
+
   for( auto lIt = lines.begin( ); lIt != lines.end( ); ++lIt )
   {
     auto b_pos = lIt->find( "#" );
     if( b_pos != std::string::npos )
     {
-      auto tokens = Tokenize( lIt->substr( b_pos ), " ,;:{}[]()\"$&<>*" );
+      TLines tokens;
+      cpPlugins::TokenizeString( tokens, lIt->substr( b_pos ), seps );
       std::string cmd = tokens[ 0 ];
       auto vIt = vars.find( cmd );
       if( vIt != vars.end( ) )
@@ -300,29 +244,26 @@ void ExpandVariables( TLines& res, const TLines& lines, const TVariables& vars )
         if( vIt->second.size( ) > 0 )
         {
           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 );
+          for(
+            auto wIt = vIt->second.begin( ); wIt != vIt->second.end( ); ++wIt
+            )
+            new_res.push_back( cpPlugins::ReplaceString( *lIt, cmd, *wIt ) );
+          ExpandDefinitions( res, new_res, vars );
 
         } // fi
 
       } // fi
     }
     else
-      res.push_back( *lIt );
+      res.push_back(
+        cpPlugins::ReplaceString(
+          cpPlugins::ReplaceString( *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,
index 7db97e9d701a2f1d8db503b199919175a0dca6ac..bd309baa708b7b49b147a72524b81a83ec8e887e 100644 (file)
@@ -1,3 +1,13 @@
+## ============================
+## == Configure source files ==
+## ============================
+
+FILE(GLOB all_CMAKE_FILES "${CMAKE_CURRENT_SOURCE_DIR}/*.cmake" )
+
+## =====================
+## == Configure files ==
+## =====================
+
 CONFIGURE_FILE(
   cpPluginsConfig.cmake.in
   ${PROJECT_BINARY_DIR}/cpPluginsConfig.cmake
@@ -5,13 +15,10 @@ CONFIGURE_FILE(
   )
 
 ## ========================
-## -- Installation rules --
+## == Installation rules ==
 ## ========================
 
-INSTALL(
-  FILES
-  ${PROJECT_BINARY_DIR}/cpPluginsConfig.cmake
-  DESTINATION share/cmake
-  )
+INSTALL(FILES ${PROJECT_BINARY_DIR}/cpPluginsConfig.cmake DESTINATION share/cmake)
+INSTALL(FILES ${all_CMAKE_FILES} DESTINATION share/cmake)
 
 ## eof - $RCSfile$
index b612b9d0e68b43277f6fee7678b99dff90083b5e..a07c54cb2c4ba13a9e73605b5e3e79c713ddde60 100644 (file)
@@ -1,11 +1,11 @@
 # ===================================
-# -- Some configurations variables --
+# == Some configurations variables ==
 # ===================================
 
 SET(USE_QT4 "@QT4_FOUND@")
 
 # =======================
-# -- Find dependencies --
+# == Find dependencies ==
 # =======================
 
 # Find ITK and VTK
@@ -17,7 +17,7 @@ SET(VTK_DIR @VTK_DIR@)
 FIND_PACKAGE(VTK REQUIRED)
 INCLUDE(${VTK_USE_FILE})
 
-# Do not use itk-vtk glue --> problems ahead!!!
+# Do not use itk-vtk glue ==> problems ahead!!!
 IF(ITKVtkGlue_LOADED)
   MESSAGE(FATAL_ERROR "ITKVtkGlue module is available. Please re-compile your ITK without it. It could lead to nasty compilation problems... Just waiting for Kitware to solve it.")
 ENDIF(ITKVtkGlue_LOADED)
@@ -45,7 +45,7 @@ ENDIF(USE_QT4 EQUAL "1")
 
 
 # =========================
-# -- Include directories --
+# == Include directories ==
 # =========================
 
 INCLUDE_DIRECTORIES(
@@ -69,7 +69,7 @@ INCLUDE_DIRECTORIES(
   )
 
 # =========================
-# -- Library directories --
+# == Library directories ==
 # =========================
 
 IF(MSVC)
@@ -87,17 +87,16 @@ ELSE(MSVC)
 ENDIF(MSVC)
 
 # ===================
-# -- Library names --
+# == Library names ==
 # ===================
 
 SET(cpExtensions_LIBRARY cpExtensions)
 SET(cpPlugins_tinyxml2_LIBRARY cpPlugins_tinyxml2)
-SET(cpPlugins_ALL_INSTANCES_LIBRARIES "@cpPlugins_ALL_INSTANCES@")
-SET(cpPlugins_LIBRARY cpPlugins)
 SET(cpPipelineEditor_LIBRARY cpPipelineEditor)
+SET(cpPlugins_LIBRARIES "@cpPlugins_LIBRARIES@;cpPlugins")
 
 # ======================
-# -- Executable names --
+# == Executable names ==
 # ======================
 SET(
   exec_PROGRAMS
index 971707f2265053936e9f23b94f606454ad00c38d..abf5082506d591b2fa37e626b19186b4a04df673 100644 (file)
@@ -83,7 +83,7 @@ SET(
 
 SET(
   target_LIBRARIES
-  ${cpPlugins_ALL_INSTANCES}
+  ${cpPlugins_LIBRARIES}
   cpPlugins_tinyxml2
   )
 IF(NOT WIN32)
index 84314e886c2e40469e28e789235d3b943cae1055..7a228b10b10ee6de452118e7badb7e00330d685c 100644 (file)
 #ifndef __CPPLUGINS_CONFIG__H__
 #define __CPPLUGINS_CONFIG__H__
 
+/*
+ * =========================================================================
+ * ITK related macros
+ * =========================================================================
+ */
 #include <itkMacro.h>
-
 #define ITK_MANUAL_INSTANTIATION
-
 #ifndef ITK_DELETE_FUNCTION
 #  define ITK_DELETE_FUNCTION
 #endif // ITK_DELETE_FUNCTION
-
 #ifndef ITK_OVERRIDE
 #  define ITK_OVERRIDE
 #endif // ITK_OVERRIDE
 
+/*
+ * =========================================================================
+ * Identify OS
+ * =========================================================================
+ */
+#if defined( WIN32 ) || defined( _WIN32 ) || defined( __WIN32__ )
+#  define cpPlugins_SYS_WINDOWS
+#  define cpPlugins_LIB_PREFIX ""
+#  define cpPlugins_LIB_EXT "dll"
+#  ifndef WIN32_LEAN_AND_MEAN
+#    define WIN32_LEAN_AND_MEAN
+#  endif
+#  define NOMINMAX
+#  include <windows.h>
+#  include <tchar.h>
+#elif defined( linux ) || defined( __linux )
+#  define cpPlugins_SYS_LINUX
+#  define cpPlugins_LIB_PREFIX "lib"
+#  define cpPlugins_LIB_EXT "so"
+#elif defined( __APPLE__ ) || defined( MACOSX ) || defined( macintosh ) || defined( Macintosh )
+#  define cpPlugins_SYS_MACOS
+#  define cpPlugins_LIB_PREFIX "lib"
+#  define cpPlugins_LIB_EXT "dylib"
+#elif defined( __FreeBSD__ ) || defined( __FreeBSD_kernel__ )
+#  define cpPlugins_SYS_FREEBSD
+#  define cpPlugins_LIB_PREFIX "lib"
+#  define cpPlugins_LIB_EXT "so"
+#else
+#  error "This operating system is not supported by cpPlugins"
+#endif
+
+/*
+ * =========================================================================
+ * Some helper functions
+ * =========================================================================
+ */
+
+#include <cstring>
+#include <fstream>
+#include <iostream>
+#include <string>
+
+#ifdef cpPlugins_SYS_WINDOWS
+#  define cpPlugins_STRTOK( A, B, N ) strtok_s( A, B, N )
+#else // cpPlugins_SYS_WINDOWS
+#  define cpPlugins_STRTOK( A, B, N ) std::strtok( A, B )
+#endif // cpPlugins_SYS_WINDOWS
+
+namespace cpPlugins
+{
+  struct IsSeparator
+  {
+    // ---------------------------------------------------------------------
+    inline bool operator()( char c ) const
+      {
+#ifdef cpPlugins_SYS_WINDOWS
+        return( c == '\\' || c == '/' );
+#else // cpPlugins_SYS_WINDOWS
+        return( c == '/' );
+#endif // cpPlugins_SYS_WINDOWS
+      }
+  };
+
+  // -----------------------------------------------------------------------
+  inline bool IsBlank( const char& value )
+  {
+    return( value == ' ' || value == '\t' || value == '\n' || value == '\r' );
+  }
+
+  // -----------------------------------------------------------------------
+  template< class _TTokens >
+  inline void TokenizeString(
+    _TTokens& tokens, const std::string& str, const std::string& delims
+    )
+  {
+    tokens.clear( );
+    if( str.size( ) > 0 )
+    {
+      auto ssize = str.size( );
+      char* buffer = new char[ ssize + 1 ];
+      for( unsigned long i = 0; i < ssize; ++i )
+        buffer[ i ] = str[ i ];
+      buffer[ ssize ] = '\0';
+      char* next;
+      char* it = cpPlugins_STRTOK( buffer, delims.c_str( ), &next );
+      while( it != NULL )
+      {
+        tokens.push_back( std::string( it ) );
+        it = cpPlugins_STRTOK( NULL, delims.c_str( ), &next );
+
+      } // elihw
+      delete [] buffer;
+
+    } // fi
+  }
+
+  // -----------------------------------------------------------------------
+  inline std::string ReplaceString(
+    const std::string& str, const std::string& sub, const std::string& nsub
+    )
+  {
+    std::string res = str;
+    size_t index;
+    while( ( index = res.find( sub ) ) != std::string::npos )
+      res.replace( index, sub.size( ), nsub );
+    return( res );
+  }
+
+  // -----------------------------------------------------------------------
+  inline bool ReadFileIntoString( std::string& buffer, const std::string& fname )
+  {
+    buffer = "";
+    std::ifstream file_stream( fname.c_str( ) );
+    if( !file_stream )
+      return( false );
+    file_stream.seekg( 0, std::ios::end );
+    buffer.reserve( ( unsigned int )( 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( );
+    return( true );
+  }
+
+  // -----------------------------------------------------------------------
+  inline std::string CanonicalPath( const std::string& path )
+  {
+    std::string ret = "";
+#ifdef cpPlugins_SYS_WINDOWS
+    TCHAR  buffer[ 4096 ] = TEXT( "" );
+    TCHAR** lppPart = { NULL };
+    GetFullPathName( path.c_str( ), 4096, buffer, lppPart );
+    ret = std::string( buffer );
+#else // cpPlugins_SYS_WINDOWS
+    char* canonical_path = realpath( path.c_str( ), NULL );
+    if( canonical_path != NULL )
+    {
+      ret = canonical_path;
+      free( canonical_path );
+
+    } // fi
+#endif // cpPlugins_SYS_WINDOWS
+    return( ret );
+  }
+
+} // ecapseman
+
 #endif // __CPPLUGINS_CONFIG__H__
 
 // eof - $RCSfile$
diff --git a/lib/cpPlugins_Instances/Base.i b/lib/cpPlugins_Instances/Base.i
deleted file mode 100644 (file)
index bbd88c4..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-f cpPlugins_Config.h
-
-t itkArray.h
-t itkArray2D.h
-t itkBoundingBox.h
-t itkCovariantVector.h
-t itkDiffusionTensor3D.h
-t itkFixedArray.h
-t itkMatrix.h
-t itkPoint.h
-t itkRGBPixel.h
-t itkRGBAPixel.h
-t itkSimpleDataObjectDecorator.h
-t itkSymmetricEigenAnalysis.h
-t itkSymmetricSecondRankTensor.h
-t itkVariableLengthVector.h
-t itkVector.h
-t itkVectorContainer.h
-
-d #dims=1;2;3
-d #int=char;short;int;long
-d #float=float;double
-d #scalar=#int;unsigned #int;#float
-d #color_pixels=itk::RGBPixel< #scalar >;itk::RGBAPixel< #scalar >
-d #lin_alg_vectors=itk::CovariantVector;itk::Point;itk::Vector
-
-c @{itk::Array;itk::Array2D;itk::VariableLengthVector}< #scalar >
-c itk::FixedArray< #scalar, #dims >
-c itk::FixedArray< #scalar, @{4;6} >
-c #color_pixels
-c #lin_alg_vectors< #float, #dims >
-c itk::Matrix< #float, #dims, #dims >
-c itk::SymmetricEigenAnalysis< itk::Matrix< #float, #dims, #dims >, itk::FixedArray< #float, #dims >, itk::Matrix< #float, #dims, #dims > >
-c itk::SymmetricSecondRankTensor< #float, #dims >
-c itk::DiffusionTensor3D< #float >
-c itk::VectorContainer< unsigned long, itk::Point< #float, #dims > >
-c itk::BoundingBox< unsigned long, #dims, #float, itk::VectorContainer< unsigned long, itk::Point< #float, #dims > > >
-c itk::SimpleDataObjectDecorator< #lin_alg_vectors< #float, #dims > >
diff --git a/lib/cpPlugins_Instances/BaseObjects.i b/lib/cpPlugins_Instances/BaseObjects.i
new file mode 100644 (file)
index 0000000..fb7b4d4
--- /dev/null
@@ -0,0 +1,27 @@
+d #itk_objs=FixedArray;CovariantVector;Point;Vector;Matrix;SymmetricSecondRankTensor;DiffusionTensor3D
+d #ints=char;short;int;long
+d #uints=unsigned #ints
+d #floats=float;double
+d #dims=1;2;3;4
+d #pixels=#ints;#uints;#floats
+
+t itk#itk_objs.h
+t itkArray.h
+t itkArray2D.h
+t itkSymmetricEigenAnalysis.h
+t itkSimpleDataObjectDecorator.h
+t itkVariableLengthVector.h
+t itkVectorContainer.h
+
+c itk::Array< #pixels >
+c itk::@{Array2D;VariableLengthVector}< #floats >
+c itk::FixedArray< #pixels, #dims >
+c itk::FixedArray< #floats, @{6;10} >
+c itk::@{CovariantVector;Point;Vector;SymmetricSecondRankTensor}< #floats, #dims >
+c itk::DiffusionTensor3D< #floats >
+c itk::Matrix< #floats, #dims, #dims >
+c itk::SimpleDataObjectDecorator< itk::@{CovariantVector;Point;Vector}< #floats, #dims > >
+c itk::SimpleDataObjectDecorator< itk::Matrix< #floats, #dims, #dims > >
+c itk::VectorContainer< unsigned long, itk::Point< #floats, #dims > >
+
+* eof - $RCSfile$
diff --git a/lib/cpPlugins_Instances/BaseObjects_extra.cxx b/lib/cpPlugins_Instances/BaseObjects_extra.cxx
new file mode 100644 (file)
index 0000000..aeaaaad
--- /dev/null
@@ -0,0 +1,71 @@
+#include <cpPlugins_Instances_BaseObjects_Export.h>
+#include <cpPlugins_Instances/BaseObjects.h>
+
+/*
+  #include <itkImageRegion.h>
+  #include <itkFixedArray.h>
+  #include <itkPoint.h>
+  #include <itkVariableLengthVector.h>
+  #include <itkVector.h>
+
+  #include <itkImageRegion.hxx>
+  #include <itkFixedArray.hxx>
+  #include <itkPoint.hxx>
+  #include <itkVariableLengthVector.hxx>
+  #include <itkVector.hxx>
+*/
+
+// -------------------------------------------------------------------------
+/* TODO
+   #define cpPlugins_Instances_BaseObjects_extra_SimpleArray( V, D )                   \
+   template cpPlugins_Instances_BaseObjects_EXPORT                                     \
+   std::ostream& itk::operator<< < D >(                               \
+   std::ostream& a, V< D > const& b                                   \
+   )
+
+   cpPlugins_Instances_BaseObjects_extra_SimpleArray( itk::ImageRegion, 1 );
+   cpPlugins_Instances_BaseObjects_extra_SimpleArray( itk::ImageRegion, 2 );
+   cpPlugins_Instances_BaseObjects_extra_SimpleArray( itk::ImageRegion, 3 );
+   cpPlugins_Instances_BaseObjects_extra_SimpleArray( itk::ImageRegion, 4 );
+*/
+
+// -------------------------------------------------------------------------
+#define cpPlugins_Instances_BaseObjects_extra_Array( V, T, D )                  \
+  template cpPlugins_Instances_BaseObjects_EXPORT                               \
+  std::ostream& itk::operator<< < T, D >(                             \
+    std::ostream& a, V< T, D > const& b                               \
+    )
+
+#define cpPlugins_Instances_BaseObjects_extra_Array_AllScalars( V, D ) \
+  cpPlugins_Instances_BaseObjects_extra_Array( V, float, D );          \
+  cpPlugins_Instances_BaseObjects_extra_Array( V, double, D )
+
+#define cpPlugins_Instances_BaseObjects_extra_Array_AllScalars_AllDims( V )    \
+  cpPlugins_Instances_BaseObjects_extra_Array_AllScalars( V, 1 );              \
+  cpPlugins_Instances_BaseObjects_extra_Array_AllScalars( V, 2 );              \
+  cpPlugins_Instances_BaseObjects_extra_Array_AllScalars( V, 3 );              \
+  cpPlugins_Instances_BaseObjects_extra_Array_AllScalars( V, 4 )
+
+cpPlugins_Instances_BaseObjects_extra_Array_AllScalars_AllDims( itk::FixedArray );
+cpPlugins_Instances_BaseObjects_extra_Array_AllScalars_AllDims( itk::Point );
+cpPlugins_Instances_BaseObjects_extra_Array_AllScalars_AllDims( itk::Vector );
+
+// -------------------------------------------------------------------------
+/* TODO
+   #define cpPlugins_Instances_BaseObjects_extra_VariableLengthVector_SetSize( T, P, Q ) \
+   template cpPlugins_Instances_BaseObjects_EXPORT void itk::VariableLengthVector< T >:: \
+   SetSize                                                              \
+   < itk::VariableLengthVector< T >::P, itk::VariableLengthVector< T >::Q > \
+   (                                                                    \
+   unsigned int,                                                        \
+   itk::VariableLengthVector< T >::P,                                   \
+   itk::VariableLengthVector< T >::Q                                    \
+   )
+
+   cpPlugins_Instances_BaseObjects_extra_VariableLengthVector_SetSize( float, AlwaysReallocate, KeepOldValues );
+   cpPlugins_Instances_BaseObjects_extra_VariableLengthVector_SetSize( float, ShrinkToFit, KeepOldValues );
+   cpPlugins_Instances_BaseObjects_extra_VariableLengthVector_SetSize( double, AlwaysReallocate, KeepOldValues );
+   cpPlugins_Instances_BaseObjects_extra_VariableLengthVector_SetSize( double, ShrinkToFit, KeepOldValues );
+*/
+
+// eof - $RCSfile$
diff --git a/lib/cpPlugins_Instances/Base_extra.cxx b/lib/cpPlugins_Instances/Base_extra.cxx
deleted file mode 100644 (file)
index b3b33f5..0000000
+++ /dev/null
@@ -1,65 +0,0 @@
-#include <cpPlugins_Base_Export.h>
-#include <cpPlugins_Config.h>
-
-#include <itkImageRegion.h>
-#include <itkFixedArray.h>
-#include <itkPoint.h>
-#include <itkVariableLengthVector.h>
-#include <itkVector.h>
-
-#include <itkImageRegion.hxx>
-#include <itkFixedArray.hxx>
-#include <itkPoint.hxx>
-#include <itkVariableLengthVector.hxx>
-#include <itkVector.hxx>
-
-// -------------------------------------------------------------------------
-#define cpPlugins_Base_extra_SimpleArray( V, D )                      \
-  template cpPlugins_Base_EXPORT                                      \
-  std::ostream& itk::operator<< < D >(                                \
-    std::ostream& a, V< D > const& b                                  \
-    )
-
-cpPlugins_Base_extra_SimpleArray( itk::ImageRegion, 1 );
-cpPlugins_Base_extra_SimpleArray( itk::ImageRegion, 2 );
-cpPlugins_Base_extra_SimpleArray( itk::ImageRegion, 3 );
-cpPlugins_Base_extra_SimpleArray( itk::ImageRegion, 4 );
-
-// -------------------------------------------------------------------------
-#define cpPlugins_Base_extra_Array( V, T, D )                         \
-  template cpPlugins_Base_EXPORT                                      \
-  std::ostream& itk::operator<< < T, D >(                             \
-    std::ostream& a, V< T, D > const& b                               \
-    )
-
-#define cpPlugins_Base_extra_Array_AllScalars( V, D ) \
-  cpPlugins_Base_extra_Array( V, float, D );          \
-  cpPlugins_Base_extra_Array( V, double, D )
-
-#define cpPlugins_Base_extra_Array_AllScalars_AllDims( V )    \
-  cpPlugins_Base_extra_Array_AllScalars( V, 1 );              \
-  cpPlugins_Base_extra_Array_AllScalars( V, 2 );              \
-  cpPlugins_Base_extra_Array_AllScalars( V, 3 );              \
-  cpPlugins_Base_extra_Array_AllScalars( V, 4 )
-
-cpPlugins_Base_extra_Array_AllScalars_AllDims( itk::FixedArray );
-cpPlugins_Base_extra_Array_AllScalars_AllDims( itk::Point );
-cpPlugins_Base_extra_Array_AllScalars_AllDims( itk::Vector );
-
-// -------------------------------------------------------------------------
-#define cpPlugins_Base_extra_VariableLengthVector_SetSize( T, P, Q )    \
-  template cpPlugins_Base_EXPORT void itk::VariableLengthVector< T >::  \
-  SetSize                                                               \
-  < itk::VariableLengthVector< T >::P, itk::VariableLengthVector< T >::Q > \
-  (                                                                     \
-    unsigned int,                                                       \
-    itk::VariableLengthVector< T >::P,                                  \
-    itk::VariableLengthVector< T >::Q                                   \
-    )
-
-cpPlugins_Base_extra_VariableLengthVector_SetSize( float, AlwaysReallocate, KeepOldValues );
-cpPlugins_Base_extra_VariableLengthVector_SetSize( float, ShrinkToFit, KeepOldValues );
-cpPlugins_Base_extra_VariableLengthVector_SetSize( double, AlwaysReallocate, KeepOldValues );
-cpPlugins_Base_extra_VariableLengthVector_SetSize( double, ShrinkToFit, KeepOldValues );
-
-// eof - $RCSfile$
index 175ee4051297b5d73484672e20adcd00caaafcd6..8042a986664f07e8b9d45a56680011656867768e 100644 (file)
@@ -1,74 +1,72 @@
+## ============================
+## == Configure source files ==
+## ============================
+
 FILE(
-  GLOB libs_DEFS RELATIVE
+  GLOB all_INSTANCES_FILES RELATIVE
   "${CMAKE_CURRENT_SOURCE_DIR}"
   "${CMAKE_CURRENT_SOURCE_DIR}/*.i"
   )
 
-SET(aux_ALL_INSTANCES)
-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}")
-  SET(aux_ALL_INSTANCES ${aux_ALL_INSTANCES} ${l_NAME})
+## =================================
+## == Compile instances libraries ==
+## =================================
+SET(all_INSTANCES_LIBS "")
+FOREACH(libID ${all_INSTANCES_FILES})
+  GET_FILENAME_COMPONENT(name ${libID} NAME_WE)
+  SET(instances "${CMAKE_CURRENT_SOURCE_DIR}/${name}.i")
+  SET(header "${CMAKE_CURRENT_BINARY_DIR}/${name}.h")
+  SET(source "${CMAKE_CURRENT_BINARY_DIR}/${name}.cxx")
+  SET(extra "${CMAKE_CURRENT_SOURCE_DIR}/${name}_extra.cxx")
+  SET(libname cpPlugins_Instances_${name})
   ADD_CUSTOM_COMMAND(
-    OUTPUT ${h_FILE} ${s_FILE}
-    DEPENDS cpPlugins_CreateInstances ${i_FILE}
-    COMMAND cpPlugins_CreateInstances ${i_FILE} ${l_NAME} ${h_FILE} ${s_FILE}
+    OUTPUT ${header} ${source}
+    DEPENDS "${cpPluginsInstances_APP}" ${instances}
+    COMMAND "${cpPluginsInstances_APP}" ${instances} ${libname} ${header} ${source}
     )
-  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})
+  IF(EXISTS ${extra})
+    ADD_LIBRARY(${libname} SHARED ${source} ${extra})
+  ELSE(EXISTS ${extra})
+    ADD_LIBRARY(${libname} SHARED ${source})
+  ENDIF(EXISTS ${extra})
   SET_TARGET_PROPERTIES(
-    ${l_NAME} PROPERTIES
+    ${libname} 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
+    ${libname}
+    BASE_NAME ${libname}
+    EXPORT_MACRO_NAME ${libname}_EXPORT
+    EXPORT_FILE_NAME ${CMAKE_CURRENT_BINARY_DIR}/${libname}_Export.h
+    STATIC_DEFINE ${libname}_BUILT_AS_STATIC
     )
-ENDFOREACH(i)
+  SET(all_INSTANCES_LIBS "${all_INSTANCES_LIBS};${libname}")
+ENDFOREACH(libID)
+SET(cpPlugins_LIBRARIES ${all_INSTANCES_LIBS} CACHE INTERNAL "All libraries" FORCE)
 
-SET(
-  cpPlugins_ALL_INSTANCES
-  ${aux_ALL_INSTANCES}
-  CACHE STRING "All instances libraries."
-  )
+## =============
+## == Linking ==
+## =============
 
-## Target links
-TARGET_LINK_LIBRARIES(cpPlugins_Base ${ITK_LIBRARIES})
-TARGET_LINK_LIBRARIES(cpPlugins_Transforms ${ITK_LIBRARIES} cpPlugins_Base)
-TARGET_LINK_LIBRARIES(cpPlugins_Mesh cpPlugins_Base)
-TARGET_LINK_LIBRARIES(cpPlugins_Image cpPlugins_Base)
-TARGET_LINK_LIBRARIES(cpPlugins_Paths cpPlugins_Base cpPlugins_Image ${VTK_LIBRARIES})
-TARGET_LINK_LIBRARIES(cpPlugins_ImageIterators ${ITK_LIBRARIES} cpPlugins_Image)
-TARGET_LINK_LIBRARIES(cpPlugins_ImageFiltersBase cpPlugins_Image)
-TARGET_LINK_LIBRARIES(cpPlugins_InPlaceImageFiltersBase cpPlugins_ImageFiltersBase)
-TARGET_LINK_LIBRARIES(cpPlugins_ImageITK2VTK cpPlugins_ImageFiltersBase ${VTK_LIBRARIES})
-TARGET_LINK_LIBRARIES(cpPlugins_ThresholdFilters cpPlugins_InPlaceImageFiltersBase cpPlugins_ImageIterators)
-TARGET_LINK_LIBRARIES(cpPlugins_DistanceMapFilters cpPlugins_ThresholdFilters cpPlugins_ImageIterators)
-TARGET_LINK_LIBRARIES(cpPlugins_ResamplingFilters cpPlugins_ImageFiltersBase cpPlugins_ImageIterators cpPlugins_Transforms)
-TARGET_LINK_LIBRARIES(cpPlugins_GaussianImageFilters cpPlugins_ImageFiltersBase cpPlugins_ImageIterators)
-TARGET_LINK_LIBRARIES(cpPlugins_ImageIO cpPlugins_ImageFiltersBase cpPlugins_ImageIterators)
-TARGET_LINK_LIBRARIES(cpPlugins_ImageMeshFilters cpPlugins_ImageFiltersBase cpPlugins_ImageIterators cpPlugins_Mesh)
-# INSTALL(
-#   TARGETS ${l_NAME}
-#   RUNTIME DESTINATION bin
-#   LIBRARY DESTINATION lib
-#   ARCHIVE DESTINATION lib/static
-#   )
-# INSTALL(
-#   FILES
-#   ${lib_HEADERS}
-#   DESTINATION include/${lib_DIR}
-#   )
+TARGET_LINK_LIBRARIES(cpPlugins_Instances_BaseObjects ${ITK_LIBRARIES})
+TARGET_LINK_LIBRARIES(cpPlugins_Instances_Decorators ${ITK_LIBRARIES})
+TARGET_LINK_LIBRARIES(cpPlugins_Instances_ColorPixels cpPlugins_Instances_BaseObjects)
+TARGET_LINK_LIBRARIES(cpPlugins_Instances_ScalarImages cpPlugins_Instances_BaseObjects)
+TARGET_LINK_LIBRARIES(cpPlugins_Instances_ColorImages cpPlugins_Instances_ColorPixels cpPlugins_Instances_ScalarImages)
+TARGET_LINK_LIBRARIES(cpPlugins_Instances_VectorImages cpPlugins_Instances_ColorPixels cpPlugins_Instances_ScalarImages)
+TARGET_LINK_LIBRARIES(cpPlugins_Instances_ScalarImagesBaseFilters cpPlugins_Instances_ScalarImages)
+TARGET_LINK_LIBRARIES(cpPlugins_Instances_ImagesIO cpPlugins_Instances_ScalarImages cpPlugins_Instances_ColorImages cpPlugins_Instances_VectorImages cpPlugins_Instances_Decorators)
+TARGET_LINK_LIBRARIES(cpPlugins_Instances_ImageITK2VTK cpPlugins_Instances_ScalarImages cpPlugins_Instances_ColorImages cpPlugins_Instances_VectorImages ${VTK_LIBRARIES})
+TARGET_LINK_LIBRARIES(cpPlugins_Instances_Paths cpPlugins_Instances_ScalarImages ${VTK_LIBRARIES})
+TARGET_LINK_LIBRARIES(cpPlugins_Instances_Mesh cpPlugins_Instances_BaseObjects)
+TARGET_LINK_LIBRARIES(cpPlugins_Instances_Transforms cpPlugins_Instances_BaseObjects)
+TARGET_LINK_LIBRARIES(cpPlugins_Instances_ScalarVectorImagesBaseFilters cpPlugins_Instances_ScalarImages cpPlugins_Instances_VectorImages)
+TARGET_LINK_LIBRARIES(cpPlugins_Instances_GaussianImageFilters cpPlugins_Instances_ScalarImagesBaseFilters cpPlugins_Instances_ScalarVectorImagesBaseFilters)
+TARGET_LINK_LIBRARIES(cpPlugins_Instances_ThresholdFilters cpPlugins_Instances_ScalarImagesBaseFilters)
+TARGET_LINK_LIBRARIES(cpPlugins_Instances_ResamplingFilters cpPlugins_Instances_ScalarImagesBaseFilters cpPlugins_Instances_Transforms)
+TARGET_LINK_LIBRARIES(cpPlugins_Instances_ImageMeshFilters cpPlugins_Instances_ScalarImagesBaseFilters cpPlugins_Instances_Mesh)
+TARGET_LINK_LIBRARIES(cpPlugins_Instances_NeighborhoodIterators cpPlugins_Instances_ScalarImages)
+TARGET_LINK_LIBRARIES(cpPlugins_Instances_DistanceMapFilters cpPlugins_Instances_ScalarImagesBaseFilters cpPlugins_Instances_NeighborhoodIterators cpPlugins_Instances_ThresholdFilters)
 
 ## eof - $RCSfile$
diff --git a/lib/cpPlugins_Instances/ColorImages.i b/lib/cpPlugins_Instances/ColorImages.i
new file mode 100644 (file)
index 0000000..fce45e1
--- /dev/null
@@ -0,0 +1,36 @@
+d #itk_pixels=RGB;RGBA
+d #itk_objs=ImportImageContainer;Image;ImageSource
+d #itk_it=ImageRegion;ImageScanline
+d #itk_it_wi=Image;ImageRegion;ImageLinear
+d #ints=char;short;int;long
+d #uints=unsigned #ints
+d #floats=float;double
+d #pixels=#ints;#uints;#floats
+d #dims=1;2;3;4
+
+i cpPlugins_Instances/ColorPixels.h
+t itk{#itk_objs}.h
+t itk{#itk_it}Iterator.h
+t itk{#itk_it}ConstIterator.h
+t itk{#itk_it_wi}IteratorWithIndex.h
+t itk{#itk_it_wi}ConstIteratorWithIndex.h
+
+* ==============
+* = Base types =
+* ==============
+c itk::ImportImageContainer< unsigned long, itk::{#itk_pixels}Pixel< #pixels > >
+c itk::Image< itk::{#itk_pixels}Pixel< #pixels >, #dims >
+
+* ===============================
+* = All of filters superclasses =
+* ===============================
+c itk::ImageSource< itk::Image< itk::{#itk_pixels}Pixel< #pixels >, #dims > >
+
+* ===============================
+* = All of base image iterators =
+* ===============================
+b #define ITK_LEGACY_REMOVE
+c itk::{#itk_it}@{Const;{}}Iterator< itk::Image< itk::{#itk_pixels}Pixel< #pixels >, #dims > >
+c itk::{#itk_it_wi}@{Const;{}}IteratorWithIndex< itk::Image< itk::{#itk_pixels}Pixel< #pixels >, #dims > >
+
+* eof - $RCSfile$
diff --git a/lib/cpPlugins_Instances/ColorPixels.i b/lib/cpPlugins_Instances/ColorPixels.i
new file mode 100644 (file)
index 0000000..7d1ab08
--- /dev/null
@@ -0,0 +1,11 @@
+d #itk_objs=RGB;RGBA
+d #ints=char;short;int;long
+d #uints=unsigned #ints
+d #floats=float;double
+d #pixels=#ints;#uints;#floats
+
+t itk{#itk_objs}Pixel.h
+
+c itk::{#itk_objs}Pixel< #pixels >
+
+* eof - $RCSfile$
diff --git a/lib/cpPlugins_Instances/Decorators.i b/lib/cpPlugins_Instances/Decorators.i
new file mode 100644 (file)
index 0000000..948344c
--- /dev/null
@@ -0,0 +1,11 @@
+d #ints=char;short;int;long
+d #uints=unsigned #ints
+d #floats=float;double
+d #pixels=#ints;#uints;#floats
+
+t itkSimpleDataObjectDecorator.h
+
+c itk::SimpleDataObjectDecorator< std::string >
+c itk::SimpleDataObjectDecorator< #pixels >
+
+* eof - $RCSfile$
\ No newline at end of file
index 1938f356e4679f74635fc0537711554e3d8d8a08..59dfe0aa36b66103434abf3ed0aedf5749d9d955 100644 (file)
@@ -1,4 +1,4 @@
-f cpPlugins_Instances/InPlaceImageFiltersBase.h
+f cpPlugins_Instances/ScalarImagesBaseFilters.h
 
 i itkProgressReporter.h
 t itkBinaryContourImageFilter.h
@@ -10,4 +10,4 @@ d #float=float;double
 d #scalar=#int;unsigned #int;#float
 d #filters=itk::BinaryContourImageFilter;itk::SignedMaurerDistanceMapImageFilter
 
-c #filters< itk::Image< @{#scalar}, #dims >, itk::Image< @{#float}, #dims > >
+c #filters< itk::Image< #scalar, #dims >, itk::Image< #float, #dims > >
index 9792abdbd41f44a8ba79ac436a0cf5c0016c5249..faec2c4fe07b50675a675e72a356420937a67d77 100644 (file)
@@ -1,4 +1,5 @@
-f cpPlugins_Instances/ImageFiltersBase.h
+f cpPlugins_Instances/ScalarImagesBaseFilters.h
+f cpPlugins_Instances/VectorImages.h
 
 t cpExtensions/Algorithms/MultiScaleGaussianImageFilter.h
 t itkGradientRecursiveGaussianImageFilter.h
diff --git a/lib/cpPlugins_Instances/Image.i b/lib/cpPlugins_Instances/Image.i
deleted file mode 100644 (file)
index 7e8c24d..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-f cpPlugins_Instances/Base.h
-
-i complex
-t itkImage.h
-t itkImageBase.h
-t itkImportImageContainer.h
-t itkImageRegion.h
-
-d #dims=1;2;3
-d #int=char;short;int;long
-d #float=float;double
-d #scalar=#int;unsigned #int;#float
-d #color_pixels=itk::RGBPixel< #scalar >;itk::RGBAPixel< #scalar >
-d #complex_pixels=std::complex< #float >
-d #lin_alg_vectors=itk::CovariantVector;itk::Point;itk::Vector
-d #pixels=#scalar;#color_pixels;#complex_pixels
-d #array_pixels=#lin_alg_vectors;itk::SymmetricSecondRankTensor
-d #double_array_pixels=itk::Matrix
-
-c itk::ImageRegion< #dims >
-c itk::ImageBase< #dims >
-
-c itk::ImportImageContainer< unsigned long, #pixels >
-c itk::ImportImageContainer< unsigned long, #array_pixels< #float, #dims > >
-c itk::ImportImageContainer< unsigned long, #double_array_pixels< #float, #dims, #dims > >
-c itk::ImportImageContainer< unsigned long, itk::DiffusionTensor3D< #float > >
-
-c itk::Image< #pixels, #dims >
-c itk::Image< #array_pixels< #float, #dims >, #dims >
-c itk::Image< #double_array_pixels< #float, #dims, #dims >, #dims >
-c itk::Image< itk::DiffusionTensor3D< #float >, #dims >
diff --git a/lib/cpPlugins_Instances/ImageFiltersBase.i b/lib/cpPlugins_Instances/ImageFiltersBase.i
deleted file mode 100644 (file)
index c93f469..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-f cpPlugins_Instances/Image.h
-
-t itkImageSource.h
-t itkImageToImageFilter.h
-
-d #dims=2;3
-d #int=char;short;int;long
-d #float=float;double
-d #scalar=#int;unsigned #int;#float
-d #color_pixels=itk::RGBPixel< #scalar >;itk::RGBAPixel< #scalar >
-d #complex_pixels=std::complex< #float >
-d #lin_alg_vectors=itk::CovariantVector;itk::Point;itk::Vector
-d #pixels=#scalar;#color_pixels;#complex_pixels
-d #array_pixels=#lin_alg_vectors;itk::SymmetricSecondRankTensor
-d #double_array_pixels=itk::Matrix
-d #filters=itk::ImageToImageFilter
-
-c itk::ImageSource< itk::Image< #pixels, #dims > >
-c itk::ImageSource< itk::Image< #array_pixels< #float, #dims >, #dims > >
-c itk::ImageSource< itk::Image< #double_array_pixels< #float, #dims, #dims >, #dims > >
-
-c #filters< itk::Image< @{#pixels}, #dims >, itk::Image< @{#pixels}, #dims > >
-c #filters< itk::Image< #array_pixels< @{#float}, #dims >, #dims >, itk::Image< #array_pixels< @{#float}, #dims >, #dims > >
-c #filters< itk::Image< #double_array_pixels< @{#float}, #dims, #dims >, #dims >, itk::Image< #double_array_pixels< @{#float}, #dims, #dims >, #dims > >
diff --git a/lib/cpPlugins_Instances/ImageIO.i b/lib/cpPlugins_Instances/ImageIO.i
deleted file mode 100644 (file)
index e6397bc..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-b #include <ITKIOImageBaseExport.h>
-b #undef ITKIOImageBase_HIDDEN
-b #define ITKIOImageBase_HIDDEN
-
-f cpPlugins_Instances/Image.h
-
-i itkImageIOFactory.h
-i itkGDCMSeriesFileNames.h
-
-t itkImageFileReader.h
-t itkImageFileWriter.h
-t itkImageSeriesReader.h
-t itkConvertPixelBuffer.h
-t itkImageAlgorithm.h
-t itkSimpleDataObjectDecorator.h
-
-d #dims=2;3
-d #int=char;short;int;long
-d #float=float;double
-d #scalar=#int;unsigned #int;#float
-d #color_pixels=itk::RGBPixel< #scalar >;itk::RGBAPixel< #scalar >
-d #complex_pixels=std::complex< #float >
-d #lin_alg_vectors=itk::CovariantVector;itk::Point;itk::Vector
-d #pixels=#scalar;#color_pixels;#complex_pixels
-d #array_pixels=#lin_alg_vectors;itk::SymmetricSecondRankTensor
-d #double_array_pixels=itk::Matrix
-d #filters=itk::ImageFileReader;itk::ImageFileWriter;itk::ImageSeriesReader
-
-c #filters< itk::Image< #pixels, #dims > >
-c #filters< itk::Image< #array_pixels< #float, #dims >, #dims > >
-c #filters< itk::Image< #double_array_pixels< #float, #dims, #dims >, #dims > >
index 7529a31357aab5b4345afb1714b19222ce9e6748..03c98f6f69776ee6582b17575f99db67d2ee7e20 100644 (file)
@@ -1,4 +1,7 @@
-f cpPlugins_Instances/Image.h
+f cpPlugins_Instances/ScalarImages.h
+f cpPlugins_Instances/ColorImages.h
+f cpPlugins_Instances/VectorImages.h
+
 t itkImageToVTKImageFilter.h
 t itkVTKImageToImageFilter.h
 t itkVTKImageExport.h
@@ -10,9 +13,11 @@ d #float=float;double
 d #scalar=#int;unsigned #int;#float
 d #color_pixels=itk::RGBPixel< #scalar >;itk::RGBAPixel< #scalar >
 d #lin_alg_vectors=itk::CovariantVector;itk::Point;itk::Vector
-d #pixels=#scalar;#color_pixels;#complex_pixels
+d #pixels=#scalar;#color_pixels
 d #array_pixels=#lin_alg_vectors;itk::SymmetricSecondRankTensor
 d #filters=itk::ImageToVTKImageFilter;itk::VTKImageToImageFilter
 
 c #filters< itk::Image< #pixels, #dims > >
 c #filters< itk::Image< #array_pixels< #float, #dims >, #dims > >
+
+* eof - $RCSfile$
diff --git a/lib/cpPlugins_Instances/ImageIterators.i b/lib/cpPlugins_Instances/ImageIterators.i
deleted file mode 100644 (file)
index f815b21..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-b #define ITK_LEGACY_REMOVE
-
-f cpPlugins_Instances/Image.h
-
-t itkImageRegionConstIterator.h
-t itkImageRegionIterator.h
-t itkImageScanlineConstIterator.h
-t itkImageScanlineIterator.h
-t itkImageLinearConstIteratorWithIndex.h
-t itkImageLinearIteratorWithIndex.h
-t itkImageConstIteratorWithIndex.h
-t itkImageIteratorWithIndex.h
-t itkZeroFluxNeumannBoundaryCondition.h
-t itkConstNeighborhoodIterator.h
-t itkNeighborhoodIterator.h
-t itkNeighborhood.h
-t itkConstShapedNeighborhoodIterator.h
-t itkShapedNeighborhoodIterator.h
-t itkImageRegionConstIteratorWithIndex.h
-t itkImageRegionIteratorWithIndex.h
-
-d #dims=1;2;3
-d #int=char;short;int;long
-d #float=float;double
-d #scalar=#int;unsigned #int;#float
-d #color_pixels=itk::RGBPixel< #scalar >;itk::RGBAPixel< #scalar >
-d #complex_pixels=std::complex< #float >
-d #lin_alg_vectors=itk::CovariantVector;itk::Point;itk::Vector
-d #pixels=#scalar;#color_pixels;#complex_pixels
-d #array_pixels=#lin_alg_vectors;itk::SymmetricSecondRankTensor
-d #double_array_pixels=itk::Matrix
-d #iterators=itk::ImageRegionConstIterator;itk::ImageRegionIterator;itk::ImageConstIteratorWithIndex;itk::ImageIteratorWithIndex;itk::ImageScanlineConstIterator;itk::ImageScanlineIterator;itk::ImageLinearConstIteratorWithIndex;itk::ImageLinearIteratorWithIndex;itk::ImageRegionConstIteratorWithIndex;itk::ImageRegionIteratorWithIndex
-d #conds=itk::ZeroFluxNeumannBoundaryCondition
-d #neigh_iterators=itk::ConstNeighborhoodIterator;itk::NeighborhoodIterator;itk::ConstShapedNeighborhoodIterator;itk::ShapedNeighborhoodIterator
-
-c itk::Neighborhood< #pixels*, #dims, itk::NeighborhoodAllocator< #pixels* > >
-c #iterators< itk::Image< #pixels, #dims > >
-c #iterators< itk::Image< #array_pixels< #float, #dims >, #dims > >
-c #iterators< itk::Image< #double_array_pixels< #float, #dims, #dims >, #dims > >
-c #conds< itk::Image< #scalar, #dims >, itk::Image< #scalar, #dims > >
-c #neigh_iterators< itk::Image< #scalar, #dims >, #conds< itk::Image< #scalar, #dims >, itk::Image< #scalar, #dims > > >
index f15e51ba454dbbed0d4bcc05314673680241ba0e..fe883c75bc0ff475edbbbc93d15921f9342ab171 100644 (file)
@@ -1,4 +1,4 @@
-f cpPlugins_Instances/Image.h
+f cpPlugins_Instances/ScalarImages.h
 f cpPlugins_Instances/Mesh.h
 
 t itkTriangleMeshToBinaryImageFilter.h
diff --git a/lib/cpPlugins_Instances/ImagesIO.i b/lib/cpPlugins_Instances/ImagesIO.i
new file mode 100644 (file)
index 0000000..32ed783
--- /dev/null
@@ -0,0 +1,28 @@
+b #include <ITKIOImageBaseExport.h>
+b #undef ITKIOImageBase_HIDDEN
+b #define ITKIOImageBase_HIDDEN
+
+d #ints=char;short;int;long
+d #uints=unsigned #ints
+d #floats=float;double
+d #pixels=#ints;#uints;#floats
+d #dims=1;2;3;4
+d #vectors=CovariantVector;Point;Vector;SymmetricSecondRankTensor
+d #colors=RGB;RGBA
+d #io=ImageFileReader;ImageFileWriter;ImageSeriesReader
+
+i cpPlugins_Instances/ScalarImages.h
+i cpPlugins_Instances/ColorImages.h
+i cpPlugins_Instances/VectorImages.h
+
+t itk{#io}.h
+t itkConvertPixelBuffer.h
+t itkImageAlgorithm.h
+
+c itk::{#io}< itk::Image< #pixels, #dims > >
+c itk::{#io}< itk::Image< std::complex< #floats >, #dims > >
+c itk::{#io}< itk::Image< itk::{#colors}Pixel< #pixels >, #dims > >
+c itk::{#io}< itk::Image< itk::#vectors< #floats, #dims >, #dims > >
+c itk::{#io}< itk::Image< itk::DiffusionTensor3D< #floats >, 3 > >
+
+* eof - $RCSfile$
diff --git a/lib/cpPlugins_Instances/InPlaceImageFiltersBase.i b/lib/cpPlugins_Instances/InPlaceImageFiltersBase.i
deleted file mode 100644 (file)
index 7ec274d..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-f cpPlugins_Instances/ImageFiltersBase.h
-
-t itkInPlaceImageFilter.h
-
-d #dims=2;3
-d #int=char;short;int;long
-d #float=float;double
-d #scalar=#int;unsigned #int;#float
-d #color_pixels=itk::RGBPixel< #scalar >;itk::RGBAPixel< #scalar >
-d #complex_pixels=std::complex< #float >
-d #lin_alg_vectors=itk::CovariantVector;itk::Point;itk::Vector
-d #pixels=#scalar;#color_pixels;#complex_pixels
-d #array_pixels=#lin_alg_vectors;itk::SymmetricSecondRankTensor
-d #double_array_pixels=itk::Matrix
-d #filters=itk::InPlaceImageFilter
-
-c #filters< itk::Image< @{#pixels}, #dims >, itk::Image< @{#pixels}, #dims > >
-c #filters< itk::Image< #array_pixels< @{#float}, #dims >, #dims >, itk::Image< #array_pixels< @{#float}, #dims >, #dims > >
-c #filters< itk::Image< #double_array_pixels< @{#float}, #dims, #dims >, #dims >, itk::Image< #double_array_pixels< @{#float}, #dims, #dims >, #dims > >
index cfd6e442828e21ace22bbd7e56236518710c2c5e..ea67b8f348ee1003b8681f566e1740be09853cd2 100644 (file)
@@ -1,4 +1,4 @@
-f cpPlugins_Instances/Base.h
+f cpPlugins_Instances/BaseObjects.h
 
 d #dims=2;3
 d #float=float;double
@@ -20,3 +20,5 @@ c itk::VectorContainer< unsigned long, itk::CellInterface< #float, itk::CellTrai
 c @{itk::VertexCell;itk::LineCell;itk::TriangleCell}< itk::CellInterface< #float, itk::CellTraitsInfo< #dims, float, float, unsigned long, unsigned long, unsigned long, itk::Point< float, #dims >, itk::VectorContainer< unsigned long, itk::Point< float, #dims > >, std::set< unsigned long > > > >
 c @{itk::PointSet;itk::Mesh}< #float, #dims >
 c itk::MeshSource< itk::Mesh< #float, #dims > >
+
+* eof - $RCSfile$
diff --git a/lib/cpPlugins_Instances/NeighborhoodIterators.i b/lib/cpPlugins_Instances/NeighborhoodIterators.i
new file mode 100644 (file)
index 0000000..7cb2865
--- /dev/null
@@ -0,0 +1,20 @@
+f cpPlugins_Instances/ScalarImages.h
+
+t itkZeroFluxNeumannBoundaryCondition.h
+t itkConstNeighborhoodIterator.h
+t itkNeighborhoodIterator.h
+t itkNeighborhood.h
+t itkConstShapedNeighborhoodIterator.h
+t itkShapedNeighborhoodIterator.h
+
+d #dims=1;2;3;4
+d #int=char;short;int;long
+d #float=float;double
+d #scalar=#int;unsigned #int;#float
+d #pixels=#scalar;#color_pixels;#complex_pixels
+d #conds=itk::ZeroFluxNeumannBoundaryCondition
+d #neigh_iterators=itk::ConstNeighborhoodIterator;itk::NeighborhoodIterator;itk::ConstShapedNeighborhoodIterator;itk::ShapedNeighborhoodIterator
+
+c itk::Neighborhood< #pixels*, #dims, itk::NeighborhoodAllocator< #pixels* > >
+c #conds< itk::Image< #scalar, #dims >, itk::Image< #scalar, #dims > >
+c #neigh_iterators< itk::Image< #scalar, #dims >, #conds< itk::Image< #scalar, #dims >, itk::Image< #scalar, #dims > > >
index 148ac75b5e76d737ae9da7333c54836fd51bd9fe..c19c9719c64760b075970a060933169c64c36f8f 100644 (file)
@@ -1,4 +1,4 @@
-f cpPlugins_Instances/Base.h
+f cpPlugins_Instances/BaseObjects.h
 
 i cpExtensions/DataStructures/PolyLineParametricPath.h
 i cpExtensions/DataStructures/ImageIndexesContainer.h
@@ -20,3 +20,4 @@ c cpExtensions::DataStructures::ImageIndexesContainer< #dims >
 c cpExtensions::Visualization::PolyLineParametricPathToPolyData< cpExtensions::DataStructures::PolyLineParametricPath< #dims > >
 c cpExtensions::Visualization::ImageIndexesContainerToPolyData< cpExtensions::DataStructures::ImageIndexesContainer< #dims > >
 
+* eof - $RCSfile$
index 46fc759c53ba23c7690d8a27c7ab0edb329f5713..a9e742e6e5d0aa4f039114c3cb25a732e56092ef 100644 (file)
@@ -1,4 +1,4 @@
-f cpPlugins_Instances/ImageFiltersBase.h
+f cpPlugins_Instances/ScalarImagesBaseFilters.h
 f cpPlugins_Instances/Transforms.h
 
 t itkResampleImageFilter.h
diff --git a/lib/cpPlugins_Instances/ScalarImages.i b/lib/cpPlugins_Instances/ScalarImages.i
new file mode 100644 (file)
index 0000000..f7886d8
--- /dev/null
@@ -0,0 +1,41 @@
+d #itk_objs=ImageBase;ImageRegion;ImportImageContainer;Image;ImageSource
+d #itk_it=ImageRegion;ImageScanline
+d #itk_it_wi=Image;ImageRegion;ImageLinear
+d #ints=char;short;int;long
+d #uints=unsigned #ints
+d #floats=float;double
+d #pixels=#ints;#uints;#floats
+d #dims=1;2;3;4
+
+i complex
+t itk{#itk_objs}.h
+t itk{#itk_it}Iterator.h
+t itk{#itk_it}ConstIterator.h
+t itk{#itk_it_wi}IteratorWithIndex.h
+t itk{#itk_it_wi}ConstIteratorWithIndex.h
+
+* ==============
+* = Base types =
+* ==============
+c itk::ImportImageContainer< unsigned long, #pixels >
+c itk::ImportImageContainer< unsigned long, std::complex< #floats > >
+c itk::@{ImageRegion;ImageBase}< #dims >
+c itk::Image< #pixels, #dims >
+c itk::Image< std::complex< #floats >, #dims >
+
+* ===============================
+* = All of filters superclasses =
+* ===============================
+c itk::ImageSource< itk::Image< #pixels, #dims > >
+c itk::ImageSource< itk::Image< std::complex< #floats >, #dims > >
+
+* ===============================
+* = All of base image iterators =
+* ===============================
+b #define ITK_LEGACY_REMOVE
+c itk::{#itk_it}@{Const;{}}Iterator< itk::Image< #pixels, #dims > >
+c itk::{#itk_it_wi}@{Const;{}}IteratorWithIndex< itk::Image< #pixels, #dims > >
+c itk::{#itk_it}@{Const;{}}Iterator< itk::Image< std::complex< #floats >, #dims > >
+c itk::{#itk_it_wi}@{Const;{}}IteratorWithIndex< itk::Image< std::complex< #floats >, #dims > >
+
+* eof - $RCSfile$
diff --git a/lib/cpPlugins_Instances/ScalarImagesBaseFilters.i b/lib/cpPlugins_Instances/ScalarImagesBaseFilters.i
new file mode 100644 (file)
index 0000000..4820938
--- /dev/null
@@ -0,0 +1,20 @@
+d #ints=char;short;int;long
+d #uints=unsigned #ints
+d #floats=float;double
+d #pixels=#ints;#uints;#floats
+d #inputs=#pixels
+d #outputs=#pixels
+d #dims=1;2;3;4
+d #itk_filters=ImageToImage;InPlaceImage
+
+i cpPlugins_Instances/ScalarImages.h
+t itk{#itk_filters}Filter.h
+
+* =====================
+* = Base filter types =
+* =====================
+c itk::{#itk_filters}Filter< itk::Image< #inputs, #dims >, itk::Image< #outputs, #dims > >
+c itk::{#itk_filters}Filter< itk::Image< #pixels, 3 >, itk::Image< #pixels, 2 > >
+c itk::{#itk_filters}Filter< itk::Image< #pixels, 2 >, itk::Image< #pixels, 3 > >
+
+* eof - $RCSfile$
diff --git a/lib/cpPlugins_Instances/ScalarVectorImagesBaseFilters.i b/lib/cpPlugins_Instances/ScalarVectorImagesBaseFilters.i
new file mode 100644 (file)
index 0000000..c017bf9
--- /dev/null
@@ -0,0 +1,19 @@
+d #ints=char;short;int;long
+d #uints=unsigned #ints
+d #floats=float;double
+d #pixels=#ints;#uints;#floats
+d #inputs=#pixels
+d #outputs=#pixels
+d #dims=1;2;3;4
+d #itk_filters=ImageToImage;InPlaceImage
+
+i cpPlugins_Instances/ScalarImages.h
+i cpPlugins_Instances/VectorImages.h
+t itk{#itk_filters}Filter.h
+
+* =====================
+* = Base filter types =
+* =====================
+c itk::{#itk_filters}Filter< itk::Image< #pixels, #dims >, itk::Image< itk::CovariantVector< #floats, #dims >, #dims > >
+
+* eof - $RCSfile$
index 125d7cca2d6eb962eb50253f75ee18d740e0f175..9d1a884e6a1a8d56e551b1e1780ce570307befaf 100644 (file)
@@ -1,4 +1,4 @@
-f cpPlugins_Instances/InPlaceImageFiltersBase.h
+f cpPlugins_Instances/ScalarImagesBaseFilters.h
 
 t itkBinaryThresholdImageFilter.h
 t itkUnaryFunctorImageFilter.h
@@ -8,5 +8,6 @@ d #dims=2;3
 d #int=char;short;int;long
 d #float=float;double
 d #scalar=#int;unsigned #int;#float
+d #output=#int;unsigned #int;#float
 
-c itk::BinaryThresholdImageFilter< itk::Image< @{#scalar}, #dims >, itk::Image< @{#scalar}, #dims > >
+c itk::BinaryThresholdImageFilter< itk::Image< #scalar, #dims >, itk::Image< #output, #dims > >
index 15ce975422ba70b2c2ec6c851d643b919ff97e97..bea61249ef130aec304e8b21eab0ba6c368249c6 100644 (file)
@@ -1,4 +1,4 @@
-f cpPlugins_Instances/Base.h
+f cpPlugins_Instances/BaseObjects.h
 
 d #dims=2;3
 d #float=float;double
@@ -10,3 +10,5 @@ t itkDataObjectDecorator.h
 c itk::OptimizerParameters< #float >
 c itk::Transform< #float, #dims, #dims >
 c itk::DataObjectDecorator< itk::Transform< #float, #dims, #dims > >
+
+* eof - $RCSfile$
diff --git a/lib/cpPlugins_Instances/VectorImages.i b/lib/cpPlugins_Instances/VectorImages.i
new file mode 100644 (file)
index 0000000..f8fb7ea
--- /dev/null
@@ -0,0 +1,38 @@
+d #itk_pixels=CovariantVector;Point;Vector;SymmetricSecondRankTensor
+d #itk_objs=ImportImageContainer;Image;ImageSource
+d #itk_it=ImageRegion;ImageScanline
+d #itk_it_wi=Image;ImageRegion;ImageLinear
+d #floats=float;double
+d #dims=1;2;3;4
+
+i cpPlugins_Instances/BaseObjects.h
+t itk{#itk_objs}.h
+t itk{#itk_it}Iterator.h
+t itk{#itk_it}ConstIterator.h
+t itk{#itk_it_wi}IteratorWithIndex.h
+t itk{#itk_it_wi}ConstIteratorWithIndex.h
+
+* ==============
+* = Base types =
+* ==============
+c itk::ImportImageContainer< unsigned long, itk::{#itk_pixels}< #floats, #dims > >
+c itk::ImportImageContainer< unsigned long, itk::DiffusionTensor3D< #floats > >
+c itk::Image< itk::{#itk_pixels}< #floats, #dims >, #dims >
+c itk::Image< itk::DiffusionTensor3D< #floats >, 3 >
+
+* ===============================
+* = All of filters superclasses =
+* ===============================
+c itk::ImageSource< itk::Image< itk::{#itk_pixels}< #floats, #dims >, #dims > >
+c itk::ImageSource< itk::Image< itk::DiffusionTensor3D< #floats >, 3 > >
+
+* ===============================
+* = All of base image iterators =
+* ===============================
+b #define ITK_LEGACY_REMOVE
+c itk::{#itk_it}@{Const;{}}Iterator< itk::Image< itk::{#itk_pixels}< #floats, #dims >, #dims > >
+c itk::{#itk_it_wi}@{Const;{}}IteratorWithIndex< itk::Image< itk::{#itk_pixels}< #floats, #dims >, #dims > >
+c itk::{#itk_it}@{Const;{}}Iterator< itk::Image< itk::DiffusionTensor3D< #floats >, 3 > >
+c itk::{#itk_it_wi}@{Const;{}}IteratorWithIndex< itk::Image< itk::DiffusionTensor3D< #floats >, 3 > >
+
+* eof - $RCSfile$
index 8fe59cd8920b78907db90fc4039946540cba3704..ef17bd0a5f095534db5d76376a7afa056d6d2811 100644 (file)
@@ -37,7 +37,7 @@ SET(
 
 SET(
   target_LIBRARIES
-  cpPlugins
+  ${cpPlugins_LIBRARIES}
   )
 
 ## =====================
index 019a7139ceb43b039f6e1fc1963070d9a3ab65f8..111656060c988045da42d3da248c634b15a14718 100644 (file)
@@ -16,7 +16,8 @@
 #include <QVBoxLayout>
 
 #include <cpPlugins/ParametersQtDialog.h>
-#include <cpPlugins_Instances/ImageIO.h>
+#include <cpPlugins_Instances/ImagesIO.h>
+#include <itkGDCMSeriesFileNames.h>
 
 /**
  */
index f614a63807404b89483f1370aae723ca4599cb8e..e9f3e59d178dd9ff2436941ae4395ef8691afdd6 100644 (file)
@@ -1,6 +1,7 @@
 #include <cpPluginsIO/ImageReader.h>
 #include <cpPlugins/Image.h>
-#include <cpPlugins_Instances/ImageIO.h>
+#include <cpPlugins_Instances/ImagesIO.h>
+#include <itkImageIOFactory.h>
 
 // -------------------------------------------------------------------------
 cpPluginsIO::ImageReader::
index 80384174c247a3206c7b08e1bf7cda1074abb669..dfbd097a06f77f453e61979f99b2fbdfc64a3943 100644 (file)
@@ -1,6 +1,6 @@
 #include <cpPluginsIO/ImageWriter.h>
 #include <cpPlugins/Image.h>
-#include <cpPlugins_Instances/ImageIO.h>
+#include <cpPlugins_Instances/ImagesIO.h>
 
 // -------------------------------------------------------------------------
 cpPluginsIO::ImageWriter::
index 99fca1514fcbbbca333efe33bd13da8dff2053b7..9cabb8dea84fbda5609e0fd786d6d50c5034d6cd 100644 (file)
@@ -32,7 +32,7 @@ SET(
 
 SET(
   target_LIBRARIES
-  cpPlugins
+  ${cpPlugins_LIBRARIES}
   )
 
 ## =====================
index bda2804f8c08369395f12a2efd15ed3b0092b811..2d7a8ef2aeb2361f856d19f6e8b6cbbe2f559d3d 100644 (file)
@@ -33,7 +33,7 @@ SET(
 SET(
   target_LIBRARIES
   cpExtensions
-  cpPlugins
+  ${cpPlugins_LIBRARIES}
   )
 
 ## =====================
index 25b63c64d156e220bd5e81e8c11f4741fb290903..7c87e89f43f8e3812ef440dda675801cdb852e22 100644 (file)
@@ -33,7 +33,7 @@ SET(
 SET(
   target_LIBRARIES
   cpExtensions
-  cpPlugins
+  ${cpPlugins_LIBRARIES}
   )
 
 ## =====================
index a01eca9cf489a7409bcc5f8a8c9b0ee27b4c039f..8c05b8bb183129e7c23ebc7ded88c6fe2d41f7c1 100644 (file)
@@ -33,7 +33,7 @@ SET(
 SET(
   target_LIBRARIES
   cpExtensions
-  cpPlugins
+  ${cpPlugins_LIBRARIES}
   )
 
 ## =====================
diff --git a/third_party_installers/cpPlugins_Install_ITK.sh b/third_party_installers/cpPlugins_Install_ITK.sh
new file mode 100755 (executable)
index 0000000..d9ca4ff
--- /dev/null
@@ -0,0 +1,92 @@
+#!/bin/bash
+
+## Some configuration variables
+number_of_processes="-j4"
+
+## Locate cmake executable
+cmake_exec="/usr/bin/cmake"
+if [ ! -x $cmake_exec ]; then
+    cmake_exec="/usr/local/bin/cmake"
+fi
+if [ ! -x $cmake_exec ]; then
+    cmake_exec="${HOME}/local/bin/cmake"
+fi
+if [ ! -x $cmake_exec ]; then
+    echo "$0: modify this script to put the correct location of cmake."
+    exit 1
+fi
+
+## Check input parameters and process inputs (if needed)
+if [ "$#" -eq 1 ]; then
+    valid_extensions=("zip" "tar" "tar.gz" "tar.bz2")
+    actual_ext=""
+    for ext in ${valid_extensions[@]}; do
+        if [ `basename $1 $ext` != $1 ]; then
+            actual_ext=$ext
+        fi
+    done
+    if [ "x$actual_ext" == "x" ]; then
+        echo "$0: Invalid file type."
+        exit 1
+    fi
+    canonical_path=`readlink -e $1`
+    source_dir=`dirname $canonical_path`/`basename $1 .$actual_ext`
+    build_dir=`dirname $canonical_path`/`basename $1 .$actual_ext`-build
+    echo -n "Cleaning directories... "
+    rm -rf $source_dir
+    rm -rf $build_dir
+    echo "done."
+    echo -n "Creating directories... "
+    mkdir -p $source_dir
+    mkdir -p $build_dir
+    echo "done."
+    echo -n "Extracting sources... "
+    if [ "$actual_ext" == "zip" ]; then
+        echo unzip $canonical_path
+    elif [ "$actual_ext" == "tar" ]; then
+        tar xf $canonical_path -C $source_dir --strip-components=1
+    elif [ "$actual_ext" == "tar.gz" ]; then
+        tar xzf $canonical_path -C $source_dir --strip-components=1
+    elif [ "$actual_ext" == "tar.bz2" ]; then
+        tar xjf $canonical_path -C $source_dir --strip-components=1
+    else
+        echo "$0: Invalid file type."
+        exit 1
+    fi
+    echo "done!"
+elif [ "$#" -eq 2 ]; then
+    source_dir=`dirname $1`
+    build_dir=`dirname $2`
+else
+    echo "Usage: [itk_package] or [itk_source_dir itk_build_dir]" 
+fi
+
+echo "Given source dir : \"$source_dir\""
+echo "Given build dir  : \"$build_dir\""
+
+echo "Configuring sources... "
+cd $build_dir
+$cmake_exec \
+    -DCMAKE_CXX_FLAGS:STRING=-std=c++11 \
+    -DBUILD_DOCUMENTATION:BOOL=OFF \
+    -DBUILD_EXAMPLES:BOOL=OFF \
+    -DBUILD_SHARED_LIBS:BOOL=ON \
+    -DBUILD_TESTING:BOOL=OFF \
+    -DCMAKE_BUILD_TYPE:STRING=MinSizeRel \
+    -DModule_ITKReview:BOOL=ON \
+    -DModule_ITKVtkGlue:BOOL=OFF \
+    -DCMAKE_INSTALL_PREFIX:PATH=${HOME}/local \
+    ${source_dir}
+echo "Configuring sources... done."
+
+echo "Compiling sources..."
+cd $build_dir
+make $number_of_processes
+echo "Compiling sources... done."
+
+echo "Installing package..."
+cd $build_dir
+make -j install
+echo "Installing package... done."
+
+## eof - $RCSfile$
diff --git a/third_party_installers/cpPlugins_Install_QT4.sh b/third_party_installers/cpPlugins_Install_QT4.sh
new file mode 100755 (executable)
index 0000000..cb3afc3
--- /dev/null
@@ -0,0 +1,70 @@
+#!/bin/bash
+
+## Check input parameters and process inputs (if needed)
+if [ "$#" -eq 1 ]; then
+    valid_extensions=("zip" "tar" "tar.gz" "tar.bz2")
+    actual_ext=""
+    for ext in ${valid_extensions[@]}; do
+        if [ `basename $1 $ext` != $1 ]; then
+            actual_ext=$ext
+        fi
+    done
+    if [ "x$actual_ext" == "x" ]; then
+        echo "$0: Invalid file type."
+        exit 1
+    fi
+    canonical_path=`readlink -e $1`
+    source_dir=`dirname $canonical_path`/`basename $1 .$actual_ext`
+    build_dir=`dirname $canonical_path`/`basename $1 .$actual_ext`-build
+    echo -n "Cleaning directories... "
+    rm -rf $source_dir
+    rm -rf $build_dir
+    echo "done."
+    echo -n "Creating directories... "
+    mkdir -p $source_dir
+    mkdir -p $build_dir
+    echo "done."
+    echo -n "Extracting sources... "
+    if [ "$actual_ext" == "zip" ]; then
+        echo unzip $canonical_path
+    elif [ "$actual_ext" == "tar" ]; then
+        tar xf $canonical_path -C $source_dir --strip-components=1
+    elif [ "$actual_ext" == "tar.gz" ]; then
+        tar xzf $canonical_path -C $source_dir --strip-components=1
+    elif [ "$actual_ext" == "tar.bz2" ]; then
+        tar xjf $canonical_path -C $source_dir --strip-components=1
+    else
+        echo "$0: Invalid file type."
+        exit 1
+    fi
+    echo "done!"
+elif [ "$#" -eq 2 ]; then
+    source_dir=`dirname $1`
+    build_dir=`dirname $2`
+else
+    echo "Usage: [qt4_package] or [qt4_source_dir qt4_build_dir]" 
+fi
+
+echo "Given source dir : \"$source_dir\""
+echo "Given build dir  : \"$build_dir\""
+
+echo "Configuring sources... "
+cd $build_dir
+$source_dir/configure \
+    -prefix ${HOME}/local \
+    -release -opensource -shared -fast -no-webkit \
+    -optimized-qmake -no-framework \
+    -confirm-license yes
+echo "Configuring sources... done."
+
+echo "Compiling sources..."
+cd $build_dir
+make
+echo "Compiling sources... done."
+
+echo "Installing package..."
+cd $build_dir
+make -j install
+echo "Installing package... done."
+
+## eof - $RCSfile$
diff --git a/third_party_installers/cpPlugins_Install_VTK.sh b/third_party_installers/cpPlugins_Install_VTK.sh
new file mode 100755 (executable)
index 0000000..59c3b8a
--- /dev/null
@@ -0,0 +1,107 @@
+#!/bin/bash
+
+## Some configuration variables
+number_of_processes="-j4"
+
+## Locate cmake executable
+cmake_exec="/usr/bin/cmake"
+if [ ! -x $cmake_exec ]; then
+    cmake_exec="/usr/local/bin/cmake"
+fi
+if [ ! -x $cmake_exec ]; then
+    cmake_exec="${HOME}/local/bin/cmake"
+fi
+if [ ! -x $cmake_exec ]; then
+    echo "$0: modify this script to put the correct location of cmake."
+    exit 1
+fi
+
+## Locate qmake executable
+cmake_exec="/usr/bin/qmake"
+if [ ! -x $cmake_exec ]; then
+    cmake_exec="/usr/local/bin/qmake"
+fi
+if [ ! -x $cmake_exec ]; then
+    cmake_exec="${HOME}/local/bin/qmake"
+fi
+if [ ! -x $cmake_exec ]; then
+    echo "$0: modify this script to put the correct location of qmake."
+    exit 1
+fi
+
+## Check input parameters and process inputs (if needed)
+if [ "$#" -eq 1 ]; then
+    valid_extensions=("zip" "tar" "tar.gz" "tar.bz2")
+    actual_ext=""
+    for ext in ${valid_extensions[@]}; do
+        if [ `basename $1 $ext` != $1 ]; then
+            actual_ext=$ext
+        fi
+    done
+    if [ "x$actual_ext" == "x" ]; then
+        echo "$0: Invalid file type."
+        exit 1
+    fi
+    canonical_path=`readlink -e $1`
+    source_dir=`dirname $canonical_path`/`basename $1 .$actual_ext`
+    build_dir=`dirname $canonical_path`/`basename $1 .$actual_ext`-build
+    echo -n "Cleaning directories... "
+    rm -rf $source_dir
+    rm -rf $build_dir
+    echo "done."
+    echo -n "Creating directories... "
+    mkdir -p $source_dir
+    mkdir -p $build_dir
+    echo "done."
+    echo -n "Extracting sources... "
+    if [ "$actual_ext" == "zip" ]; then
+        echo unzip $canonical_path
+    elif [ "$actual_ext" == "tar" ]; then
+        tar xf $canonical_path -C $source_dir --strip-components=1
+    elif [ "$actual_ext" == "tar.gz" ]; then
+        tar xzf $canonical_path -C $source_dir --strip-components=1
+    elif [ "$actual_ext" == "tar.bz2" ]; then
+        tar xjf $canonical_path -C $source_dir --strip-components=1
+    else
+        echo "$0: Invalid file type."
+        exit 1
+    fi
+    echo "done!"
+elif [ "$#" -eq 2 ]; then
+    source_dir=`dirname $1`
+    build_dir=`dirname $2`
+else
+    echo "Usage: [vtk_package] or [vtk_source_dir vtk_build_dir]" 
+fi
+
+echo "Given source dir : \"$source_dir\""
+echo "Given build dir  : \"$build_dir\""
+
+echo "Configuring sources... "
+cd $build_dir
+$cmake_exec \
+    -DCMAKE_CXX_FLAGS:STRING=-std=c++11 \
+    -DBUILD_DOCUMENTATION:BOOL=OFF \
+    -DBUILD_EXAMPLES:BOOL=OFF \
+    -DBUILD_SHARED_LIBS:BOOL=ON \
+    -DBUILD_TESTING:BOOL=OFF \
+    -DCMAKE_BUILD_TYPE:STRING=MinSizeRel \
+    -DModule_vtkGUISupportQt:BOOL=ON \
+    -DModule_vtkGUISupportQtOpenGL:BOOL=ON \
+    -DModule_vtkGUISupportQtSQL:BOOL=OFF \
+    -DModule_vtkGUISupportQtWebkit:BOOL=OFF \
+    -DCMAKE_INSTALL_PREFIX:PATH=${HOME}/local \
+    ${source_dir}
+echo "Configuring sources... done."
+
+echo "Compiling sources..."
+cd $build_dir
+make $number_of_processes
+echo "Compiling sources... done."
+
+echo "Installing package..."
+cd $build_dir
+make -j install
+echo "Installing package... done."
+
+## eof - $RCSfile$