]> Creatis software - cpPlugins.git/commitdiff
...
authorLeonardo Flórez-Valencia <florez-l@javeriana.edu.co>
Fri, 11 Nov 2016 00:55:10 +0000 (19:55 -0500)
committerLeonardo Flórez-Valencia <florez-l@javeriana.edu.co>
Fri, 11 Nov 2016 00:55:10 +0000 (19:55 -0500)
52 files changed:
CMakeLists.txt
appli/bash/CMakeLists.txt
appli/examples/plugins/CMakeLists.txt
cmake/KitwareTools.cmake
cmake/Options.cmake
cmake/QtTools.cmake
lib/CMakeLists.txt
lib/Instances/BaseObjects.i
lib/Instances/CMakeLists.txt
lib/Instances/ImageComplexFilters.i
lib/Instances/ImageFiltersBases.i
lib/Instances/ImageInterpolators.i
lib/Instances/Images.i [moved from lib/Instances/SimpleImages.i with 73% similarity]
lib/Instances/NeighborhoodIterators.i [moved from lib/Instances/ImageNeighborhoodIterators.i with 100% similarity]
lib/Instances/Paths.i
lib/Instances/SimpleIterators.i [moved from lib/Instances/ImageIterators.i with 100% similarity]
lib/cpPlugins/BaseObjects/DataObject.cxx
lib/cpPlugins/BaseObjects/DataObject.h
lib/cpPlugins/BaseObjects/Object.cxx
lib/cpPlugins/BaseObjects/Object.h
lib/cpPlugins/BaseObjects/Object.hxx [deleted file]
lib/cpPlugins/BaseObjects/Parameters.cxx
lib/cpPlugins/BaseObjects/ProcessObject.cxx
lib/cpPlugins/BaseObjects/ProcessObject.h
lib/cpPlugins/Config.h.in
lib/cpPlugins/DataObjects/BoundingBox.cxx [deleted file]
lib/cpPlugins/DataObjects/BoundingBox.h [deleted file]
lib/cpPlugins/DataObjects/Image.cxx
lib/cpPlugins/DataObjects/Image.h
lib/cpPlugins/DataObjects/Mesh.cxx
lib/cpPlugins/DataObjects/Mesh.d
lib/cpPlugins/DataObjects/Mesh.h
lib/cpPlugins/DataObjects/OrthoNormalBase.cxx [deleted file]
lib/cpPlugins/DataObjects/OrthoNormalBase.h [deleted file]
lib/cpPlugins/DataObjects/OrthoNormalBase.hxx [deleted file]
lib/cpPlugins/DataObjects/PolyLineParametricPath.h [deleted file]
lib/cpPlugins/DataObjects/Simple3DCurve.cxx [deleted file]
lib/cpPlugins/DataObjects/Simple3DCurve.d [deleted file]
lib/cpPlugins/DataObjects/Simple3DCurve.h [deleted file]
lib/cpPlugins/DataObjects/Skeleton.h [deleted file]
lib/cpPlugins/Interface/Plugins.cxx
lib/cpPlugins/Utility.h [new file with mode: 0644]
plugins/CMakeLists.txt
plugins/Extensions/Extensions.i [new file with mode: 0644]
plugins/Extensions/PolyLineParametricPath.cxx [moved from lib/cpPlugins/DataObjects/PolyLineParametricPath.cxx with 78% similarity]
plugins/Extensions/PolyLineParametricPath.d [moved from lib/cpPlugins/DataObjects/PolyLineParametricPath.d with 100% similarity]
plugins/Extensions/PolyLineParametricPath.h [new file with mode: 0644]
plugins/Extensions/Skeleton.cxx [moved from lib/cpPlugins/DataObjects/Skeleton.cxx with 81% similarity]
plugins/Extensions/Skeleton.d [moved from lib/cpPlugins/DataObjects/Skeleton.d with 100% similarity]
plugins/Extensions/Skeleton.h [new file with mode: 0644]
plugins/IO/ImageJSkeletonWriter.cxx
plugins/IO/ImageWriter.cxx

index ad24e393a265276eb1560cc3d790ea8e79132754..726395909b36eef4c1799e6ca96eb4f40d44f2ea 100644 (file)
@@ -38,20 +38,14 @@ SET(prj_SHORT_VERSION "${prj_MAJOR_VERSION}")
 INCLUDE(cmake/Restrictions.cmake)
 INCLUDE(cmake/Options.cmake)
 INCLUDE(cmake/KitwareTools.cmake)
-OPTION(USE_QT4 "Build Qt4-based code" OFF)
-IF(USE_QT4)
-  INCLUDE(cmake/QtTools.cmake)
-  SET(
-    cpPlugins_Qt4_VTKWidget QVTKWidget
-    CACHE STRING "Base Qt4-based vtkRenderWindow"
-    )
-ENDIF(USE_QT4)
+INCLUDE(cmake/QtTools.cmake)
 INCLUDE(cmake/Functions.cmake)
 
 ## ===========================
 ## == Build different parts ==
 ## ===========================
 
-SUBDIRS(appli cmake lib plugins)
+#SUBDIRS(appli cmake lib plugins)
+SUBDIRS(appli lib plugins)
 
 ## eof - $RCSfile$
index 53037b83f16acfa808371dd4c0c9f17927f073f9..8efd6f8c4854377d16813e7e42d5256c8b4b50bd 100644 (file)
@@ -7,7 +7,6 @@ INCLUDE_DIRECTORIES(
   ${PROJECT_SOURCE_DIR}/appli
   ${PROJECT_BINARY_DIR}/appli
   )
-
 SET(
   _bash_APPS
   CreateRealConfig
index e1f396bd35028707d692014b157b7afe27fd4e74..89190b60c77a711197377330d66157e4003f71ca 100644 (file)
@@ -21,7 +21,7 @@ FOREACH(_src ${all_SOURCE_CXX_FILES})
   ADD_EXECUTABLE(${_pfx}_${_name} ${_src})
   TARGET_LINK_LIBRARIES(
     ${_pfx}_${_name}
-    cpPlugins
+    cpPlugins cpExtensions
     )
 ENDFOREACH(_src)
 
index a120bb210298a03c947e3f64dbc630502be56a1a..b4493d2951ee5a7ed629b51a02589e07c1bd038c 100644 (file)
@@ -3,9 +3,9 @@
 # ======================
 
 FIND_PACKAGE(ITK REQUIRED)
-INCLUDE(${ITK_USE_FILE})
-
 FIND_PACKAGE(VTK REQUIRED)
+
+INCLUDE(${ITK_USE_FILE})
 INCLUDE(${VTK_USE_FILE})
 
 # ===================================================
index c745a7be9b85576aad21a62d7d5eb9e1f539a90e..edd812663cbc30231a902277c3d2a46a5c879088 100644 (file)
@@ -3,7 +3,6 @@
 ## ===============================
 
 SET(cpPlugins_CONFIG_NUMBER_OF_FILES "10" CACHE STRING "Number of compiled files.")
-SET(cpPlugins_CONFIG_BOOLEAN_TYPES "bool" CACHE STRING "Accepted boolean types.")
 SET(cpPlugins_CONFIG_INTEGER_TYPES "char;short;int;long" CACHE STRING "Accepted integer types.")
 SET(cpPlugins_CONFIG_REAL_TYPES "float;double" CACHE STRING "Accepted real types.")
 SET(cpPlugins_CONFIG_PROCESS_DIMENSIONS "1;2;3;4" CACHE STRING "Accepted processing dimensions.")
@@ -15,7 +14,6 @@ SET(cpPlugins_CONFIG_MATRICES "Matrix" CACHE STRING "Accepted matrices.")
 
 SET(
   _all_configs
-  cpPlugins_CONFIG_BOOLEAN_TYPES
   cpPlugins_CONFIG_INTEGER_TYPES
   cpPlugins_CONFIG_REAL_TYPES
   cpPlugins_CONFIG_PROCESS_DIMENSIONS
index a49b3d54e3efa1f937cdab70226a359d3f984436..8e884b046fab187e446b1febfe824311185e6b05 100644 (file)
@@ -2,14 +2,14 @@
 ## == Find Qt4 and check if it was well configured ==
 ## ==================================================
 
-SET(QT4_FOUND "0")
+OPTION(USE_QT4 "Build Qt4-based code" OFF)
 IF(USE_QT4)
+  SET(QT4_FOUND "0")
   FIND_PACKAGE(Qt4 REQUIRED)
   INCLUDE(${QT_USE_FILE})
   SET(
     _modules
     vtkGUISupportQt
-    vtkGUISupportQtOpenGL
     )
   FOREACH(_m ${_modules})
     IF(NOT ${_m}_LOADED)
@@ -18,6 +18,11 @@ IF(USE_QT4)
     ENDIF(NOT ${_m}_LOADED)
   ENDFOREACH(_m)
   SET(QT4_FOUND "1")
+  SET(
+    cpPlugins_Qt4_VTKWidget
+    QVTKWidget
+    CACHE STRING "Base Qt4-based vtkRenderWindow"
+    )
 ENDIF(USE_QT4)
 
 ## eof - $RCSfile$
index a6a7f21e0361a5e506db4441fd748ba03f1d47ac..e22264656433090548ba477665e65bc5c5b73f63 100644 (file)
@@ -1,22 +1,19 @@
-## ====================
-## == Base libraries ==
-## ====================
+
+## =====================
+## == Build instances ==
+## =====================
+
+SUBDIRS(Instances)
+
+## ===========================
+## == Third party libraries ==
+## ===========================
 
 CompileLibFromDir(cp_tinyxml2 SHARED tinyxml2)
 IF(USE_QT4)
   CompileLibFromDir(cp_QCustomPlot SHARED QCustomPlot)
   TARGET_LINK_LIBRARIES(cp_QCustomPlot ${QT_LIBRARIES})
 ENDIF(USE_QT4)
-CompileLibFromDir(cpExtensions SHARED cpExtensions)
-TARGET_LINK_LIBRARIES(
-  cpExtensions ${QT_LIBRARIES} ${ITK_LIBRARIES} ${VTK_LIBRARIES}
-  )
-
-## ===============
-## == Instances ==
-## ===============
-
-SUBDIRS(Instances)
 
 ## ==================
 ## == Main library ==
@@ -28,70 +25,32 @@ ADD_CUSTOM_COMMAND(
   COMMAND ${cpPlugins_bash_CreateRealConfig_APP} ${CMAKE_CURRENT_BINARY_DIR}/cpPlugins/RealConfig.h
   DEPENDS ${cpPlugins_bash_CreateRealConfig_APP}
   )
-INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}/Instances)
-CompileLibFromDir(cpPlugins SHARED cpPlugins ${CMAKE_CURRENT_BINARY_DIR}/cpPlugins/RealConfig.h)
+CompileLibFromDir(
+  cpPlugins SHARED cpPlugins
+  ${CMAKE_CURRENT_BINARY_DIR}/cpPlugins/RealConfig.h
+  )
 TARGET_LINK_LIBRARIES(
   cpPlugins
   cp_tinyxml2
-  cpExtensions
   ${QT_LIBRARIES} ${ITK_LIBRARIES} ${VTK_LIBRARIES}
   ${cpPlugins_Instances}
   )
 
-## =========================
-## == Even more libraries ==
-## =========================
-
-CompileLibFromDir(cpBaseQtApplication SHARED cpBaseQtApplication)
-TARGET_LINK_LIBRARIES(cpBaseQtApplication cpPlugins)
-
-## ====================
-## == Base libraries ==
-## ====================
+## =====================
+## == Other libraries ==
+## =====================
 
+CompileLibFromDir(cpExtensions SHARED cpExtensions)
+TARGET_LINK_LIBRARIES(
+  cpExtensions
+  ${QT_LIBRARIES} ${ITK_LIBRARIES} ${VTK_LIBRARIES}
+  )
 IF(USE_QT4)
-  SET(
-    cpPlugins_BaseLibraries
-    cp_tinyxml2
-    cp_QCustomPlot
-    cpExtensions
-    cpPlugins
-    CACHE INTERNAL "All locally compiled libraries." FORCE
-    )
-ELSE(USE_QT4)
-  SET(
-    cpPlugins_BaseLibraries
-    cp_tinyxml2
-    cpExtensions
-    cpPlugins
-    CACHE INTERNAL "All locally compiled libraries." FORCE
-    )
+  CompileLibFromDir(cpBaseQtApplication SHARED cpBaseQtApplication)
+  TARGET_LINK_LIBRARIES(
+    cpBaseQtApplication
+    cpPlugins cpExtensions
+  )
 ENDIF(USE_QT4)
 
-## ===================================
-## == Libraries to dynamically load ==
-## ===================================
-
-SET(_pre ${CMAKE_SHARED_LIBRARY_PREFIX})
-SET(_suf ${CMAKE_SHARED_LIBRARY_SUFFIX})
-
-SET(cpPlugins_DynLibs "${CMAKE_INSTALL_PREFIX}/bin/${_pre}cpExtensions${_suf}")
-LIST(APPEND cpPlugins_DynLibs "${CMAKE_INSTALL_PREFIX}/lib/${_pre}cpExtensions${_suf}")
-LIST(APPEND cpPlugins_DynLibs "${LIBRARY_OUTPUT_PATH}/${_pre}cpExtensions${_suf}")
-FOREACH(_lib ${cpPlugins_Instances})
-  LIST(APPEND cpPlugins_DynLibs "${CMAKE_INSTALL_PREFIX}/bin/${_pre}${_lib}${_suf}")
-  LIST(APPEND cpPlugins_DynLibs "${CMAKE_INSTALL_PREFIX}/lib/${_pre}${_lib}${_suf}")
-  LIST(APPEND cpPlugins_DynLibs "${LIBRARY_OUTPUT_PATH}/${_pre}${_lib}${_suf}")
-ENDFOREACH(_lib)
-LIST(APPEND cpPlugins_DynLibs "${VTK_INSTALL_PREFIX}/bin/*vtk*${_suf}")
-LIST(APPEND cpPlugins_DynLibs "${VTK_INSTALL_PREFIX}/lib/*vtk*${_suf}")
-LIST(APPEND cpPlugins_DynLibs "${ITK_INSTALL_PREFIX}/bin/*itk*${_suf}")
-LIST(APPEND cpPlugins_DynLibs "${ITK_INSTALL_PREFIX}/lib/*itk*${_suf}")
-LIST(APPEND cpPlugins_DynLibs "${ITK_INSTALL_PREFIX}/bin/*ITK*${_suf}")
-LIST(APPEND cpPlugins_DynLibs "${ITK_INSTALL_PREFIX}/lib/*ITK*${_suf}")
-FILE(WRITE ${PROJECT_BINARY_DIR}/cpPlugins_Libraries.config "")
-FOREACH(_lib ${cpPlugins_DynLibs})
-  FILE(APPEND ${PROJECT_BINARY_DIR}/cpPlugins_Libraries.config "${_lib}\n")
-ENDFOREACH(_lib)
-
-## eof - $RCSfilfe$
+## eof - $RCSfile$
index 9525c8b879f360664e6f675beb483a76993e7cd3..8575d6662c1111e8ed0775fd692a391360568fa4 100644 (file)
@@ -1,34 +1,32 @@
 header #define ITK_MANUAL_INSTANTIATION
 
-define other_dims=6;8;10
+define arrays=Array2D;Array;#color_pixels#
+define fixed_dims=#process_dims#;8
 
-tinclude itkArray2D:h|hxx
-tinclude itkArray:h|hxx
+tinclude itk#arrays#:h|hxx
 tinclude itkFixedArray:h|hxx
-tinclude itk#color_pixels#:h|hxx
+tinclude itk#diff_tensors#:h|hxx
 tinclude itk#vectors#:h|hxx
 tinclude itk#matrices#:h|hxx
-tinclude itk#diff_tensors#:h|hxx
 tinclude itkSymmetricEigenAnalysis:h|hxx
 tinclude itkSimpleDataObjectDecorator:h|hxx
 tinclude itkVariableLengthVector:h|hxx
 
-instances itk::Array2D< #scalar_pixels# >
-instances itk::Array< #scalar_pixels# >
-instances itk::FixedArray< #scalar_pixels#, #process_dims# >
-instances itk::FixedArray< #scalar_pixels#, #other_dims# >
-instances itk::#color_pixels#< #scalar_pixels# >
-instances itk::#vectors#< #real_types#, #process_dims# >
+instances itk::SimpleDataObjectDecorator< #scalar_pixels# >
+instances itk::VariableLengthVector< #scalar_pixels# >
+
+instances itk::#arrays#< #scalar_pixels# >
+instances itk::FixedArray< #scalar_pixels#, #fixed_dims# >
 instances itk::#diff_tensors#< #real_types# >
+instances itk::#vectors#< #real_types#, #process_dims# >
 instances itk::#matrices#< #real_types#, #process_dims#, #process_dims# >
-instances itk::SymmetricEigenAnalysis< itk::Matrix< #real_types#, #process_dims#, #process_dims# >, itk::FixedArray< #real_types#, #process_dims# >, itk::Matrix< #real_types#, #process_dims#, #process_dims# > >
 
-instances itk::SimpleDataObjectDecorator< #scalar_pixels# >
-instances itk::VariableLengthVector< #scalar_pixels# >
+instances itk::SymmetricEigenAnalysis< itk::Matrix< #real_types#, #process_dims#, #process_dims# >, itk::FixedArray< #real_types#, #process_dims# >, itk::Matrix< #real_types#, #process_dims#, #process_dims# > >
 
 define my_vectors=FixedArray;Vector;Point
 
 minstances #_export_# std::ostream& itk::operator<< < #real_types#, #process_dims# >( std::ostream& a, itk::#my_vectors#< #real_types#, #process_dims# > const& b )
-minstances void #_export_# itk::VariableLengthVector<  #real_types# >::SetSize< itk::VariableLengthVector< #real_types# >::AlwaysReallocate, itk::VariableLengthVector< #real_types# >::KeepOldValues >( unsigned int, itk::VariableLengthVector< #real_types# >::AlwaysReallocate, itk::VariableLengthVector< #real_types# >::KeepOldValues )
+
+*minstances void #_export_# itk::VariableLengthVector<  #real_types# >::SetSize< itk::VariableLengthVector< #real_types# >::AlwaysReallocate, itk::VariableLengthVector< #real_types# >::KeepOldValues >( unsigned int, itk::VariableLengthVector< #real_types# >::AlwaysReallocate, itk::VariableLengthVector< #real_types# >::KeepOldValues )
 
 ** eof - $RCSfile$
index 623325a1b24ed296fc73b860a4c7516e08d649bc..c418df6fe3903dcaa52595e8decb4c9d0b6e01c0 100644 (file)
@@ -1,42 +1,44 @@
+SET(_p cpInstances)
 SET(
   _all_defs
   BaseObjects
-  SimpleImages
-  ImageIterators
-  ImageNeighborhoodIterators
+  BoundingBoxes
+  Meshes
+  Images
+  SimpleIterators
+  NeighborhoodIterators
   ImageFiltersBases
   ImageComplexFilters
   ImageInterpolators
-  BoundingBoxes
-  Meshes
-  Paths
   Transforms
+  Paths
   )
 
 SET(_all_libs)
 FOREACH(_def ${_all_defs})
+  SET(_name ${_p}${_def})
   CompileInstances(
-    cpInstances_${_def}
+    ${_name}
     ${_def}.i
     ${cpPlugins_CONFIG_NUMBER_OF_FILES}
     )
-  LIST(APPEND _all_libs cpInstances_${_def})
+  LIST(APPEND _all_libs ${_name})
 ENDFOREACH(_def)
 SET(
   cpPlugins_Instances ${_all_libs}
   CACHE INTERNAL "All valid instances." FORCE
   )
 
-TARGET_LINK_LIBRARIES(cpInstances_BaseObjects ${ITK_LIBRARIES})
-TARGET_LINK_LIBRARIES(cpInstances_SimpleImages cpInstances_BaseObjects)
-TARGET_LINK_LIBRARIES(cpInstances_ImageIterators cpInstances_SimpleImages)
-TARGET_LINK_LIBRARIES(cpInstances_ImageNeighborhoodIterators cpInstances_SimpleImages)
-TARGET_LINK_LIBRARIES(cpInstances_ImageFiltersBases cpInstances_SimpleImages)
-TARGET_LINK_LIBRARIES(cpInstances_ImageComplexFilters cpInstances_ImageFiltersBases cpInstances_ImageIterators)
-TARGET_LINK_LIBRARIES(cpInstances_ImageInterpolators cpInstances_BaseObjects)
-TARGET_LINK_LIBRARIES(cpInstances_BoundingBoxes cpInstances_BaseObjects)
-TARGET_LINK_LIBRARIES(cpInstances_Meshes cpInstances_BoundingBoxes)
-TARGET_LINK_LIBRARIES(cpInstances_Paths cpInstances_BaseObjects ${VTK_LIBRARIES})
-TARGET_LINK_LIBRARIES(cpInstances_Transforms cpInstances_BaseObjects)
+TARGET_LINK_LIBRARIES(${_p}BaseObjects ${ITK_LIBRARIES})
+TARGET_LINK_LIBRARIES(${_p}BoundingBoxes ${_p}BaseObjects)
+TARGET_LINK_LIBRARIES(${_p}Meshes ${_p}BoundingBoxes)
+TARGET_LINK_LIBRARIES(${_p}Images ${_p}BaseObjects)
+TARGET_LINK_LIBRARIES(${_p}SimpleIterators ${_p}Images)
+TARGET_LINK_LIBRARIES(${_p}NeighborhoodIterators ${_p}Images)
+TARGET_LINK_LIBRARIES(${_p}ImageFiltersBases ${_p}Images)
+TARGET_LINK_LIBRARIES(${_p}ImageComplexFilters ${_p}ImageFiltersBases ${_p}SimpleIterators)
+TARGET_LINK_LIBRARIES(${_p}ImageInterpolators ${_p}BaseObjects)
+TARGET_LINK_LIBRARIES(${_p}Transforms ${_p}BaseObjects)
+TARGET_LINK_LIBRARIES(${_p}Paths ${_p}BaseObjects)
 
 ## eof - $RCSfilfe$
index 961364c9e71acb48509ba43c38d19f76e98e8b14..aca8b311e3fcdaa12e3ce544ce0b81b1f0cd6ce0 100644 (file)
@@ -1,16 +1,20 @@
 header #define ITK_MANUAL_INSTANTIATION
 
+define filters=ImageToImageFilter;InPlaceImageFilter
+
 cinclude itkCovariantVector.h
 
 tinclude itkImageToImageFilter:h|hxx
 tinclude itkInPlaceImageFilter:h|hxx
 tinclude itkRecursiveSeparableImageFilter:h|hxx
 
-instances itk::ImageToImageFilter< itk::Image< #scalar_pixels#, 3 >, itk::Image< #scalar_pixels#, 2 > >
-instances itk::ImageToImageFilter< itk::Image< #scalar_pixels#, 2 >, itk::Image< #scalar_pixels#, 3 > >
-instances itk::InPlaceImageFilter< itk::Image< #scalar_pixels#, 3 >, itk::Image< #scalar_pixels#, 2 > >
-instances itk::InPlaceImageFilter< itk::Image< #scalar_pixels#, 2 >, itk::Image< #scalar_pixels#, 3 > >
+instances itk::#filters#< itk::Image< #scalar_pixels#, 3 >, itk::Image< #scalar_pixels#, 2 > >
+instances itk::#filters#< itk::Image< #scalar_pixels#, 2 >, itk::Image< #scalar_pixels#, 3 > >
 
+instances itk::#filters#< itk::Image< itk::#color_pixels#< #in_scalar# >, #process_dims# >, itk::Image< #out_scalar#, #process_dims# > >
+instances itk::#filters#< itk::Image< #in_scalar#, #process_dims# >, itk::Image< itk::#color_pixels#< #out_scalar# >, #process_dims# > >
+instances itk::#filters#< itk::Image< itk::#vectors#< #in_real#, #process_dims# >, #process_dims# >, itk::Image< #out_real#, #process_dims# > >
+instances itk::#filters#< itk::Image< #in_real#, #process_dims# >, itk::Image< itk::#vectors#< #out_real#, #process_dims# >, #process_dims# > >
 instances itk::ImageToImageFilter< itk::Image< #scalar_pixels#, #process_dims# >, itk::Image< itk::CovariantVector< #real_types#, #process_dims# >, #process_dims# > >
 instances itk::ImageToImageFilter< itk::Image< itk::CovariantVector< #real_types#, #process_dims# >, #process_dims# >, itk::Image< #scalar_pixels#, #process_dims# > >
 instances itk::RecursiveSeparableImageFilter< itk::Image< #scalar_pixels#, #process_dims# >, itk::Image< #real_types#, #process_dims# > >
index ba3c732f07f5a4ea2ac7a36680e4bc48eb8d7241..fffbd89749ea733ca11bcb9ac6946918d0e5abc8 100644 (file)
@@ -1,9 +1,9 @@
 header #define ITK_MANUAL_INSTANTIATION
 
-define in_scalar_pixels=#scalar_pixels#
-define out_scalar_pixels=#scalar_pixels#
-define in_real_pixels=#real_types#
-define out_real_pixels=#real_types#
+define in_scalar=#scalar_pixels#
+define out_scalar=#scalar_pixels#
+define in_real=#real_types#
+define out_real=#real_types#
 define filters=ImageToImageFilter;InPlaceImageFilter
 
 tinclude itkImageSource:h|hxx
@@ -15,16 +15,16 @@ cinclude itk#vectors#.h
 cinclude itk#diff_tensors#.h
 cinclude itk#matrices#.h
 
-instances itk::ImageSource< itk::Image< #scalar_pixels#, #process_dims# > >
-instances itk::ImageSource< itk::Image< std::complex< #real_types# >, #process_dims# > >
-instances itk::ImageSource< itk::Image< itk::#color_pixels#< #scalar_pixels# >, #process_dims# > >
+define scalars=#scalar_pixels#;std::complex< #real_types# >;itk::#color_pixels#< #scalar_pixels# >
+
+instances itk::ImageSource< itk::Image< #scalars#, #process_dims# > >
 instances itk::ImageSource< itk::Image< itk::#vectors#< #real_types#, #process_dims# >, #process_dims# > >
 instances itk::ImageSource< itk::Image< itk::#diff_tensors#< #real_types# >, 3 > >
 instances itk::ImageSource< itk::Image< itk::#matrices#< #real_types#, #process_dims#, #process_dims# >, #process_dims# > >
 instances itk::ImageSource< itk::Image< itk::Offset< #process_dims# >, #process_dims# > >
 
-instances itk::#filters#< itk::Image< #in_scalar_pixels#, #process_dims# >, itk::Image< #out_scalar_pixels#, #process_dims# > >
-instances itk::#filters#< itk::Image< itk::#color_pixels#< #in_scalar_pixels# >, #process_dims# >, itk::Image< itk::#color_pixels#< #out_scalar_pixels# >, #process_dims# > >
-instances itk::#filters#< itk::Image< itk::#vectors#< #in_real_pixels#, #process_dims# >, #process_dims# >, itk::Image< itk::#vectors#< #out_real_pixels#, #process_dims# >, #process_dims# > >
+instances itk::#filters#< itk::Image< #in_scalar#, #process_dims# >, itk::Image< #out_scalar#, #process_dims# > >
+instances itk::#filters#< itk::Image< itk::#color_pixels#< #in_scalar# >, #process_dims# >, itk::Image< itk::#color_pixels#< #out_scalar# >, #process_dims# > >
+instances itk::#filters#< itk::Image< itk::#vectors#< #in_real#, #process_dims# >, #process_dims# >, itk::Image< itk::#vectors#< #out_real#, #process_dims# >, #process_dims# > >
 
 ** eof - $RCSfile$
index f4464fd312a0c892e8a128ff07f02f5a9b2ec994..c9214b4013c9b6ab287b55e2f3370d698ab2a109 100644 (file)
@@ -2,13 +2,16 @@ header #define ITK_MANUAL_INSTANTIATION
 
 define i_real=#real_types#
 define o_real=#real_types#
+define interp=Linear
 
 tinclude itkImageFunction:h|hxx
-tinclude itkLinearInterpolateImageFunction:h|hxx
+tinclude itk#interp#InterpolateImageFunction:h|hxx
+
+NearestNeighbor
 
 cinclude itkImage.h
 
 instances itk::ImageFunction< itk::Image< #scalar_pixels#, #process_dims# >, #i_real#, #o_real# >
-instances itk::LinearInterpolateImageFunction< itk::Image< #scalar_pixels#, #process_dims# >, #real_types# >
+instances itk::#interp#InterpolateImageFunction< itk::Image< #scalar_pixels#, #process_dims# >, #real_types# >
 
 ** eof - $RCSfile$
similarity index 73%
rename from lib/Instances/SimpleImages.i
rename to lib/Instances/Images.i
index 6d20764a0206391e84ae78b67db292609b3b0281..7621b814f6025e34df85c1f1eca0e31f035f2d52 100644 (file)
@@ -1,9 +1,9 @@
 header #define ITK_MANUAL_INSTANTIATION
 
-tinclude itkImageRegion:h|hxx
-tinclude itkImageBase:h|hxx
-tinclude itkImage:h|hxx
 tinclude itkImportImageContainer:h|hxx
+tinclude itkImage:h|hxx
+tinclude itkImageBase:h|hxx
+tinclude itkImageRegion:h|hxx
 
 cinclude complex
 cinclude itk#color_pixels#.h
@@ -11,19 +11,18 @@ cinclude itk#vectors#.h
 cinclude itk#diff_tensors#.h
 cinclude itk#matrices#.h
 
-instances itk::ImportImageContainer< unsigned long, #scalar_pixels# >
-instances itk::ImportImageContainer< unsigned long, std::complex< #real_types# > >
-instances itk::ImportImageContainer< unsigned long, itk::#color_pixels#< #scalar_pixels# > >
+define scalars=#scalar_pixels#;std::complex< #real_types# >;itk::#color_pixels#< #scalar_pixels# >
+
+instances itk::ImportImageContainer< unsigned long, #scalars# >
 instances itk::ImportImageContainer< unsigned long, itk::#vectors#< #real_types#, #process_dims# > >
 instances itk::ImportImageContainer< unsigned long, itk::#diff_tensors#< #real_types# > >
 instances itk::ImportImageContainer< unsigned long, itk::#matrices#< #real_types#, #process_dims#, #process_dims# > >
 instances itk::ImportImageContainer< unsigned long, itk::Offset< #process_dims# > >
+
 instances itk::ImageRegion< #process_dims# >
 instances itk::ImageBase< #process_dims# >
 
-instances itk::Image< #scalar_pixels#, #process_dims# >
-instances itk::Image< std::complex< #real_types# >, #process_dims# >
-instances itk::Image< itk::#color_pixels#< #scalar_pixels# >, #process_dims# >
+instances itk::Image< #scalars#, #process_dims# >
 instances itk::Image< itk::#vectors#< #real_types#, #process_dims# >, #process_dims# >
 instances itk::Image< itk::#diff_tensors#< #real_types# >, 3 >
 instances itk::Image< itk::#matrices#< #real_types#, #process_dims#, #process_dims# >, #process_dims# >
index ccacd8ffeb6c3a4f81ccf9cb860bb8ab46a48ea2..a9dcd21699740144b47d584a8fbc74c7ffdb84d8 100644 (file)
@@ -3,18 +3,11 @@ header #define ITK_MANUAL_INSTANTIATION
 tinclude itkPath:h|hxx
 tinclude itkParametricPath:h|hxx
 tinclude itkPolyLineParametricPath:h|hxx
-tinclude cpExtensions/DataStructures/PolyLineParametricPath:h|hxx
-tinclude cpExtensions/DataStructures/Skeleton:h|hxx
-tinclude cpExtensions/Algorithms/BezierCurveFunction:h|hxx
 
 cinclude itkVectorContainer.hxx
-cinclude cpExtensions/DataStructures/Graph.hxx
 
-instances cpExtensions::Algorithms::BezierCurveFunction< itk::Vector< #real_types#, #process_dims# > >
 instances itk::Path< #real_types#, itk::ContinuousIndex< #real_types#, #process_dims# >, #process_dims# >
 instances itk::ParametricPath< #process_dims# >
 instances itk::PolyLineParametricPath< #process_dims# >
-instances cpExtensions::DataStructures::PolyLineParametricPath< #process_dims# >
-instances cpExtensions::DataStructures::Skeleton< #process_dims# >
 
 ** eof - $RCSfile$
index aeb24cd95090d399e4143c91a39d08de5d76f90a..2b53a32de3fdc4c1cfb58e4f10c313d140a89aa0 100644 (file)
@@ -45,8 +45,8 @@ void cpPlugins::BaseObjects::DataObject::
 DisconnectFromPipeline( )
 {
   // Disconnect input pipelines (ITK)
-  itk::DataObject* itk_obj = this->GetITK< itk::DataObject >( );
-  if( itk_obj != NULL )
+  itk::DataObject::Pointer itk_obj = this->GetITK< itk::DataObject >( );
+  if( itk_obj.IsNotNull( ) )
     itk_obj->DisconnectPipeline( );
 
   // Disconnect input pipelines (VTK)
index a09ccdf9ba7a678f87598491cde7055a5b8ce128..672b746101c67cb68567344e688dfc66bfbe3d41 100644 (file)
@@ -40,7 +40,7 @@ namespace cpPlugins
       virtual ~DataObject( );
 
       template< class _TType >
-        inline bool _DisconnectVTK( );
+      inline bool _DisconnectVTK( );
 
     private:
       // Purposely not implemented
index 89d7fe6a59c4c5a4a60d7ceb44a08c398dc56c8f..e372c99747f1584e611479ea0efb9dd5014e5575 100644 (file)
@@ -23,7 +23,7 @@ SetViewCoords( float x, float y )
 {
   this->m_ViewX = x;
   this->m_ViewY = y;
-  // WARNING: do not call "this->Modified( )" -> It could lead to a
+  // WARNING: do not call "this->Modified( )" -> It could lead to
   //          re-execution of all pipeline
 }
 
@@ -51,8 +51,8 @@ GetMTime( ) const
   else if( i != NULL && v != NULL )
   {
     auto iTime = i->GetMTime( );
-    auto vTime = i->GetMTime( );
-    return( itk::ModifiedTimeType( ( iTime > vTime )? iTime: vTime ) );
+    auto vTime = v->GetMTime( );
+    return( itk::ModifiedTimeType( ( iTime < vTime )? vTime: iTime ) );
   }
   else
     return( this->Superclass::GetMTime( ) );
index 4d0ab88105fde6369e979fc6f0085928435f4d7d..6dcfae1e4ec236ba539842f00d0e3e5f67779030 100644 (file)
@@ -42,16 +42,28 @@ namespace cpPlugins
       virtual void SetVTK( vtkObjectBase* o );
 
       template< class _TType = itk::LightObject >
-        inline _TType* GetITK( );
+      inline _TType* GetITK( )
+        { return( dynamic_cast< _TType* >( this->m_ITK.GetPointer( ) ) ); }
 
       template< class _TType = itk::LightObject >
-        inline const _TType* GetITK( ) const;
+      inline const _TType* GetITK( ) const
+        {
+          return(
+            dynamic_cast< const _TType* >( this->m_ITK.GetPointer( ) )
+            );
+        }
 
       template< class _TType = vtkObjectBase >
-        inline _TType* GetVTK( );
+      inline _TType* GetVTK( )
+        { return( dynamic_cast< _TType* >( this->m_VTK.GetPointer( ) ) ); }
 
       template< class _TType = vtkObjectBase >
-        inline const _TType* GetVTK( ) const;
+      inline const _TType* GetVTK( ) const
+        {
+          return(
+            dynamic_cast< const _TType* >( this->m_VTK.GetPointer( ) )
+            );
+        }
 
     protected:
       Object( );
@@ -74,8 +86,6 @@ namespace cpPlugins
 
 } // ecapseman
 
-#include <cpPlugins/BaseObjects/Object.hxx>
-
 #endif // __cpPlugins__BaseObjects__Object__h__
 
 // eof - $RCSfile$
diff --git a/lib/cpPlugins/BaseObjects/Object.hxx b/lib/cpPlugins/BaseObjects/Object.hxx
deleted file mode 100644 (file)
index b07c3c7..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-#ifndef __cpPlugins__BaseObjects__Object__hxx__
-#define __cpPlugins__BaseObjects__Object__hxx__
-
-// -------------------------------------------------------------------------
-template< class _TType >
-_TType* cpPlugins::BaseObjects::Object::
-GetITK( )
-{
-  return( dynamic_cast< _TType* >( this->m_ITK.GetPointer( ) ) );
-}
-
-// -------------------------------------------------------------------------
-template< class _TType >
-const _TType* cpPlugins::BaseObjects::Object::
-GetITK( ) const
-{
-  return( dynamic_cast< const _TType* >( this->m_ITK.GetPointer( ) ) );
-}
-
-// -------------------------------------------------------------------------
-template< class _TType >
-_TType* cpPlugins::BaseObjects::Object::
-GetVTK( )
-{
-  return( dynamic_cast< _TType* >( this->m_VTK.GetPointer( ) ) );
-}
-
-// -------------------------------------------------------------------------
-template< class _TType >
-const _TType* cpPlugins::BaseObjects::Object::
-GetVTK( ) const
-{
-  return( dynamic_cast< const _TType* >( this->m_VTK.GetPointer( ) ) );
-}
-
-#endif // __cpPlugins__BaseObjects__Object__hxx__
-
-// eof - $RCSfile$
index 662d827eae96f9087dad1b6001f6348ee5a89193..d3adec4cf34c7904bf292d3df01219fdb590fffe 100644 (file)
@@ -1,5 +1,5 @@
 #include <cpPlugins/BaseObjects/Parameters.h>
-#include <cpExtensions/Utility.h>
+#include <cpPlugins/Utility.h>
 #include <tinyxml2/tinyxml2.h>
 
 // -------------------------------------------------------------------------
@@ -678,7 +678,7 @@ _GetList( const std::string& name ) const
     if( i->second.first == ( Self::Type )( _Enum ) )
     {
       std::vector< std::string > tokens;
-      cpExtensions::Tokenize( tokens, i->second.second, "#" );
+      cpPlugins::Tokenize( tokens, i->second.second, "#" );
       for( auto t = tokens.begin( ); t != tokens.end( ); ++t )
       {
         if( typeid( _Type ) != typeid( std::string ) )
index 7f8533ae25cf7bfaaf9d4d8a7162e0b5472cc007..f9845f734c5f680d12a271060dad2e596c452a51 100644 (file)
@@ -1,6 +1,6 @@
 #include <cpPlugins/BaseObjects/ProcessObject.h>
 #include <cpPlugins/QT/ParametersDialog.h>
-#include <cpExtensions/Utility.h>
+#include <cpPlugins/Utility.h>
 #include <itkProcessObject.h>
 #include <itkExceptionObject.h>
 
@@ -198,9 +198,9 @@ Update( )
 
     } // fi
 
-    auto t_start = cpExtensions_CHRONO;
+    auto t_start = cpPlugins_CHRONO;
     this->_GenerateData( );
-    auto t_end = cpExtensions_CHRONO;
+    auto t_end = cpPlugins_CHRONO;
     this->m_LastExecutionSpan = long( t_end - t_start );
     this->m_LastExecutionTime = this->GetMTime( );
 
index 18c9b2d0b9f9c7b92c8dfb12dc073dd621bc771c..dbc822b7cc9031890cb6268657922b7c8609b933 100644 (file)
@@ -62,32 +62,32 @@ namespace cpPlugins
       bool IsInputMultiple( const std::string& n ) const;
 
       template< class _TType = DataObject >
-        _TType* GetInput( const std::string& n, unsigned int i = 0 );
+      inline _TType* GetInput( const std::string& n, unsigned int i = 0 );
 
       template< class _TType = DataObject >
-        const _TType* GetInput(
-          const std::string& n, unsigned int i = 0
-          ) const;
+      inline const _TType* GetInput(
+        const std::string& n, unsigned int i = 0
+        ) const;
 
       template< class _TType = itk::LightObject >
-        _TType* GetInputData( const std::string& n, unsigned int i = 0 );
+      inline _TType* GetInputData( const std::string& n, unsigned int i = 0 );
 
       template< class _TType = itk::LightObject >
-        const _TType* GetInputData(
-          const std::string& n, unsigned int i = 0
-          ) const;
+      inline const _TType* GetInputData(
+        const std::string& n, unsigned int i = 0
+        ) const;
 
       template< class _TType = DataObject >
-        _TType* GetOutput( const std::string& n );
+      inline _TType* GetOutput( const std::string& n );
 
       template< class _TType = DataObject >
-        const _TType* GetOutput( const std::string& n ) const;
+      inline const _TType* GetOutput( const std::string& n ) const;
 
       template< class _TType = itk::LightObject >
-        _TType* GetOutputData( const std::string& n );
+      inline _TType* GetOutputData( const std::string& n );
 
       template< class _TType = itk::LightObject >
-        const _TType* GetOutputData( const std::string& n ) const;
+      inline const _TType* GetOutputData( const std::string& n ) const;
 
       // "Setters"
       virtual void AddInput( const std::string& n, DataObject* o );
@@ -117,18 +117,18 @@ namespace cpPlugins
 
       // For configuration purposes
       template< class _TType = DataObject >
-        void _ConfigureInput(
-          const std::string& name, bool required, bool multiple
-          );
+      inline void _ConfigureInput(
+        const std::string& name, bool required, bool multiple
+        );
 
       template< class _TType = DataObject >
-        void _ConfigureOutput( const std::string& name );
+      inline void _ConfigureOutput( const std::string& name );
 
       template< class _TFilter >
-        _TFilter* _CreateITK( );
+      inline _TFilter* _CreateITK( );
 
       template< class _TFilter >
-        _TFilter* _CreateVTK( );
+      inline _TFilter* _CreateVTK( );
 
       virtual void _GenerateData( ) = 0;
 
index 1540cb08de2a5e427101a753c6dcdb8cbb59277a..105f8b5330444243d353f3f0567501d6d0b9babf 100644 (file)
@@ -1,8 +1,8 @@
-#ifndef __@prj_NAME@__Config__h__
-#define __@prj_NAME@__Config__h__
+#ifndef __cpPlugins__Config__h__
+#define __cpPlugins__Config__h__
 
 #define ITK_MANUAL_INSTANTIATION
-#include <@prj_NAME@_Export.h>
+#include <cpPlugins_Export.h>
 #include <stdexcept>
 #include <cpPlugins/RealConfig.h>
 
  * Identify OS
  * =========================================================================
  */
-#define @prj_NAME@_OS_@CMAKE_SYSTEM_NAME@
-#ifdef @prj_NAME@_OS_Windows
-#  define @prj_NAME@_LIB_PREFIX     ""
-#  define @prj_NAME@_ENV_SEPARATOR  ";"
-#  define @prj_NAME@_PATH_SEPARATOR '\\'
-#  define @prj_NAME@_LIB_EXT        ".dll"
-#else // @prj_NAME@_OS_Windows
-#  define @prj_NAME@_LIB_PREFIX     "lib"
-#  define @prj_NAME@_ENV_SEPARATOR  ":"
-#  define @prj_NAME@_PATH_SEPARATOR '/'
-#  ifdef @prj_NAME@_OS_Linux
-#    define @prj_NAME@_LIB_EXT ".so"
-#  else // @prj_NAME@_OS_Linux
-#    define @prj_NAME@_LIB_EXT ".dylib"
-#  endif // @prj_NAME@_OS_Linux
-#endif // @prj_NAME@_OS_Windows
+#define cpPlugins_OS_@CMAKE_SYSTEM_NAME@
+#ifdef cpPlugins_OS_Windows
+#  define cpPlugins_LIB_PREFIX     ""
+#  define cpPlugins_ENV_SEPARATOR  ";"
+#  define cpPlugins_PATH_SEPARATOR '\\'
+#  define cpPlugins_LIB_EXT        ".dll"
+#else // cpPlugins_OS_Windows
+#  define cpPlugins_LIB_PREFIX     "lib"
+#  define cpPlugins_ENV_SEPARATOR  ":"
+#  define cpPlugins_PATH_SEPARATOR '/'
+#  ifdef cpPlugins_OS_Linux
+#    define cpPlugins_LIB_EXT ".so"
+#  else // cpPlugins_OS_Linux
+#    define cpPlugins_LIB_EXT ".dylib"
+#  endif // cpPlugins_OS_Linux
+#endif // cpPlugins_OS_Windows
 
-#ifdef @prj_NAME@_OS_Windows
+#ifdef cpPlugins_OS_Windows
 #  ifndef WIN32_LEAN_AND_MEAN
 #    define WIN32_LEAN_AND_MEAN
 #  endif // WIN32_LEAN_AND_MEAN
 #  define NOMINMAX
 #  include <windows.h>
 #  include <tchar.h>
-#endif // @prj_NAME@_OS_Windows
+#endif // cpPlugins_OS_Windows
 
 /*
  * =========================================================================
  * =========================================================================
  */
 
-#define @prj_NAME@_PATHS "@prj_NAME@_PATHS"
-#define @prj_NAME@_CONFIG "@prj_NAME@_Libraries.config"
-#define @prj_NAME@_QT4_USED @QT4_FOUND@
-#if @prj_NAME@_QT4_USED == 1
-#  define @prj_NAME@_QT4
-#  define @prj_NAME@_QVTKWidget @cpPlugins_Qt4_VTKWidget@
+#define cpPlugins_PATHS "cpPlugins_PATHS"
+#define cpPlugins_CONFIG "cpPlugins_Libraries.config"
+#define cpPlugins_QT4_USED @QT4_FOUND@
+#if cpPlugins_QT4_USED == 1
+#  define cpPlugins_QT4
+#  define cpPlugins_QVTKWidget @cpPlugins_Qt4_VTKWidget@
 #  include <@cpPlugins_Qt4_VTKWidget@.h>
-#else // @prj_NAME@_QT4_USED == 1
-#  undef @prj_NAME@_QT4
-#endif // @prj_NAME@_QT4_USED == 1
+#else // cpPlugins_QT4_USED == 1
+#  undef cpPlugins_QT4
+#endif // cpPlugins_QT4_USED == 1
 
 /*
  * =========================================================================
  * =========================================================================
  */
 
-#define @prj_NAME@_MAJOR_VERSION   @prj_MAJ_VER@
-#define @prj_NAME@_MINOR_VERSION   @prj_MIN_VER@
-#define @prj_NAME@_RELEASE_VERSION @prj_REL_VER@
-#define @prj_NAME@_VERSION         "@prj_VERSION@"
-#define @prj_NAME@_SHORT_VERSION   "@prj_SHORT_VERSION@"
-#define @prj_NAME@_OpenGL_BackEnd_@VTK_RENDERING_BACKEND@
+#define cpPlugins_MAJOR_VERSION   @prj_MAJ_VER@
+#define cpPlugins_MINOR_VERSION   @prj_MIN_VER@
+#define cpPlugins_RELEASE_VERSION @prj_REL_VER@
+#define cpPlugins_VERSION         "@prj_VERSION@"
+#define cpPlugins_SHORT_VERSION   "@prj_SHORT_VERSION@"
+#define cpPlugins_OpenGL_BackEnd_@VTK_RENDERING_BACKEND@
 
 /*
  * =========================================================================
  */
 
 #if __cplusplus >= 201103L
-#  define @prj_NAME@_OVERRIDE override
-#  define @prj_NAME@_DELETE_FUNCTION =delete
-#  define @prj_NAME@_NULLPTR  nullptr
-#  define @prj_NAME@_NOEXCEPT noexcept
-#  define @prj_NAME@_HAS_CXX11_STATIC_ASSERT
-#  define @prj_NAME@_HAS_CXX11_RVREF
+#  define cpPlugins_OVERRIDE override
+#  define cpPlugins_DELETE_FUNCTION =delete
+#  define cpPlugins_NULLPTR  nullptr
+#  define cpPlugins_NOEXCEPT noexcept
+#  define cpPlugins_HAS_CXX11_STATIC_ASSERT
+#  define cpPlugins_HAS_CXX11_RVREF
 #else // __cplusplus >= 201103L
-#  define @prj_NAME@_OVERRIDE
-#  define @prj_NAME@_DELETE_FUNCTION
-#  define @prj_NAME@_NULLPTR  NULL
-#  define @prj_NAME@_NOEXCEPT throw()
+#  define cpPlugins_OVERRIDE
+#  define cpPlugins_DELETE_FUNCTION
+#  define cpPlugins_NULLPTR  NULL
+#  define cpPlugins_NOEXCEPT throw()
 #endif // __cplusplus >= 201103L
 
 /*
  * =========================================================================
  */
 
-#define @prj_NAME@_Id_Macro( _class, _category )                        \
+#define cpPlugins_Id_Macro( _class, _category )                         \
   public:                                                               \
-  virtual const char* GetClassName( ) const @prj_NAME@_OVERRIDE         \
+  virtual const char* GetClassName( ) const cpPlugins_OVERRIDE          \
   { return( #_class ); }                                                \
-  virtual const char* GetClassCategory( ) const @prj_NAME@_OVERRIDE     \
+  virtual const char* GetClassCategory( ) const cpPlugins_OVERRIDE      \
   { return( #_category ); }
 
-#define @prj_NAME@Object( _cls, _scls, _cat )                           \
+#define cpPluginsObject( _cls, _scls, _cat )                            \
   public:                                                               \
   typedef _cls                            Self;                         \
   typedef _scls                           Superclass;                   \
   itkNewMacro( Self );                                                  \
   itkTypeMacro( _cls, _scls );                                          \
   public:                                                               \
-  virtual const char* GetClassName( ) const @prj_NAME@_OVERRIDE         \
+  virtual const char* GetClassName( ) const cpPlugins_OVERRIDE          \
   { return( #_cls ); }                                                  \
-  virtual const char* GetClassCategory( ) const @prj_NAME@_OVERRIDE     \
+  virtual const char* GetClassCategory( ) const cpPlugins_OVERRIDE      \
   { return( #_cat ); }                                                  \
   protected:                                                            \
   _cls( );                                                              \
   virtual ~_cls( );                                                     \
-  virtual void _GenerateData( ) @prj_NAME@_OVERRIDE;                    \
+  virtual void _GenerateData( ) cpPlugins_OVERRIDE;                     \
   private:                                                              \
   _cls( const Self& );                                                  \
   Self& operator=( const Self& )
 
-#define @prj_NAME@_Compatibility_Macro                                  \
+#define cpPlugins_Compatibility_Macro                                   \
   virtual bool IsCompatible(                                            \
     const DataObject* other                                             \
-    ) const @prj_NAME@_OVERRIDE                                         \
+    ) const cpPlugins_OVERRIDE                                          \
   {                                                                     \
-  return( dynamic_cast< const Self* >( other ) != NULL );               \
+    return( dynamic_cast< const Self* >( other ) != NULL );             \
   }
 
-#endif // __@prj_NAME@__Config__h__
+#endif // __cpPlugins__Config__h__
 
 // eof - $RCSfile$
diff --git a/lib/cpPlugins/DataObjects/BoundingBox.cxx b/lib/cpPlugins/DataObjects/BoundingBox.cxx
deleted file mode 100644 (file)
index 6ecf3f2..0000000
+++ /dev/null
@@ -1,190 +0,0 @@
-#include <cpPlugins/DataObjects/BoundingBox.h>
-#include <limits>
-#include <vtkDataSet.h>
-#include <cpInstances_SimpleImages.h>
-#include <cpInstances_Meshes.h>
-
-// -------------------------------------------------------------------------
-void cpPlugins::DataObjects::BoundingBox::
-SetDataObject( DataObject* o )
-{
-  auto i = o->GetITK< itk::LightObject >( );
-  auto v = o->GetVTK< vtkObjectBase >( );
-  if( v != NULL )      this->SetVTK( v );
-  else if( i != NULL ) this->SetITK( i );
-}
-
-// -------------------------------------------------------------------------
-void cpPlugins::DataObjects::BoundingBox::
-SetITK( itk::LightObject* o )
-{
-  bool     r = this->_ITKImage< 1 >( o );
-  if( !r ) r = this->_ITKImage< 2 >( o );
-  if( !r ) r = this->_ITKImage< 3 >( o );
-  if( !r ) r = this->_ITKImage< 4 >( o );
-  if( !r ) r = this->_ITKPointSet< float, 2 >( o );
-  if( !r ) r = this->_ITKPointSet< double, 2 >( o );
-  if( !r ) r = this->_ITKPointSet< float, 3 >( o );
-  if( !r ) r = this->_ITKPointSet< double, 3 >( o );
-  if( r )
-    this->_UpdateVTK( );
-}
-
-// -------------------------------------------------------------------------
-void cpPlugins::DataObjects::BoundingBox::
-SetVTK( vtkObjectBase* o )
-{
-  auto ds = dynamic_cast< vtkDataSet* >( o );
-  if( ds != NULL )
-  {
-    double bounds[ 6 ];
-    ds->GetBounds( bounds );
-    this->m_Points[ 0 ].clear( );
-    this->m_Points[ 1 ].clear( );
-    this->m_Points[ 0 ].push_back( bounds[ 0 ] );
-    this->m_Points[ 1 ].push_back( bounds[ 1 ] );
-    this->m_Points[ 0 ].push_back( bounds[ 2 ] );
-    this->m_Points[ 1 ].push_back( bounds[ 3 ] );
-    this->m_Points[ 0 ].push_back( bounds[ 4 ] );
-    this->m_Points[ 1 ].push_back( bounds[ 5 ] );
-    this->_UpdateVTK( );
-
-  } // fi
-}
-
-// -------------------------------------------------------------------------
-void cpPlugins::DataObjects::BoundingBox::
-Copy( Self* other )
-{
-  this->m_Points[ 0 ] = other->m_Points[ 0 ];
-  this->m_Points[ 1 ] = other->m_Points[ 1 ];
-  this->Modified( );
-}
-
-// -------------------------------------------------------------------------
-void cpPlugins::DataObjects::BoundingBox::
-Blend( Self* other )
-{
-  if( this->m_Points[ 0 ].size( ) < other->m_Points[ 0 ].size( ) )
-    this->m_Points[ 0 ].resize(
-      other->m_Points[ 0 ].size( ),
-      std::numeric_limits< double >::max( )
-      );
-  if( this->m_Points[ 1 ].size( ) < other->m_Points[ 1 ].size( ) )
-    this->m_Points[ 1 ].resize(
-      other->m_Points[ 1 ].size( ),
-      -std::numeric_limits< double >::max( )
-      );
-  for( unsigned int d = 0; d < this->m_Points[ 0 ].size( ); ++d )
-    if( other->m_Points[ 0 ][ d ] < this->m_Points[ 0 ][ d ] )
-      this->m_Points[ 0 ][ d ] = other->m_Points[ 0 ][ d ];
-  for( unsigned int d = 0; d < this->m_Points[ 1 ].size( ); ++d )
-    if( other->m_Points[ 1 ][ d ] > this->m_Points[ 1 ][ d ] )
-      this->m_Points[ 1 ][ d ] = other->m_Points[ 1 ][ d ];
-  this->Modified( );
-  this->_UpdateVTK( );
-}
-
-// -------------------------------------------------------------------------
-cpPlugins::DataObjects::BoundingBox::
-BoundingBox( )
-  : Superclass( )
-{
-  this->m_Points[ 0 ].push_back( double( 0 ) );
-  this->m_Points[ 1 ].push_back( double( 0 ) );
-  this->m_Outline = vtkSmartPointer< vtkOutlineSource >::New( );
-  this->_UpdateVTK( );
-}
-
-// -------------------------------------------------------------------------
-cpPlugins::DataObjects::BoundingBox::
-~BoundingBox( )
-{
-}
-
-// -------------------------------------------------------------------------
-void cpPlugins::DataObjects::BoundingBox::
-_UpdateVTK( )
-{
-  // Get bounds
-  double bounds[ 6 ] = { 0 };
-  unsigned int dim = this->m_Points[ 0 ].size( );
-  dim = ( this->m_Points[ 1 ].size( ) < dim )? this->m_Points[ 1 ].size( ): dim;
-  dim = ( dim < 3 )? dim: 3;
-  for( unsigned int d = 0; d < dim; ++d )
-  {
-    bounds[ d << 1 ] = this->m_Points[ 0 ][ d ];
-    bounds[ ( d << 1 ) + 1 ] = this->m_Points[ 1 ][ d ];
-
-  } // rof
-
-  // Update vtk objects
-  this->m_Outline->SetBounds( bounds );
-  this->m_Outline->Update( );
-  this->m_VTK = this->m_Outline->GetOutput( );
-}
-
-// -------------------------------------------------------------------------
-template< unsigned int _NDim >
-bool cpPlugins::DataObjects::BoundingBox::
-_ITKImage( itk::LightObject* o )
-{
-  auto image = dynamic_cast< itk::ImageBase< _NDim >* >( o );
-  if( image == NULL )
-    return( false );
-
-  auto region = image->GetLargestPossibleRegion( );
-  auto i0 = region.GetIndex( );
-  auto i1 = i0 + region.GetSize( );
-
-  typename itk::ImageBase< _NDim >::PointType p0, p1;
-  image->TransformIndexToPhysicalPoint( i0, p0 );
-  image->TransformIndexToPhysicalPoint( i1, p1 );
-  this->m_Points[ 0 ].clear( );
-  this->m_Points[ 1 ].clear( );
-
-  for( unsigned int d = 0; d < _NDim; ++d )
-  {
-    this->m_Points[ 0 ].push_back( double( p0[ d ] ) );
-    this->m_Points[ 1 ].push_back( double( p1[ d ] ) );
-
-  } // rof
-  this->Modified( );
-  return( true );
-}
-
-// -------------------------------------------------------------------------
-template< class _TScalar, unsigned int _NDim >
-bool cpPlugins::DataObjects::BoundingBox::
-_ITKPointSet( itk::LightObject* o )
-{
-  typedef itk::PointSet< _TScalar, _NDim > _TPointSet;
-  typedef itk::BoundingBox< typename _TPointSet::PointIdentifier, _NDim, _TScalar, typename _TPointSet::PointsContainer > _TBBox;
-
-  auto ps = dynamic_cast< _TPointSet* >( o );
-  if( ps == NULL )
-    return( false );
-
-  this->m_Points[ 0 ].clear( );
-  this->m_Points[ 1 ].clear( );
-
-  typename _TBBox::Pointer bb = _TBBox::New( );
-  bb->SetPoints( ps->GetPoints( ) );
-  if( bb->ComputeBoundingBox( ) )
-  {
-    auto p0 = bb->GetMinimum( );
-    auto p1 = bb->GetMaximum( );
-    for( unsigned int d = 0; d < _NDim; ++d )
-    {
-      this->m_Points[ 0 ].push_back( double( p0[ d ] ) );
-      this->m_Points[ 1 ].push_back( double( p1[ d ] ) );
-
-    } // rof
-    this->Modified( );
-    return( true );
-  }
-  else
-    return( false );
-}
-
-// eof - $RCSfile$
diff --git a/lib/cpPlugins/DataObjects/BoundingBox.h b/lib/cpPlugins/DataObjects/BoundingBox.h
deleted file mode 100644 (file)
index 11cf8c2..0000000
+++ /dev/null
@@ -1,115 +0,0 @@
-#ifndef __cpPlugins__DataObjects__BoundingBox__h__
-#define __cpPlugins__DataObjects__BoundingBox__h__
-
-#include <vector>
-#include <cpPlugins/BaseObjects/DataObject.h>
-#include <vtkOutlineSource.h>
-#include <vtkSmartPointer.h>
-
-namespace cpPlugins
-{
-  namespace DataObjects
-  {
-    /**
-     */
-    class cpPlugins_EXPORT BoundingBox
-      : public cpPlugins::BaseObjects::DataObject
-    {
-    public:
-      typedef BoundingBox                        Self;
-      typedef cpPlugins::BaseObjects::DataObject Superclass;
-      typedef itk::SmartPointer< Self >          Pointer;
-      typedef itk::SmartPointer< const Self >    ConstPointer;
-
-    public:
-      itkNewMacro( Self );
-      itkTypeMacro( BoundingBox, DataObject );
-      cpPlugins_Id_Macro( BoundingBox, Object );
-      cpPlugins_Compatibility_Macro;
-
-    public:
-      void SetDataObject( DataObject* o );
-      virtual void SetITK( itk::LightObject* o ) cpPlugins_OVERRIDE;
-      virtual void SetVTK( vtkObjectBase* o ) cpPlugins_OVERRIDE;
-
-      void Copy( Self* other );
-      void Blend( Self* other );
-
-      template< class _TPoint >
-      inline void SetMinimum( const _TPoint& p )
-        {
-          this->_SetPoint( 0, p );
-        }
-
-      template< class _TPoint >
-      inline void SetMaximum( const _TPoint& p )
-        {
-          this->_SetPoint( 1, p );
-        }
-
-      template< class _TPoint >
-      inline _TPoint GetMinimum( ) const
-        {
-          return( this->_GetPoint< _TPoint >( 0 ) );
-        }
-
-      template< class _TPoint >
-      inline _TPoint GetMaximum( ) const
-        {
-          return( this->_GetPoint< _TPoint >( 1 ) );
-        }
-
-    protected:
-      BoundingBox( );
-      virtual ~BoundingBox( );
-
-      void _UpdateVTK( );
-
-      template< class _TPoint >
-      inline void _SetPoint( unsigned int m, const _TPoint& p )
-        {
-          this->m_Points[ m ].clear( );
-          for( unsigned int d = 0; d < _TPoint::PointDimension; ++d )
-            this->m_Points[ m ].push_back( double( p[ d ] ) );
-          this->_UpdateVTK( );
-          this->Modified( );
-        }
-
-      template< class _TPoint >
-      inline _TPoint _GetPoint( unsigned int m ) const
-        {
-          unsigned int dim = this->m_Points[ m ].size( );
-          dim =
-            ( _TPoint::PointDimension < dim )? _TPoint::PointDimension: dim;
-          _TPoint p;
-          p.Fill( 0 );
-          for( unsigned int d = 0; d < dim; ++d )
-            p[ d ] = this->m_Points[ m ][ d ];
-          return( p );
-        }
-
-      template< unsigned int _NDim >
-      inline bool _ITKImage( itk::LightObject* o );
-
-      template< class _TScalar, unsigned int _NDim >
-      inline bool _ITKPointSet( itk::LightObject* o );
-
-    private:
-      // Purposely not implemented
-      BoundingBox( const Self& );
-      Self& operator=( const Self& );
-
-    protected:
-      std::vector< double > m_Points[ 2 ];
-      vtkSmartPointer< vtkOutlineSource > m_Outline;
-    };
-
-  } // ecapseman
-
-} // ecapseman
-
-// #include <cpPlugins/DataObjects/BoundingBox.hxx>
-
-#endif // __cpPlugins__DataObjects__BoundingBox__h__
-
-// eof - $RCSfile$
index 77e70f664dc7bc5f05270eac371d538253357aba..5453dce056604746f2d5bfd4cde3c78c99e072a0 100644 (file)
@@ -1,7 +1,5 @@
 #include <cpPlugins/DataObjects/Image.h>
 #include <cpPlugins/DataObjects/Image_Demanglers.h>
-#include <cpInstances_BaseObjects.h>
-#include <cpInstances_SimpleImages.h>
 
 #include <itkImageToVTKImageFilter.h>
 #include <itkVTKImageToImageFilter.h>
index 54710e1ad27809fd09c1b97c27465dc480c7c0e6..238135fdf8933191f848042a48aa5a0515852f90 100644 (file)
@@ -2,6 +2,7 @@
 #define __cpPlugins__DataObjects__Image__h__
 
 #include <cpPlugins/BaseObjects/DataObject.h>
+#include <cpPlugins/DataObjects/Image_Demanglers.h>
 #include <itkProcessObject.h>
 
 namespace cpPlugins
index ca2770b37b68b1b9c418b36da4bd52b5a22b1e97..de64924d2ad41162525cdf53d02d1c6783517e3d 100644 (file)
@@ -1,5 +1,4 @@
 #include <cpPlugins/DataObjects/Mesh.h>
-#include <cpPlugins/DataObjects/Mesh_Demanglers.h>
 
 #include <itkMesh.h>
 #include <itkLineCell.h>
@@ -12,12 +11,10 @@ void cpPlugins::DataObjects::Mesh::
 SetITK( itk::LightObject* o )
 {
   this->Superclass::SetITK( o );
-  cpPlugins_Demangle_Mesh_Meshes_1( o, _ITK_2_VTK, 2 )
-    cpPlugins_Demangle_Mesh_Meshes_1( o, _ITK_2_VTK, 3 )
+  cpPlugins_Demangle_Mesh_AllMeshes_1( o, _ITK_2_VTK )
   {
     this->m_VTK = NULL;
-
-  } // fi
+  }
   this->Modified( );
 }
 
@@ -25,6 +22,7 @@ SetITK( itk::LightObject* o )
 void cpPlugins::DataObjects::Mesh::
 SetVTK( vtkObjectBase* o )
 {
+#ifdef cpPlugins_CONFIG_PROCESS_DIMENSIONS_3
   typedef itk::Mesh< double, 3 >      _TMesh;
   typedef _TMesh::CellType            _TCell;
   typedef _TCell::CellAutoPointer     _TCellAutoPointer;
@@ -109,6 +107,7 @@ SetVTK( vtkObjectBase* o )
     this->Modified( );
 
   } // fi
+#endif // cpPlugins_CONFIG_PROCESS_DIMENSIONS_3
 }
 
 // -------------------------------------------------------------------------
index becc6b9b1e99afcf831cf213fea4649e610cc9c6..acd6a2cbf284431ffdeb527484d55092df99262b 100644 (file)
@@ -1,3 +1,4 @@
+AllMeshes itk::Mesh< #real_types#, #visual_dims# >
 Meshes|d itk::Mesh< #real_types#, d >
 
 ** eof - $RCSfile$
index ce3f331caa4b2e8351e14cde118cb721a50001c0..1350875e9678a3bf33cc192436b051ed58c6ec49 100644 (file)
@@ -2,6 +2,7 @@
 #define __cpPlugins__DataObjects__Mesh__h__
 
 #include <cpPlugins/BaseObjects/DataObject.h>
+#include <cpPlugins/DataObjects/Mesh_Demanglers.h>
 
 namespace cpPlugins
 {
diff --git a/lib/cpPlugins/DataObjects/OrthoNormalBase.cxx b/lib/cpPlugins/DataObjects/OrthoNormalBase.cxx
deleted file mode 100644 (file)
index 602f8a2..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-#include <cpPlugins/DataObjects/OrthoNormalBase.h>
-
-// -------------------------------------------------------------------------
-void cpPlugins::DataObjects::OrthoNormalBase::
-SetITK( itk::LightObject* o )
-{
-  // WARNING: Do nothing since itk::Matrix does not belong to the
-  // itk::LightObject hierarchy.
-}
-
-// -------------------------------------------------------------------------
-void cpPlugins::DataObjects::OrthoNormalBase::
-SetVTK( vtkObjectBase* o )
-{
-  auto matrix = dynamic_cast< vtkMatrix4x4* >( o );
-  if( matrix !=  NULL )
-    this->Superclass::SetVTK( matrix );
-}
-
-// -------------------------------------------------------------------------
-cpPlugins::DataObjects::OrthoNormalBase::
-OrthoNormalBase( )
-  : Superclass( )
-{
-}
-
-// -------------------------------------------------------------------------
-cpPlugins::DataObjects::OrthoNormalBase::
-~OrthoNormalBase( )
-{
-}
-
-// eof - $RCSfile$
diff --git a/lib/cpPlugins/DataObjects/OrthoNormalBase.h b/lib/cpPlugins/DataObjects/OrthoNormalBase.h
deleted file mode 100644 (file)
index f15e64a..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-#ifndef __cpPlugins__DataObjects__OrthoNormalBase__h__
-#define __cpPlugins__DataObjects__OrthoNormalBase__h__
-
-#include <cpPlugins/BaseObjects/DataObject.h>
-
-namespace cpPlugins
-{
-  namespace DataObjects
-  {
-    /**
-     */
-    class cpPlugins_EXPORT OrthoNormalBase
-      : public cpPlugins::BaseObjects::DataObject
-    {
-    public:
-      typedef OrthoNormalBase                    Self;
-      typedef cpPlugins::BaseObjects::DataObject Superclass;
-      typedef itk::SmartPointer< Self >          Pointer;
-      typedef itk::SmartPointer< const Self >    ConstPointer;
-
-    public:
-      itkNewMacro( Self );
-      itkTypeMacro( OrthoNormalBase, DataObject );
-      cpPlugins_Id_Macro( OrthoNormalBase, Object );
-      cpPlugins_Compatibility_Macro;
-
-    public:
-      virtual void SetITK( itk::LightObject* o ) cpPlugins_OVERRIDE;
-      virtual void SetVTK( vtkObjectBase* o ) cpPlugins_OVERRIDE;
-
-      template< class _TMatrix >
-        inline void SetITK( const _TMatrix& m );
-
-      template< class _TMatrix, class _TVector >
-        inline void SetITK( const _TMatrix& m, const _TVector& v );
-
-    protected:
-      OrthoNormalBase( );
-      virtual ~OrthoNormalBase( );
-
-    private:
-      // Purposely not implemented
-      OrthoNormalBase( const Self& );
-      Self& operator=( const Self& );
-    };
-
-  } // ecapseman
-
-} // ecapseman
-
-#include <cpPlugins/DataObjects/OrthoNormalBase.hxx>
-
-#endif // __cpPlugins__DataObjects__OrthoNormalBase__h__
-
-// eof - $RCSfile$
diff --git a/lib/cpPlugins/DataObjects/OrthoNormalBase.hxx b/lib/cpPlugins/DataObjects/OrthoNormalBase.hxx
deleted file mode 100644 (file)
index 92a74e2..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-#ifndef __cpPlugins__DataObjects__OrthoNormalBase__hxx__
-#define __cpPlugins__DataObjects__OrthoNormalBase__hxx__
-
-#include <vtkMatrix4x4.h>
-
-// -------------------------------------------------------------------------
-template< class _TMatrix >
-void cpPlugins::DataObjects::OrthoNormalBase::
-SetITK( const _TMatrix& m )
-{
-  vtkMatrix4x4* matrix = vtkMatrix4x4::New( );
-  matrix->Identity( );
-  for( unsigned int i = 0; i < 4; ++i )
-    if( i < _TMatrix::RowDimensions )
-      for( unsigned int j = 0; j < 4; ++j )
-        if( j < _TMatrix::ColumnDimensions )
-          matrix->SetElement( i, j, m[ i ][ j ] );
-  this->m_VTK = matrix;
-}
-
-// -------------------------------------------------------------------------
-template< class _TMatrix, class _TVector >
-void cpPlugins::DataObjects::OrthoNormalBase::
-SetITK( const _TMatrix& m, const _TVector& v )
-{
-  vtkMatrix4x4* matrix = vtkMatrix4x4::New( );
-  matrix->Identity( );
-  for( unsigned int i = 0; i < 3; ++i )
-    if( i < _TMatrix::RowDimensions )
-      for( unsigned int j = 0; j < 3; ++j )
-        if( j < _TMatrix::ColumnDimensions )
-          matrix->SetElement( i, j, m[ i ][ j ] );
-  for( unsigned int i = 0; i < 3; ++i )
-    if( i < _TVector::Dimension )
-      matrix->SetElement( i, 3, v[ i ] );
-  this->m_VTK = matrix;
-}
-
-#endif // __cpPlugins__DataObjects__OrthoNormalBase__hxx__
-
-// eof - $RCSfile$
diff --git a/lib/cpPlugins/DataObjects/PolyLineParametricPath.h b/lib/cpPlugins/DataObjects/PolyLineParametricPath.h
deleted file mode 100644 (file)
index a5c0896..0000000
+++ /dev/null
@@ -1,60 +0,0 @@
-#ifndef __cpPlugins__DataObjects__PolyLineParametricPath__h__
-#define __cpPlugins__DataObjects__PolyLineParametricPath__h__
-
-#include <cpPlugins/BaseObjects/DataObject.h>
-#include <vtkSmartPointer.h>
-
-// -------------------------------------------------------------------------
-class vtkPolyDataAlgorithm;
-
-// -------------------------------------------------------------------------
-namespace cpPlugins
-{
-  namespace DataObjects
-  {
-    /**
-     */
-    class cpPlugins_EXPORT PolyLineParametricPath
-      : public cpPlugins::BaseObjects::DataObject
-    {
-    public:
-      typedef PolyLineParametricPath             Self;
-      typedef cpPlugins::BaseObjects::DataObject Superclass;
-      typedef itk::SmartPointer< Self >          Pointer;
-      typedef itk::SmartPointer< const Self >    ConstPointer;
-
-    public:
-      itkNewMacro( Self );
-      itkTypeMacro(
-        PolyLineParametricPath, cpPlugins::BaseObjects::DataObject
-        );
-      cpPlugins_Id_Macro( PolyLineParametricPath, Object );
-      cpPlugins_Compatibility_Macro;
-
-    public:
-      virtual void SetITK( itk::LightObject* o ) cpPlugins_OVERRIDE;
-      virtual void SetVTK( vtkObjectBase* o ) cpPlugins_OVERRIDE;
-
-    protected:
-      PolyLineParametricPath( );
-      virtual ~PolyLineParametricPath( );
-
-      template< class _TPolyLine >
-      inline void _ITK_2_VTK( _TPolyLine* pl );
-
-    private:
-      // Purposely not implemented
-      PolyLineParametricPath( const Self& );
-      Self& operator=( const Self& );
-
-    protected:
-      vtkSmartPointer< vtkPolyDataAlgorithm > m_ITKvVTK;
-    };
-
-  } // ecapseman
-
-} // ecapseman
-
-#endif // __cpPlugins__DataObjects__PolyLineParametricPath__h__
-
-// eof - $RCSfile$
diff --git a/lib/cpPlugins/DataObjects/Simple3DCurve.cxx b/lib/cpPlugins/DataObjects/Simple3DCurve.cxx
deleted file mode 100644 (file)
index 7f79bba..0000000
+++ /dev/null
@@ -1,65 +0,0 @@
-#include <cpPlugins/DataObjects/Simple3DCurve.h>
-#include <cpExtensions/DataStructures/Simple3DCurve.h>
-#include <cpExtensions/Visualization/Simple3DCurveToPolyData.h>
-
-#include <cpPlugins/DataObjects/Simple3DCurve_Demanglers.h>
-
-// -------------------------------------------------------------------------
-void cpPlugins::DataObjects::Simple3DCurve::
-SetITK( itk::LightObject* o )
-{
-  cpPlugins_Demangle_Simple3DCurve_All_1( o, _ITK_2_VTK )
-  {
-    this->m_VTK = NULL;
-    this->m_ITKvVTK = NULL;
-  }
-}
-
-// -------------------------------------------------------------------------
-void cpPlugins::DataObjects::Simple3DCurve::
-SetVTK( vtkObjectBase* o )
-{
-  // Do nothing
-  this->m_ITK = NULL;
-  this->m_VTK = NULL;
-  this->m_ITKvVTK = NULL;
-}
-
-// -------------------------------------------------------------------------
-cpPlugins::DataObjects::Simple3DCurve::
-Simple3DCurve( )
-  : Superclass( )
-{
-}
-
-// -------------------------------------------------------------------------
-cpPlugins::DataObjects::Simple3DCurve::
-~Simple3DCurve( )
-{
-}
-
-// -------------------------------------------------------------------------
-template< class _TSimple3DCurve >
-void cpPlugins::DataObjects::Simple3DCurve::
-_ITK_2_VTK( _TSimple3DCurve* curve )
-{
-  typedef
-    cpExtensions::Visualization::Simple3DCurveToPolyData< _TSimple3DCurve >
-    _TFilter;
-  _TFilter* f = dynamic_cast< _TFilter* >( this->m_ITKvVTK.GetPointer( ) );
-  if( f == NULL )
-  {
-    _TFilter* nf = _TFilter::New( );
-    this->m_ITKvVTK = nf;
-    f = nf;
-
-  } // fi
-  f->SetInput( curve );
-  f->Update( );
-
-  // Keep object track
-  this->m_ITK = curve;
-  this->m_VTK = f->GetOutput( );
-}
-
-// eof - $RCSfile$
diff --git a/lib/cpPlugins/DataObjects/Simple3DCurve.d b/lib/cpPlugins/DataObjects/Simple3DCurve.d
deleted file mode 100644 (file)
index 998b791..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-
-All cpExtensions::DataStructures::Simple3DCurve< #real_types# >
-
-** eof - $RCSfile$
diff --git a/lib/cpPlugins/DataObjects/Simple3DCurve.h b/lib/cpPlugins/DataObjects/Simple3DCurve.h
deleted file mode 100644 (file)
index 844146d..0000000
+++ /dev/null
@@ -1,60 +0,0 @@
-#ifndef __cpPlugins__DataObjects__Simple3DCurve__h__
-#define __cpPlugins__DataObjects__Simple3DCurve__h__
-
-#include <cpPlugins/BaseObjects/DataObject.h>
-#include <vtkSmartPointer.h>
-
-// -------------------------------------------------------------------------
-class vtkPolyDataAlgorithm;
-
-// -------------------------------------------------------------------------
-namespace cpPlugins
-{
-  namespace DataObjects
-  {
-    /**
-     */
-    class cpPlugins_EXPORT Simple3DCurve
-      : public cpPlugins::BaseObjects::DataObject
-    {
-    public:
-      typedef Simple3DCurve                      Self;
-      typedef cpPlugins::BaseObjects::DataObject Superclass;
-      typedef itk::SmartPointer< Self >          Pointer;
-      typedef itk::SmartPointer< const Self >    ConstPointer;
-
-    public:
-      itkNewMacro( Self );
-      itkTypeMacro(
-        Simple3DCurve, cpPlugins::BaseObjects::DataObject
-        );
-      cpPlugins_Id_Macro( Simple3DCurve, Object );
-      cpPlugins_Compatibility_Macro;
-
-    public:
-      virtual void SetITK( itk::LightObject* o ) cpPlugins_OVERRIDE;
-      virtual void SetVTK( vtkObjectBase* o ) cpPlugins_OVERRIDE;
-
-    protected:
-      Simple3DCurve( );
-      virtual ~Simple3DCurve( );
-
-      template< class _TSimple3DCurve >
-      inline void _ITK_2_VTK( _TSimple3DCurve* curve );
-
-    private:
-      // Purposely not implemented
-      Simple3DCurve( const Self& );
-      Self& operator=( const Self& );
-
-    protected:
-      vtkSmartPointer< vtkPolyDataAlgorithm > m_ITKvVTK;
-    };
-
-  } // ecapseman
-
-} // ecapseman
-
-#endif // __cpPlugins__DataObjects__Simple3DCurve__h__
-
-// eof - $RCSfile$
diff --git a/lib/cpPlugins/DataObjects/Skeleton.h b/lib/cpPlugins/DataObjects/Skeleton.h
deleted file mode 100644 (file)
index a924576..0000000
+++ /dev/null
@@ -1,60 +0,0 @@
-#ifndef __cpPlugins__DataObjects__Skeleton__h__
-#define __cpPlugins__DataObjects__Skeleton__h__
-
-#include <cpPlugins/BaseObjects/DataObject.h>
-#include <vtkSmartPointer.h>
-
-// -------------------------------------------------------------------------
-class vtkPolyDataAlgorithm;
-
-// -------------------------------------------------------------------------
-namespace cpPlugins
-{
-  namespace DataObjects
-  {
-    /**
-     */
-    class cpPlugins_EXPORT Skeleton
-      : public cpPlugins::BaseObjects::DataObject
-    {
-    public:
-      typedef Skeleton                           Self;
-      typedef cpPlugins::BaseObjects::DataObject Superclass;
-      typedef itk::SmartPointer< Self >          Pointer;
-      typedef itk::SmartPointer< const Self >    ConstPointer;
-
-    public:
-      itkNewMacro( Self );
-      itkTypeMacro(
-        Skeleton, cpPlugins::BaseObjects::DataObject
-        );
-      cpPlugins_Id_Macro( Skeleton, Object );
-      cpPlugins_Compatibility_Macro;
-
-    public:
-      virtual void SetITK( itk::LightObject* o ) cpPlugins_OVERRIDE;
-      virtual void SetVTK( vtkObjectBase* o ) cpPlugins_OVERRIDE;
-
-    protected:
-      Skeleton( );
-      virtual ~Skeleton( );
-
-      template< class _TSkeleton >
-      inline void _ITK_2_VTK( _TSkeleton* sk );
-
-    private:
-      // Purposely not implemented
-      Skeleton( const Self& );
-      Self& operator=( const Self& );
-
-    protected:
-      vtkSmartPointer< vtkPolyDataAlgorithm > m_ITKvVTK;
-    };
-
-  } // ecapseman
-
-} // ecapseman
-
-#endif // __cpPlugins__DataObjects__Skeleton__h__
-
-// eof - $RCSfile$
index eabd53ef905e45048dd4530530b360b014a2bb43..81366c13b25c5bb58b7446ef5a88765fde8f2b67 100644 (file)
@@ -1,7 +1,7 @@
 #include <cpPlugins/Interface/Plugins.h>
 #include <cpPlugins/OS/DLLManager.h>
 #include <cpPlugins/OS/DirContents.h>
-#include <cpExtensions/Utility.h>
+#include <cpPlugins/Utility.h>
 
 // -------------------------------------------------------------------------
 cpPlugins::Interface::Plugins::
@@ -85,9 +85,9 @@ void cpPlugins::Interface::Plugins::
 AddEnvironments( const std::string& env )
 {
   std::vector< std::string > directories;
-  cpExtensions::Tokenize( directories, env, cpPlugins_ENV_SEPARATOR );
+  cpPlugins::Tokenize( directories, env, cpPlugins_ENV_SEPARATOR );
   for( auto dir = directories.begin( ); dir != directories.end( ); ++dir )
-    this->m_Paths.insert( cpExtensions::CanonicalPath( *dir ) );
+    this->m_Paths.insert( cpPlugins::CanonicalPath( *dir ) );
 }
 
 // -------------------------------------------------------------------------
@@ -100,7 +100,7 @@ LoadEnvironments( )
     std::stringstream fname;
     fname << *d << cpPlugins_PATH_SEPARATOR << cpPlugins_CONFIG;
     std::string buffer;
-    if( cpExtensions::Read( buffer, fname.str( ) ) )
+    if( cpPlugins::Read( buffer, fname.str( ) ) )
     {
       std::istringstream input( buffer );
       for( std::string line; std::getline( input, line ); )
@@ -125,7 +125,7 @@ LoadEnvironments( )
 
   for( auto l = libs.begin( ); l != libs.end( ); ++l )
   {
-    std::string lib = cpExtensions::CanonicalPath( *l );
+    std::string lib = cpPlugins::CanonicalPath( *l );
     if( lib != "" )
     {
       if( this->m_Libraries.find( lib ) == this->m_Libraries.end( ) )
@@ -148,11 +148,11 @@ LoadPaths( const std::string& dir )
 {
   std::stringstream fname, envs;
   fname << dir;
-  if( !cpExtensions::IsPathSeparator( dir.back( ) ) )
-    fname << cpExtensions_PATH_SEPARATOR;
+  if( !cpPlugins::IsPathSeparator( dir.back( ) ) )
+    fname << cpPlugins_PATH_SEPARATOR;
   fname << cpPlugins_PATHS;
   std::string buffer;
-  if( cpExtensions::Read( buffer, fname.str( ) ) )
+  if( cpPlugins::Read( buffer, fname.str( ) ) )
   {
     std::istringstream input( buffer );
     for( std::string line; std::getline( input, line ); )
@@ -173,10 +173,10 @@ SavePaths( const std::string& dir ) const
 
   std::stringstream fname;
   fname << dir;
-  if( !cpExtensions::IsPathSeparator( dir.back( ) ) )
-    fname << cpExtensions_PATH_SEPARATOR;
+  if( !cpPlugins::IsPathSeparator( dir.back( ) ) )
+    fname << cpPlugins_PATH_SEPARATOR;
   fname << cpPlugins_PATHS;
-  if( !cpExtensions::Write( buffer.str( ), fname.str( ) ) )
+  if( !cpPlugins::Write( buffer.str( ), fname.str( ) ) )
     throw std::runtime_error( "Error writing environment file." );
 }
 
@@ -185,7 +185,7 @@ void cpPlugins::Interface::Plugins::
 LoadFile( const std::string& fname )
 {
   // Resolve canonical filename
-  std::string can_name = cpExtensions::CanonicalPath( fname );
+  std::string can_name = cpPlugins::CanonicalPath( fname );
   if( can_name == "" )
     throw std::runtime_error(
       std::string( "Loading file: can't find library \"" ) +
@@ -307,8 +307,8 @@ LoadPlugin( const std::string& pname )
   {
     std::stringstream dir;
     dir << *i;
-    if( !cpExtensions::IsPathSeparator( i->back( ) ) )
-      dir << cpExtensions_PATH_SEPARATOR;
+    if( !cpPlugins::IsPathSeparator( i->back( ) ) )
+      dir << cpPlugins_PATH_SEPARATOR;
     dir << fname.str( );
     try
     {
diff --git a/lib/cpPlugins/Utility.h b/lib/cpPlugins/Utility.h
new file mode 100644 (file)
index 0000000..3fab862
--- /dev/null
@@ -0,0 +1,136 @@
+#ifndef __cpPlugins__Utility__h__
+#define __cpPlugins__Utility__h__
+
+#include <chrono>
+#include <cstring>
+#include <fstream>
+#include <string>
+#include <cpPlugins/Config.h>
+
+// -------------------------------------------------------------------------
+#ifdef cpPlugins_OS_Windows
+#  define cpPlugins_STRTOK( A, B, N )  strtok_s( A, B, N )
+#  define cpPlugins_SPRINTF( B, S, O ) sprintf_s( B, S, "%s", O );
+#else // cpPlugins_OS_Windows
+#  define cpPlugins_STRTOK( A, B, N )  std::strtok( A, B )
+#  define cpPlugins_SPRINTF( B, S, O ) std::sprintf( B, "%s", O );
+#endif // cpPlugins_OS_Windows
+
+// -------------------------------------------------------------------------
+#define cpPlugins_CHRONO                                     \
+  std::chrono::duration_cast< std::chrono::milliseconds >(      \
+    std::chrono::system_clock::now( ).time_since_epoch( )       \
+    ).count( )
+
+// -------------------------------------------------------------------------
+namespace cpPlugins
+{
+  // -----------------------------------------------------------------------
+  inline bool IsPathSeparator( char c )
+  {
+#ifdef cpPlugins_OS_Windows
+    return( c == '/' || c == cpPlugins_PATH_SEPARATOR );
+#else // cpPlugins_OS_Windows
+    return( c == cpPlugins_PATH_SEPARATOR );
+#endif // cpPlugins_OS_Windows
+  }
+
+  // -----------------------------------------------------------------------
+  inline bool IsBlank( const char& v )
+  {
+    return( v == ' ' || v == '\t' || v == '\n' || v == '\r' );
+  }
+
+  // -----------------------------------------------------------------------
+  template< class _TTokens >
+  inline void Tokenize(
+    _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 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 );
+  }
+
+  // -----------------------------------------------------------------------
+  inline bool Read( 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 bool Write( const std::string& buffer, const std::string& fname )
+  {
+    std::ofstream file_stream( fname.c_str( ), std::ofstream::binary );
+    if( !file_stream )
+      return( false );
+    file_stream.write( buffer.c_str( ), buffer.size( ) );
+    return( true );
+  }
+
+  // -----------------------------------------------------------------------
+  inline std::string CanonicalPath( const std::string& path )
+  {
+    std::string ret = "";
+#ifdef cpPlugins_OS_Windows
+    TCHAR  buffer[ 4096 ] = TEXT( "" );
+    TCHAR** lppPart = { NULL };
+    GetFullPathName( path.c_str( ), 4096, buffer, lppPart );
+    ret = std::string( buffer );
+#else // cpPlugins_OS_Windows
+    char* canonical_path = realpath( path.c_str( ), NULL );
+    if( canonical_path != NULL )
+    {
+      ret = canonical_path;
+      free( canonical_path );
+
+    } // fi
+#endif // cpPlugins_OS_Windows
+    return( ret );
+  }
+
+} // ecapseman
+
+#endif // __cpPlugins__Utility__h__
+
+// eof - $RCSfile$
index 1a97df67c7ac23a8051ee12b3e9a8ac59c3a7b6a..c83c434f68df18cc517cec0be5a516419e75ccc0 100644 (file)
@@ -4,26 +4,27 @@
 
 SET(
   _dirlist
-  AnisotropicDiffusion
-  GenericFilters
-  ImageArithmeticFilters
-  ImageBooleanFilters
-  ImageDistanceMaps
-  ImageGenericFilters
-  ImageGradientFilters
-  ImageMeshFilters
-  ImageSliceFilters
-  ImageSources
-  ImageThresholdFilters
+  Extensions
+  #  AnisotropicDiffusion
+  #  GenericFilters
+  #  ImageArithmeticFilters
+  #  ImageBooleanFilters
+  #  ImageDistanceMaps
+  #  ImageGenericFilters
+  #  ImageGradientFilters
+  #  ImageMeshFilters
+  #  ImageSliceFilters
+  #  ImageSources
+  #  ImageThresholdFilters
   IO
-  MeshFilters
-  MeshSources
+  #  MeshFilters
+  #  MeshSources
   Widgets
   )
 
-IF(ParabolicMorphology_LOADED)
-  LIST(APPEND _dirlist ImageParaMorphologyFilters)
-ENDIF(ParabolicMorphology_LOADED)
+#IF(ParabolicMorphology_LOADED)
+#  LIST(APPEND _dirlist ImageParaMorphologyFilters)
+#ENDIF(ParabolicMorphology_LOADED)
 
 ## ===============================
 ## == Build each plugin library ==
@@ -45,22 +46,27 @@ FOREACH(_dir ${_dirlist})
 ENDFOREACH(_dir)
 
 TARGET_LINK_LIBRARIES(
-  cpPluginsImageDistanceMaps
-  cpPluginsImageThresholdFilters
+  cpPluginsIO
+  cpPluginsExtensions
   )
-TARGET_LINK_LIBRARIES(
-  cpPluginsImageSliceFilters
-  cpPluginsImageGenericFilters
-  )
-TARGET_LINK_LIBRARIES(
-  cpPluginsImageGradientFilters
-  cpPluginsImageGenericFilters
-  )
-IF(ParabolicMorphology_LOADED)
-  TARGET_LINK_LIBRARIES(
-    cpPluginsImageParaMorphologyFilters
-    cpPluginsImageThresholdFilters
-    )
-ENDIF(ParabolicMorphology_LOADED)
+
+#TARGET_LINK_LIBRARIES(
+#  cpPluginsImageDistanceMaps
+#  cpPluginsImageThresholdFilters
+#  )
+#TARGET_LINK_LIBRARIES(
+#  cpPluginsImageSliceFilters
+#  cpPluginsImageGenericFilters
+#  )
+#TARGET_LINK_LIBRARIES(
+#  cpPluginsImageGradientFilters
+#  cpPluginsImageGenericFilters
+#  )
+#IF(ParabolicMorphology_LOADED)
+#  TARGET_LINK_LIBRARIES(
+#    cpPluginsImageParaMorphologyFilters
+#    cpPluginsImageThresholdFilters
+#    )
+#ENDIF(ParabolicMorphology_LOADED)
 
 ## eof - $RSCfile$
diff --git a/plugins/Extensions/Extensions.i b/plugins/Extensions/Extensions.i
new file mode 100644 (file)
index 0000000..e1b9fc5
--- /dev/null
@@ -0,0 +1,13 @@
+header #define ITK_MANUAL_INSTANTIATION
+
+tinclude cpExtensions/DataStructures/PolyLineParametricPath:h|hxx
+tinclude cpExtensions/DataStructures/Skeleton:h|hxx
+tinclude cpExtensions/Algorithms/BezierCurveFunction:h|hxx
+
+cinclude cpExtensions/DataStructures/Graph.hxx
+
+instances cpExtensions::Algorithms::BezierCurveFunction< itk::Vector< #real_types#, #process_dims# > >
+instances cpExtensions::DataStructures::PolyLineParametricPath< #process_dims# >
+instances cpExtensions::DataStructures::Skeleton< #process_dims# >
+
+** eof - $RCSfile$
similarity index 78%
rename from lib/cpPlugins/DataObjects/PolyLineParametricPath.cxx
rename to plugins/Extensions/PolyLineParametricPath.cxx
index 357f38a3d94ca8b78b8a2d247e2425fd83c92503..cb4a6be3bca149b0e86e0fa5c899ac6e2dd20840 100644 (file)
@@ -1,10 +1,9 @@
-#include <cpPlugins/DataObjects/PolyLineParametricPath.h>
+#include <Extensions/PolyLineParametricPath.h>
 #include <cpExtensions/Visualization/PolyLineParametricPathToPolyData.h>
-#include <cpPlugins/DataObjects/PolyLineParametricPath_Demanglers.h>
 #include <cpExtensions/DataStructures/PolyLineParametricPath.h>
 
 // -------------------------------------------------------------------------
-void cpPlugins::DataObjects::PolyLineParametricPath::
+void cpPluginsExtensions::PolyLineParametricPath::
 SetITK( itk::LightObject* o )
 {
   this->Superclass::SetITK( o );
@@ -16,7 +15,7 @@ SetITK( itk::LightObject* o )
 }
 
 // -------------------------------------------------------------------------
-void cpPlugins::DataObjects::PolyLineParametricPath::
+void cpPluginsExtensions::PolyLineParametricPath::
 SetVTK( vtkObjectBase* o )
 {
   // Do nothing
@@ -26,21 +25,21 @@ SetVTK( vtkObjectBase* o )
 }
 
 // -------------------------------------------------------------------------
-cpPlugins::DataObjects::PolyLineParametricPath::
+cpPluginsExtensions::PolyLineParametricPath::
 PolyLineParametricPath( )
   : Superclass( )
 {
 }
 
 // -------------------------------------------------------------------------
-cpPlugins::DataObjects::PolyLineParametricPath::
+cpPluginsExtensions::PolyLineParametricPath::
 ~PolyLineParametricPath( )
 {
 }
 
 // -------------------------------------------------------------------------
 template< class _TPolyLine >
-void cpPlugins::DataObjects::PolyLineParametricPath::
+void cpPluginsExtensions::PolyLineParametricPath::
 _ITK_2_VTK( _TPolyLine* pl )
 {
   typedef
diff --git a/plugins/Extensions/PolyLineParametricPath.h b/plugins/Extensions/PolyLineParametricPath.h
new file mode 100644 (file)
index 0000000..566a4be
--- /dev/null
@@ -0,0 +1,58 @@
+#ifndef __cpPluginsExtensions__PolyLineParametricPath__h__
+#define __cpPluginsExtensions__PolyLineParametricPath__h__
+
+#include <cpPluginsExtensions_Export.h>
+#include <cpPlugins/BaseObjects/DataObject.h>
+#include <Extensions/PolyLineParametricPath_Demanglers.h>
+#include <vtkSmartPointer.h>
+
+// -------------------------------------------------------------------------
+class vtkPolyDataAlgorithm;
+
+// -------------------------------------------------------------------------
+namespace cpPluginsExtensions
+{
+  /**
+   */
+  class cpPluginsExtensions_EXPORT PolyLineParametricPath
+    : public cpPlugins::BaseObjects::DataObject
+  {
+  public:
+    typedef PolyLineParametricPath             Self;
+    typedef cpPlugins::BaseObjects::DataObject Superclass;
+    typedef itk::SmartPointer< Self >          Pointer;
+    typedef itk::SmartPointer< const Self >    ConstPointer;
+
+  public:
+    itkNewMacro( Self );
+    itkTypeMacro(
+      PolyLineParametricPath, cpPlugins::BaseObjects::DataObject
+      );
+    cpPlugins_Id_Macro( PolyLineParametricPath, Object );
+    cpPlugins_Compatibility_Macro;
+
+  public:
+    virtual void SetITK( itk::LightObject* o ) cpPlugins_OVERRIDE;
+    virtual void SetVTK( vtkObjectBase* o ) cpPlugins_OVERRIDE;
+
+  protected:
+    PolyLineParametricPath( );
+    virtual ~PolyLineParametricPath( );
+
+    template< class _TPolyLine >
+    inline void _ITK_2_VTK( _TPolyLine* pl );
+
+  private:
+    // Purposely not implemented
+    PolyLineParametricPath( const Self& );
+    Self& operator=( const Self& );
+
+  protected:
+    vtkSmartPointer< vtkPolyDataAlgorithm > m_ITKvVTK;
+  };
+
+} // ecapseman
+
+#endif // __cpPluginsExtensions__PolyLineParametricPath__h__
+
+// eof - $RCSfile$
similarity index 81%
rename from lib/cpPlugins/DataObjects/Skeleton.cxx
rename to plugins/Extensions/Skeleton.cxx
index 098595af6539ead281cb5bd45ceb3532b8fa0964..9e17f629a9255a184a61252b0c7175644d7ed701 100644 (file)
@@ -1,10 +1,9 @@
-#include <cpPlugins/DataObjects/Skeleton.h>
+#include <Extensions/Skeleton.h>
 #include <cpExtensions/Visualization/SkeletonToPolyData.h>
-#include <cpPlugins/DataObjects/Skeleton_Demanglers.h>
 #include <cpExtensions/DataStructures/Skeleton.h>
 
 // -------------------------------------------------------------------------
-void cpPlugins::DataObjects::Skeleton::
+void cpPluginsExtensions::Skeleton::
 SetITK( itk::LightObject* o )
 {
   cpPlugins_Demangle_Skeleton_All_1( o, _ITK_2_VTK )
@@ -15,7 +14,7 @@ SetITK( itk::LightObject* o )
 }
 
 // -------------------------------------------------------------------------
-void cpPlugins::DataObjects::Skeleton::
+void cpPluginsExtensions::Skeleton::
 SetVTK( vtkObjectBase* o )
 {
   // Do nothing
@@ -25,21 +24,21 @@ SetVTK( vtkObjectBase* o )
 }
 
 // -------------------------------------------------------------------------
-cpPlugins::DataObjects::Skeleton::
+cpPluginsExtensions::Skeleton::
 Skeleton( )
   : Superclass( )
 {
 }
 
 // -------------------------------------------------------------------------
-cpPlugins::DataObjects::Skeleton::
+cpPluginsExtensions::Skeleton::
 ~Skeleton( )
 {
 }
 
 // -------------------------------------------------------------------------
 template< class _TSkeleton >
-void cpPlugins::DataObjects::Skeleton::
+void cpPluginsExtensions::Skeleton::
 _ITK_2_VTK( _TSkeleton* sk )
 {
   typedef
diff --git a/plugins/Extensions/Skeleton.h b/plugins/Extensions/Skeleton.h
new file mode 100644 (file)
index 0000000..839da17
--- /dev/null
@@ -0,0 +1,58 @@
+#ifndef __cpPluginsExtensions__Skeleton__h__
+#define __cpPluginsExtensions__Skeleton__h__
+
+#include <cpPluginsExtensions_Export.h>
+#include <cpPlugins/BaseObjects/DataObject.h>
+#include <Extensions/Skeleton_Demanglers.h>
+#include <vtkSmartPointer.h>
+
+// -------------------------------------------------------------------------
+class vtkPolyDataAlgorithm;
+
+// -------------------------------------------------------------------------
+namespace cpPluginsExtensions
+{
+  /**
+   */
+  class cpPluginsExtensions_EXPORT Skeleton
+    : public cpPlugins::BaseObjects::DataObject
+  {
+  public:
+    typedef Skeleton                           Self;
+    typedef cpPlugins::BaseObjects::DataObject Superclass;
+    typedef itk::SmartPointer< Self >          Pointer;
+    typedef itk::SmartPointer< const Self >    ConstPointer;
+
+  public:
+    itkNewMacro( Self );
+    itkTypeMacro(
+      Skeleton, cpPlugins::BaseObjects::DataObject
+      );
+    cpPlugins_Id_Macro( Skeleton, Object );
+    cpPlugins_Compatibility_Macro;
+
+  public:
+    virtual void SetITK( itk::LightObject* o ) cpPlugins_OVERRIDE;
+    virtual void SetVTK( vtkObjectBase* o ) cpPlugins_OVERRIDE;
+
+  protected:
+    Skeleton( );
+    virtual ~Skeleton( );
+
+    template< class _TSkeleton >
+    inline void _ITK_2_VTK( _TSkeleton* sk );
+
+  private:
+    // Purposely not implemented
+    Skeleton( const Self& );
+    Self& operator=( const Self& );
+
+  protected:
+    vtkSmartPointer< vtkPolyDataAlgorithm > m_ITKvVTK;
+  };
+
+} // ecapseman
+
+#endif // __cpPluginsExtensions__Skeleton__h__
+
+// eof - $RCSfile$
index b6c279d060b9953209ab97d7215305ac8ad0650b..7d230dbe14d89208c8177f64e46f6a68c5f0e656 100644 (file)
@@ -1,8 +1,7 @@
 #include <IO/ImageJSkeletonWriter.h>
-#include <cpPlugins/DataObjects/Skeleton.h>
-#include <cpPlugins/DataObjects/Skeleton_Demanglers.h>
 #include <cpPlugins/QT/SaveFileDialog.h>
 
+#include <Extensions/Skeleton.h>
 #include <cpExtensions/DataStructures/Skeleton.h>
 #include <cpExtensions/Utility.h>
 
@@ -33,7 +32,9 @@ cpPluginsIO::ImageJSkeletonWriter::
 ImageJSkeletonWriter( )
   : Superclass( )
 {
-  this->_ConfigureInput< cpPlugins::DataObjects::Skeleton >( "Input", true, false );
+  typedef cpPluginsExtensions::Skeleton _TSkeleton;
+  this->_ConfigureInput< _TSkeleton >( "Input", true, false );
+
   this->m_Parameters.ConfigureAsSaveFileName( "FileName", "" );
   this->m_Parameters.SetAcceptedFileExtensions(
     "FileName",
index c5aa3df9b1ccfc427d59a7ad0235c08388fed2fe..55238a7fd5ee5dc8d73247927073b0dcdde210dc 100644 (file)
@@ -1,10 +1,9 @@
 #include <IO/ImageWriter.h>
 #include <cpPlugins/DataObjects/Image.h>
-#include <cpPlugins/DataObjects/Image_Demanglers.h>
 #include <cpPlugins/QT/SaveFileDialog.h>
-#include <cpInstances_SimpleImages.h>
 
 #include <itkImageFileWriter.h>
+#include <itkImage.h>
 
 #ifdef cpPlugins_QT4
 #  include <QApplication>