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$
${PROJECT_SOURCE_DIR}/appli
${PROJECT_BINARY_DIR}/appli
)
-
SET(
_bash_APPS
CreateRealConfig
ADD_EXECUTABLE(${_pfx}_${_name} ${_src})
TARGET_LINK_LIBRARIES(
${_pfx}_${_name}
- cpPlugins
+ cpPlugins cpExtensions
)
ENDFOREACH(_src)
# ======================
FIND_PACKAGE(ITK REQUIRED)
-INCLUDE(${ITK_USE_FILE})
-
FIND_PACKAGE(VTK REQUIRED)
+
+INCLUDE(${ITK_USE_FILE})
INCLUDE(${VTK_USE_FILE})
# ===================================================
## ===============================
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.")
SET(
_all_configs
- cpPlugins_CONFIG_BOOLEAN_TYPES
cpPlugins_CONFIG_INTEGER_TYPES
cpPlugins_CONFIG_REAL_TYPES
cpPlugins_CONFIG_PROCESS_DIMENSIONS
## == 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)
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$
-## ====================
-## == 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 ==
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$
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$
+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$
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# > >
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
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$
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$
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
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# >
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$
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)
virtual ~DataObject( );
template< class _TType >
- inline bool _DisconnectVTK( );
+ inline bool _DisconnectVTK( );
private:
// Purposely not implemented
{
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
}
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( ) );
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( );
} // ecapseman
-#include <cpPlugins/BaseObjects/Object.hxx>
-
#endif // __cpPlugins__BaseObjects__Object__h__
// eof - $RCSfile$
+++ /dev/null
-#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$
#include <cpPlugins/BaseObjects/Parameters.h>
-#include <cpExtensions/Utility.h>
+#include <cpPlugins/Utility.h>
#include <tinyxml2/tinyxml2.h>
// -------------------------------------------------------------------------
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 ) )
#include <cpPlugins/BaseObjects/ProcessObject.h>
#include <cpPlugins/QT/ParametersDialog.h>
-#include <cpExtensions/Utility.h>
+#include <cpPlugins/Utility.h>
#include <itkProcessObject.h>
#include <itkExceptionObject.h>
} // 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( );
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 );
// 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;
-#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$
+++ /dev/null
-#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$
+++ /dev/null
-#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$
#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>
#define __cpPlugins__DataObjects__Image__h__
#include <cpPlugins/BaseObjects/DataObject.h>
+#include <cpPlugins/DataObjects/Image_Demanglers.h>
#include <itkProcessObject.h>
namespace cpPlugins
#include <cpPlugins/DataObjects/Mesh.h>
-#include <cpPlugins/DataObjects/Mesh_Demanglers.h>
#include <itkMesh.h>
#include <itkLineCell.h>
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( );
}
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;
this->Modified( );
} // fi
+#endif // cpPlugins_CONFIG_PROCESS_DIMENSIONS_3
}
// -------------------------------------------------------------------------
+AllMeshes itk::Mesh< #real_types#, #visual_dims# >
Meshes|d itk::Mesh< #real_types#, d >
** eof - $RCSfile$
#define __cpPlugins__DataObjects__Mesh__h__
#include <cpPlugins/BaseObjects/DataObject.h>
+#include <cpPlugins/DataObjects/Mesh_Demanglers.h>
namespace cpPlugins
{
+++ /dev/null
-#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$
+++ /dev/null
-#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$
+++ /dev/null
-#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$
+++ /dev/null
-#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$
+++ /dev/null
-#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$
+++ /dev/null
-
-All cpExtensions::DataStructures::Simple3DCurve< #real_types# >
-
-** eof - $RCSfile$
+++ /dev/null
-#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$
+++ /dev/null
-#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$
#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::
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 ) );
}
// -------------------------------------------------------------------------
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 ); )
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( ) )
{
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 ); )
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." );
}
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 \"" ) +
{
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
{
--- /dev/null
+#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$
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 ==
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$
--- /dev/null
+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$
-#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 );
}
// -------------------------------------------------------------------------
-void cpPlugins::DataObjects::PolyLineParametricPath::
+void cpPluginsExtensions::PolyLineParametricPath::
SetVTK( vtkObjectBase* o )
{
// Do nothing
}
// -------------------------------------------------------------------------
-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
--- /dev/null
+#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$
-#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 )
}
// -------------------------------------------------------------------------
-void cpPlugins::DataObjects::Skeleton::
+void cpPluginsExtensions::Skeleton::
SetVTK( vtkObjectBase* o )
{
// Do nothing
}
// -------------------------------------------------------------------------
-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
--- /dev/null
+#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$
#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>
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",
#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>