-SET(LIBRARY_NAME cpPlugins)
-
-## ===============
-## = Source code =
-## ===============
-
-FILE(GLOB Interface_LIB_HEADERS_H "Interface/*.h")
-FILE(GLOB Interface_LIB_HEADERS_HPP "Interface/*.hpp")
-FILE(GLOB Interface_LIB_HEADERS_HXX "Interface/*.hxx")
-FILE(GLOB Interface_LIB_SOURCES_C "Interface/*.c")
-FILE(GLOB Interface_LIB_SOURCES_CPP "Interface/*.cpp")
-FILE(GLOB Interface_LIB_SOURCES_CXX "Interface/*.cxx")
-
-SET(
- LIB_HEADERS_H
- Plugins/ImageReader.h
- Plugins/ImageWriter.h
- Plugins/MeshReader.h
- Plugins/MeshWriter.h
- Plugins/MarchingCubes.h
- Plugins/OtsuThresholdImageFilter.h
- )
-SET(
- LIB_SOURCES_CXX
- Plugins/Host.cxx
- Plugins/ImageReader.cxx
- Plugins/ImageWriter.cxx
- Plugins/MeshReader.cxx
- Plugins/MeshWriter.cxx
- Plugins/MarchingCubes.cxx
- Plugins/OtsuThresholdImageFilter.cxx
- )
-
-## =====================
-## = Compilation rules =
-## =====================
-
-ADD_LIBRARY(
- ${LIBRARY_NAME}
- SHARED
- ${Interface_LIB_SOURCES_C}
- ${Interface_LIB_SOURCES_CPP}
- ${Interface_LIB_SOURCES_CXX}
- ${LIB_SOURCES_C}
- ${LIB_SOURCES_CPP}
- ${LIB_SOURCES_CXX}
- )
-GENERATE_EXPORT_HEADER(
- ${LIBRARY_NAME}
- BASE_NAME ${LIBRARY_NAME}
- EXPORT_MACRO_NAME ${LIBRARY_NAME}_EXPORT
- EXPORT_FILE_NAME ${PROJECT_BINARY_DIR}/lib/cpPlugins/${LIBRARY_NAME}_Export.h
- STATIC_DEFINE ${LIBRARY_NAME}_BUILT_AS_STATIC
- )
-TARGET_LINK_LIBRARIES(
- ${LIBRARY_NAME}
- ${ITK_LIBRARIES}
- ${VTK_LIBRARIES}
- cpPlugins_Pluma
- )
-
-## ========================
-## -- Installation rules --
-## ========================
-
-INSTALL(
- TARGETS ${LIBRARY_NAME}
- RUNTIME DESTINATION bin
- LIBRARY DESTINATION lib
- ARCHIVE DESTINATION lib/static
- )
-
-SET(
- local_install_dirs
+SUBDIRS(
Interface
+ Plugins
)
-FOREACH(dir ${local_install_dirs})
- INSTALL(
- DIRECTORY ${dir}
- DESTINATION include/cpPlugins/Interface
- FILES_MATCHING PATTERN "*.h"
- )
- INSTALL(
- DIRECTORY ${dir}
- DESTINATION include/cpPlugins/Interface
- FILES_MATCHING PATTERN "*.hxx"
- )
- INSTALL(
- DIRECTORY ${dir}
- DESTINATION include/cpPlugins/Interface
- FILES_MATCHING PATTERN "*.hpp"
- )
-ENDFOREACH(dir)
-
-INSTALL(
- FILES
- ${PROJECT_BINARY_DIR}/lib/cpPlugins/Interface/${LIBRARY_NAME}_Export.h
- DESTINATION include/cpPlugins/Interface
- )
-
## eof - $RCSfile$
--- /dev/null
+#include <cpPlugins/Interface/BaseProcessObjects.h>
+
+cpPlugins_Interface_Code_ProcessObject( SourceObject );
+cpPlugins_Interface_Code_ProcessObject( SinkObject );
+cpPlugins_Interface_Code_ProcessObject( FilterObject );
+cpPlugins_Interface_Code_ProcessObject( ImageSource );
+cpPlugins_Interface_Code_ProcessObject( MeshSource );
+cpPlugins_Interface_Code_ProcessObject( ImageSink );
+cpPlugins_Interface_Code_ProcessObject( MeshSink );
+cpPlugins_Interface_Code_ProcessObject( ImageToImageFitler );
+cpPlugins_Interface_Code_ProcessObject( ImageToMeshFitler );
+cpPlugins_Interface_Code_ProcessObject( MeshToImageFitler );
+cpPlugins_Interface_Code_ProcessObject( MeshToMeshFitler );
+
+// eof - $RCSfile$
--- /dev/null
+#ifndef __CPPLUGINS__INTERFACE__BASEPROCESSOBJECTS__H__
+#define __CPPLUGINS__INTERFACE__BASEPROCESSOBJECTS__H__
+
+#include <cpPlugins/Interface/cpPlugins_Interface_Export.h>
+#include <cpPlugins/Interface/ProcessObject.h>
+
+// -------------------------------------------------------------------------
+#define cpPlugins_Interface_Define_ProcessObject( O, S ) \
+ class cpPlugins_Interface_EXPORT O \
+ : public S \
+ { \
+ public: \
+ typedef O Self; \
+ typedef S Superclass; \
+ typedef itk::SmartPointer< Self > Pointer; \
+ typedef itk::SmartPointer< const Self > ConstPointer; \
+ public: \
+ itkTypeMacro( O, S ); \
+ protected: \
+ O( ); \
+ virtual ~O( ); \
+ private: \
+ O( const Self& ); \
+ Self& operator=( const Self& ); \
+ }
+
+// -------------------------------------------------------------------------
+#define cpPlugins_Interface_Code_ProcessObject( O ) \
+ cpPlugins::Interface::O::O( ) : Superclass( ) \
+ { \
+ this->m_ClassName = "cpPlugins::Interface::#O"; \
+ this->m_ClassCategory = "#O"; \
+ } \
+ cpPlugins::Interface::O::~O( ) { }
+
+namespace cpPlugins
+{
+ namespace Interface
+ {
+ cpPlugins_Interface_Define_ProcessObject( SourceObject, ProcessObject );
+ cpPlugins_Interface_Define_ProcessObject( SinkObject, ProcessObject );
+ cpPlugins_Interface_Define_ProcessObject( FilterObject, ProcessObject );
+ cpPlugins_Interface_Define_ProcessObject( ImageSource, SourceObject );
+ cpPlugins_Interface_Define_ProcessObject( MeshSource, SourceObject );
+ cpPlugins_Interface_Define_ProcessObject( ImageSink, SinkObject );
+ cpPlugins_Interface_Define_ProcessObject( MeshSink, SinkObject );
+ cpPlugins_Interface_Define_ProcessObject( ImageToImageFitler, FilterObject );
+ cpPlugins_Interface_Define_ProcessObject( ImageToMeshFitler, FilterObject );
+ cpPlugins_Interface_Define_ProcessObject( MeshToImageFitler, FilterObject );
+ cpPlugins_Interface_Define_ProcessObject( MeshToMeshFitler, FilterObject );
+
+ } // ecapseman
+
+} // ecapseman
+
+#endif // __CPPLUGINS__INTERFACE__BASEPROCESSOBJECTS__H__
+
+// eof - $RCSfile$
TARGET_LINK_LIBRARIES(
${LIBRARY_NAME}
cpPlugins_Pluma
- cpPlugins_Extensions
+ ${ITK_LIBRARIES}
+ ${VTK_LIBRARIES}
)
## ========================
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib/static
)
-SET(
- local_install_dirs
- .
+INSTALL(
+ DIRECTORY .
+ DESTINATION include/cpPlugins/Interface
+ FILES_MATCHING PATTERN "*.h"
+ )
+INSTALL(
+ DIRECTORY .
+ DESTINATION include/cpPlugins/Interface
+ FILES_MATCHING PATTERN "*.hxx"
+ )
+INSTALL(
+ DIRECTORY .
+ DESTINATION include/cpPlugins/Interface
+ FILES_MATCHING PATTERN "*.hpp"
)
-FOREACH(dir ${local_install_dirs})
- INSTALL(
- DIRECTORY ${dir}
- DESTINATION include/cpPlugins/Interface
- FILES_MATCHING PATTERN "*.h"
- )
- INSTALL(
- DIRECTORY ${dir}
- DESTINATION include/cpPlugins/Interface
- FILES_MATCHING PATTERN "*.hxx"
- )
- INSTALL(
- DIRECTORY ${dir}
- DESTINATION include/cpPlugins/Interface
- FILES_MATCHING PATTERN "*.hpp"
- )
-ENDFOREACH(dir)
-
INSTALL(
FILES
${PROJECT_BINARY_DIR}/lib/cpPlugins/Interface/${LIBRARY_NAME}_Export.h
#include <vtkPolyData.h>
// -------------------------------------------------------------------------
-itk::DataObject* cpPlugins::Interface::DataObject::
-GetITKDataObject( )
-{
- return( this->m_ITKObject.GetPointer( ) );
-}
+/* TODO
+ itk::DataObject* cpPlugins::Interface::DataObject::
+ GetITKDataObject( )
+ {
+ return( this->m_ITKObject.GetPointer( ) );
+ }
-// -------------------------------------------------------------------------
-const itk::DataObject* cpPlugins::Interface::DataObject::
-GetITKDataObject( ) const
-{
- return( this->m_ITKObject.GetPointer( ) );
-}
+ // -------------------------------------------------------------------------
+ const itk::DataObject* cpPlugins::Interface::DataObject::
+ GetITKDataObject( ) const
+ {
+ return( this->m_ITKObject.GetPointer( ) );
+ }
-// -------------------------------------------------------------------------
-vtkDataObject* cpPlugins::Interface::DataObject::
-GetVTKDataObject( )
-{
- return( this->m_VTKObject.GetPointer( ) );
-}
+ // -------------------------------------------------------------------------
+ vtkDataObject* cpPlugins::Interface::DataObject::
+ GetVTKDataObject( )
+ {
+ return( this->m_VTKObject.GetPointer( ) );
+ }
-// -------------------------------------------------------------------------
-const vtkDataObject* cpPlugins::Interface::DataObject::
-GetVTKDataObject( ) const
-{
- return( this->m_VTKObject.GetPointer( ) );
-}
+ // -------------------------------------------------------------------------
+ const vtkDataObject* cpPlugins::Interface::DataObject::
+ GetVTKDataObject( ) const
+ {
+ return( this->m_VTKObject.GetPointer( ) );
+ }
+*/
// -------------------------------------------------------------------------
cpPlugins::Interface::Object* cpPlugins::Interface::DataObject::
#include <string>
#include <vtkDataObject.h>
#include <vtkSmartPointer.h>
-#include <cpPlugins/cpPlugins_Export.h>
+#include <cpPlugins/Interface/cpPlugins_Interface_Export.h>
#include <cpPlugins/Interface/Object.h>
#define ITK_MANUAL_INSTANTIATION
{
/**
*/
- class cpPlugins_EXPORT DataObject
+ class cpPlugins_Interface_EXPORT DataObject
: public Object
{
public:
itkTypeMacro( DataObject, Object );
public:
- virtual itk::DataObject* GetITKDataObject( );
- virtual const itk::DataObject* GetITKDataObject( ) const;
- virtual void SetITKDataObject( itk::DataObject* o ) = 0;
+ /* TODO
+ virtual itk::DataObject* GetITKDataObject( );
+ virtual const itk::DataObject* GetITKDataObject( ) const;
- virtual vtkDataObject* GetVTKDataObject( );
- virtual const vtkDataObject* GetVTKDataObject( ) const;
- virtual void SetVTKDataObject( vtkDataObject* o ) = 0;
+ virtual vtkDataObject* GetVTKDataObject( );
+ virtual const vtkDataObject* GetVTKDataObject( ) const;
+ */
Object* GetSource( );
const Object* GetSource( ) const;
+++ /dev/null
-#include <cpPlugins/Interface/FilterObject.h>
-
-// -------------------------------------------------------------------------
-cpPlugins::Interface::FilterObject::
-FilterObject( )
- : Superclass( )
-{
- this->m_ClassName = "cpPlugins::Interface::FilterObject";
- this->m_ClassCategory = "BasicObject";
-}
-
-// -------------------------------------------------------------------------
-cpPlugins::Interface::FilterObject::
-~FilterObject( )
-{
-}
-
-// eof - $RCSfile$
+++ /dev/null
-#ifndef __CPPLUGINS__INTERFACE__FILTEROBJECT__H__
-#define __CPPLUGINS__INTERFACE__FILTEROBJECT__H__
-
-#include <cpPlugins/cpPlugins_Export.h>
-#include <cpPlugins/Interface/ProcessObject.h>
-
-namespace cpPlugins
-{
- namespace Interface
- {
- /**
- */
- class cpPlugins_EXPORT FilterObject
- : public ProcessObject
- {
- public:
- typedef FilterObject Self;
- typedef ProcessObject Superclass;
- typedef itk::SmartPointer< Self > Pointer;
- typedef itk::SmartPointer< const Self > ConstPointer;
-
- public:
- itkTypeMacro( FilterObject, ProcessObject );
-
- protected:
- FilterObject( );
- virtual ~FilterObject( );
-
- private:
- // Purposely not implemented
- FilterObject( const Self& );
- Self& operator=( const Self& );
- };
-
- } // ecapseman
-
-} // ecapseman
-
-#endif // __CPPLUGINS__INTERFACE__FILTEROBJECT__H__
-
-// eof - $RCSfile$
#include <cpPlugins/Interface/Image.h>
-#include <complex>
-#include <vtkImageData.h>
+/* TODO
+ #include <complex>
+ #include <vtkImageData.h>
-#define ITK_MANUAL_INSTANTIATION
-#include <itkImage.h>
-#include <itkImageToVTKImageFilter.h>
+ #define ITK_MANUAL_INSTANTIATION
+ #include <itkImage.h>
+ #include <itkImageToVTKImageFilter.h>
-#include <itkCovariantVector.h>
-#include <itkDiffusionTensor3D.h>
-#include <itkPoint.h>
-#include <itkRGBPixel.h>
-#include <itkRGBAPixel.h>
-#include <itkSymmetricSecondRankTensor.h>
-#include <itkVector.h>
+ #include <itkCovariantVector.h>
+ #include <itkDiffusionTensor3D.h>
+ #include <itkPoint.h>
+ #include <itkRGBPixel.h>
+ #include <itkRGBAPixel.h>
+ #include <itkSymmetricSecondRankTensor.h>
+ #include <itkVector.h>
+*/
// -------------------------------------------------------------------------
-void cpPlugins::Interface::Image::
-SetITKDataObject( itk::DataObject* o )
-{
- bool r;
- if( dynamic_cast< itk::ImageBase< 1 >* >( o ) != NULL )
- {
- cpPlugins_Image_Array_Demangle(
- itk::Vector, float, 1, 1, o, _Type, r
- );
- else cpPlugins_Image_Array_Demangle(
- itk::Vector, double, 1, 1, o, _Type, r
- );
- else cpPlugins_Image_Array_Demangle(
- itk::Point, float, 1, 1, o, _Type, r
- );
- else cpPlugins_Image_Array_Demangle(
- itk::Point, double, 1, 1, o, _Type, r
- );
- else cpPlugins_Image_Array_Demangle(
- itk::CovariantVector, float, 1, 1, o, _Type, r
- );
- else cpPlugins_Image_Array_Demangle(
- itk::CovariantVector, double, 1, 1, o, _Type, r
- );
- else cpPlugins_Image_Array_Demangle(
- itk::SymmetricSecondRankTensor, float, 1, 1, o, _Type, r
- );
- else cpPlugins_Image_Array_Demangle(
- itk::SymmetricSecondRankTensor, double, 1, 1, o, _Type, r
- );
- else r = this->_Dim< 1 >( o );
- }
- else if( dynamic_cast< itk::ImageBase< 2 >* >( o ) != NULL )
- {
- cpPlugins_Image_Demangle(
- itk::RGBPixel< char >, 2, o, _Type, r
- );
- else cpPlugins_Image_Demangle(
- itk::RGBPixel< short >, 2, o, _Type, r
- );
- else cpPlugins_Image_Demangle(
- itk::RGBPixel< unsigned char >, 2, o, _Type, r
- );
- else cpPlugins_Image_Demangle(
- itk::RGBPixel< unsigned short >, 2, o, _Type, r
- );
- else cpPlugins_Image_Demangle(
- itk::RGBAPixel< char >, 2, o, _Type, r
- );
- else cpPlugins_Image_Demangle(
- itk::RGBAPixel< short >, 2, o, _Type, r
- );
- else cpPlugins_Image_Demangle(
- itk::RGBAPixel< unsigned char >, 2, o, _Type, r
- );
- else cpPlugins_Image_Demangle(
- itk::RGBAPixel< unsigned short >, 2, o, _Type, r
- );
- else cpPlugins_Image_Array_Demangle(
- itk::Vector, float, 2, 2, o, _Type, r
- );
- else cpPlugins_Image_Array_Demangle(
- itk::Vector, double, 2, 2, o, _Type, r
- );
- else cpPlugins_Image_Array_Demangle(
- itk::Point, float, 2, 2, o, _Type, r
- );
- else cpPlugins_Image_Array_Demangle(
- itk::Point, double, 2, 2, o, _Type, r
- );
- else cpPlugins_Image_Array_Demangle(
- itk::CovariantVector, float, 2, 2, o, _Type, r
- );
- else cpPlugins_Image_Array_Demangle(
- itk::CovariantVector, double, 2, 2, o, _Type, r
- );
- else cpPlugins_Image_Array_Demangle(
- itk::SymmetricSecondRankTensor, float, 2, 2, o, _Type, r
- );
- else cpPlugins_Image_Array_Demangle(
- itk::SymmetricSecondRankTensor, double, 2, 2, o, _Type, r
- );
- else r = this->_Dim< 2 >( o );
- }
- else if( dynamic_cast< itk::ImageBase< 3 >* >( o ) != NULL )
- {
- cpPlugins_Image_Demangle(
- itk::RGBPixel< char >, 3, o, _Type, r
- );
- else cpPlugins_Image_Demangle(
- itk::RGBPixel< short >, 3, o, _Type, r
- );
- else cpPlugins_Image_Demangle(
- itk::RGBPixel< unsigned char >, 3, o, _Type, r
- );
- else cpPlugins_Image_Demangle(
- itk::RGBPixel< unsigned short >, 3, o, _Type, r
- );
- else cpPlugins_Image_Demangle(
- itk::RGBAPixel< char >, 3, o, _Type, r
- );
- else cpPlugins_Image_Demangle(
- itk::RGBAPixel< short >, 3, o, _Type, r
- );
- else cpPlugins_Image_Demangle(
- itk::RGBAPixel< unsigned char >, 3, o, _Type, r
- );
- else cpPlugins_Image_Demangle(
- itk::RGBAPixel< unsigned short >, 3, o, _Type, r
- );
- else cpPlugins_Image_Array_Demangle(
- itk::Vector, float, 3, 3, o, _Type, r
- );
- else cpPlugins_Image_Array_Demangle(
- itk::Vector, double, 3, 3, o, _Type, r
- );
- else cpPlugins_Image_Array_Demangle(
- itk::Point, float, 3, 3, o, _Type, r
- );
- else cpPlugins_Image_Array_Demangle(
- itk::Point, double, 3, 3, o, _Type, r
- );
- else cpPlugins_Image_Array_Demangle(
- itk::CovariantVector, float, 3, 3, o, _Type, r
- );
- else cpPlugins_Image_Array_Demangle(
- itk::CovariantVector, double, 3, 3, o, _Type, r
- );
- else cpPlugins_Image_Array_Demangle(
- itk::SymmetricSecondRankTensor, float, 3, 3, o, _Type, r
- );
- else cpPlugins_Image_Array_Demangle(
- itk::SymmetricSecondRankTensor, double, 3, 3, o, _Type, r
- );
- else cpPlugins_Image_Demangle(
- itk::DiffusionTensor3D< float >, 3, o, _Type, r
- );
- else cpPlugins_Image_Demangle(
- itk::DiffusionTensor3D< double >, 3, o, _Type, r
- );
- else r = this->_Dim< 3 >( o );
- }
- else if( dynamic_cast< itk::ImageBase< 4 >* >( o ) != NULL )
- {
- this->m_ITKObject = o;
- this->m_VTKObject = NULL;
- this->m_ITKvVTKConnection = NULL;
+/* TODO
+ void cpPlugins::Interface::Image::
+ SetITKDataObject( itk::DataObject* o )
+ {
+ bool r;
+ if( dynamic_cast< itk::ImageBase< 1 >* >( o ) != NULL )
+ {
+ cpPlugins_Image_Array_Demangle(
+ itk::Vector, float, 1, 1, o, _Type, r
+ );
+ else cpPlugins_Image_Array_Demangle(
+ itk::Vector, double, 1, 1, o, _Type, r
+ );
+ else cpPlugins_Image_Array_Demangle(
+ itk::Point, float, 1, 1, o, _Type, r
+ );
+ else cpPlugins_Image_Array_Demangle(
+ itk::Point, double, 1, 1, o, _Type, r
+ );
+ else cpPlugins_Image_Array_Demangle(
+ itk::CovariantVector, float, 1, 1, o, _Type, r
+ );
+ else cpPlugins_Image_Array_Demangle(
+ itk::CovariantVector, double, 1, 1, o, _Type, r
+ );
+ else cpPlugins_Image_Array_Demangle(
+ itk::SymmetricSecondRankTensor, float, 1, 1, o, _Type, r
+ );
+ else cpPlugins_Image_Array_Demangle(
+ itk::SymmetricSecondRankTensor, double, 1, 1, o, _Type, r
+ );
+ else r = this->_Dim< 1 >( o );
+ }
+ else if( dynamic_cast< itk::ImageBase< 2 >* >( o ) != NULL )
+ {
+ cpPlugins_Image_Demangle(
+ itk::RGBPixel< char >, 2, o, _Type, r
+ );
+ else cpPlugins_Image_Demangle(
+ itk::RGBPixel< short >, 2, o, _Type, r
+ );
+ else cpPlugins_Image_Demangle(
+ itk::RGBPixel< unsigned char >, 2, o, _Type, r
+ );
+ else cpPlugins_Image_Demangle(
+ itk::RGBPixel< unsigned short >, 2, o, _Type, r
+ );
+ else cpPlugins_Image_Demangle(
+ itk::RGBAPixel< char >, 2, o, _Type, r
+ );
+ else cpPlugins_Image_Demangle(
+ itk::RGBAPixel< short >, 2, o, _Type, r
+ );
+ else cpPlugins_Image_Demangle(
+ itk::RGBAPixel< unsigned char >, 2, o, _Type, r
+ );
+ else cpPlugins_Image_Demangle(
+ itk::RGBAPixel< unsigned short >, 2, o, _Type, r
+ );
+ else cpPlugins_Image_Array_Demangle(
+ itk::Vector, float, 2, 2, o, _Type, r
+ );
+ else cpPlugins_Image_Array_Demangle(
+ itk::Vector, double, 2, 2, o, _Type, r
+ );
+ else cpPlugins_Image_Array_Demangle(
+ itk::Point, float, 2, 2, o, _Type, r
+ );
+ else cpPlugins_Image_Array_Demangle(
+ itk::Point, double, 2, 2, o, _Type, r
+ );
+ else cpPlugins_Image_Array_Demangle(
+ itk::CovariantVector, float, 2, 2, o, _Type, r
+ );
+ else cpPlugins_Image_Array_Demangle(
+ itk::CovariantVector, double, 2, 2, o, _Type, r
+ );
+ else cpPlugins_Image_Array_Demangle(
+ itk::SymmetricSecondRankTensor, float, 2, 2, o, _Type, r
+ );
+ else cpPlugins_Image_Array_Demangle(
+ itk::SymmetricSecondRankTensor, double, 2, 2, o, _Type, r
+ );
+ else r = this->_Dim< 2 >( o );
+ }
+ else if( dynamic_cast< itk::ImageBase< 3 >* >( o ) != NULL )
+ {
+ cpPlugins_Image_Demangle(
+ itk::RGBPixel< char >, 3, o, _Type, r
+ );
+ else cpPlugins_Image_Demangle(
+ itk::RGBPixel< short >, 3, o, _Type, r
+ );
+ else cpPlugins_Image_Demangle(
+ itk::RGBPixel< unsigned char >, 3, o, _Type, r
+ );
+ else cpPlugins_Image_Demangle(
+ itk::RGBPixel< unsigned short >, 3, o, _Type, r
+ );
+ else cpPlugins_Image_Demangle(
+ itk::RGBAPixel< char >, 3, o, _Type, r
+ );
+ else cpPlugins_Image_Demangle(
+ itk::RGBAPixel< short >, 3, o, _Type, r
+ );
+ else cpPlugins_Image_Demangle(
+ itk::RGBAPixel< unsigned char >, 3, o, _Type, r
+ );
+ else cpPlugins_Image_Demangle(
+ itk::RGBAPixel< unsigned short >, 3, o, _Type, r
+ );
+ else cpPlugins_Image_Array_Demangle(
+ itk::Vector, float, 3, 3, o, _Type, r
+ );
+ else cpPlugins_Image_Array_Demangle(
+ itk::Vector, double, 3, 3, o, _Type, r
+ );
+ else cpPlugins_Image_Array_Demangle(
+ itk::Point, float, 3, 3, o, _Type, r
+ );
+ else cpPlugins_Image_Array_Demangle(
+ itk::Point, double, 3, 3, o, _Type, r
+ );
+ else cpPlugins_Image_Array_Demangle(
+ itk::CovariantVector, float, 3, 3, o, _Type, r
+ );
+ else cpPlugins_Image_Array_Demangle(
+ itk::CovariantVector, double, 3, 3, o, _Type, r
+ );
+ else cpPlugins_Image_Array_Demangle(
+ itk::SymmetricSecondRankTensor, float, 3, 3, o, _Type, r
+ );
+ else cpPlugins_Image_Array_Demangle(
+ itk::SymmetricSecondRankTensor, double, 3, 3, o, _Type, r
+ );
+ else cpPlugins_Image_Demangle(
+ itk::DiffusionTensor3D< float >, 3, o, _Type, r
+ );
+ else cpPlugins_Image_Demangle(
+ itk::DiffusionTensor3D< double >, 3, o, _Type, r
+ );
+ else r = this->_Dim< 3 >( o );
+ }
+ else if( dynamic_cast< itk::ImageBase< 4 >* >( o ) != NULL )
+ {
+ this->m_ITKObject = o;
+ this->m_VTKObject = NULL;
+ this->m_ITKvVTKConnection = NULL;
- } // fi
-}
+ } // fi
+ }
+*/
// -------------------------------------------------------------------------
void cpPlugins::Interface::Image::
-SetVTKDataObject( vtkDataObject* o )
+SetVTKImageData( vtkImageData* image )
{
- // this->m_VTKObject = o;
+ // this->m_VTKObject = image;
std::cerr << "Image: TODO this!!!!" << std::endl;
std::exit( 1 );
}
vtkImageData* cpPlugins::Interface::Image::
GetVTKImageData( )
{
- return( dynamic_cast< vtkImageData* >( this->GetVTKDataObject( ) ) );
+ return(
+ dynamic_cast< vtkImageData* >( this->m_VTKObject.GetPointer( ) )
+ );
}
// -------------------------------------------------------------------------
GetVTKImageData( ) const
{
return(
- dynamic_cast< const vtkImageData* >( this->GetVTKDataObject( ) )
+ dynamic_cast< const vtkImageData* >( this->m_VTKObject.GetPointer( ) )
);
}
}
// -------------------------------------------------------------------------
-template< unsigned int D >
-bool cpPlugins::Interface::Image::
-_Dim( itk::DataObject* o )
-{
- bool r;
- cpPlugins_Image_Demangle(
- char, D, o, _Type, r
- );
- else cpPlugins_Image_Demangle(
- short, D, o, _Type, r
- );
- else cpPlugins_Image_Demangle(
- int, D, o, _Type, r
- );
- else cpPlugins_Image_Demangle(
- long, D, o, _Type, r
- );
- else cpPlugins_Image_Demangle(
- unsigned char, D, o, _Type, r
- );
- else cpPlugins_Image_Demangle(
- unsigned short, D, o, _Type, r
- );
- else cpPlugins_Image_Demangle(
- unsigned int, D, o, _Type, r
- );
- else cpPlugins_Image_Demangle(
- unsigned long, D, o, _Type, r
- );
- else cpPlugins_Image_Demangle(
- float, D, o, _Type, r
- );
- else cpPlugins_Image_Demangle(
- double, D, o, _Type, r
- );
- else
- {
- this->m_ITKObject = o;
- this->m_VTKObject = NULL;
- this->m_ITKvVTKConnection = NULL;
+/* TODO
+ template< unsigned int D >
+ bool cpPlugins::Interface::Image::
+ _Dim( itk::DataObject* o )
+ {
+ bool r;
+ cpPlugins_Image_Demangle(
+ char, D, o, _Type, r
+ );
+ else cpPlugins_Image_Demangle(
+ short, D, o, _Type, r
+ );
+ else cpPlugins_Image_Demangle(
+ int, D, o, _Type, r
+ );
+ else cpPlugins_Image_Demangle(
+ long, D, o, _Type, r
+ );
+ else cpPlugins_Image_Demangle(
+ unsigned char, D, o, _Type, r
+ );
+ else cpPlugins_Image_Demangle(
+ unsigned short, D, o, _Type, r
+ );
+ else cpPlugins_Image_Demangle(
+ unsigned int, D, o, _Type, r
+ );
+ else cpPlugins_Image_Demangle(
+ unsigned long, D, o, _Type, r
+ );
+ else cpPlugins_Image_Demangle(
+ float, D, o, _Type, r
+ );
+ else cpPlugins_Image_Demangle(
+ double, D, o, _Type, r
+ );
+ else
+ {
+ this->m_ITKObject = o;
+ this->m_VTKObject = NULL;
+ this->m_ITKvVTKConnection = NULL;
- } // fi
- return( true );
-}
+ } // fi
+ return( true );
+ }
-// -------------------------------------------------------------------------
-template< class I >
-bool cpPlugins::Interface::Image::
-_Type( itk::DataObject* o )
-{
- typedef itk::ImageToVTKImageFilter< I > _F;
+ // -------------------------------------------------------------------------
+ template< class I >
+ bool cpPlugins::Interface::Image::
+ _Type( itk::DataObject* o )
+ {
+ typedef itk::ImageToVTKImageFilter< I > _F;
- typename _F::Pointer f = _F::New( );
- f->SetInput( dynamic_cast< I* >( o ) );
- f->Update( );
+ typename _F::Pointer f = _F::New( );
+ f->SetInput( dynamic_cast< I* >( o ) );
+ f->Update( );
- this->m_ITKObject = o;
- this->m_VTKObject = f->GetOutput( );
- this->m_ITKvVTKConnection = f;
+ this->m_ITKObject = o;
+ this->m_VTKObject = f->GetOutput( );
+ this->m_ITKvVTKConnection = f;
- return( true );
-}
+ return( true );
+ }
+*/
// eof - $RCSfile$
#ifndef __CPPLUGINS__INTERFACE__IMAGE__H__
#define __CPPLUGINS__INTERFACE__IMAGE__H__
-#include <map>
-#include <string>
-#include <cpPlugins/cpPlugins_Export.h>
+#include <cpPlugins/Interface/cpPlugins_Interface_Export.h>
#include <cpPlugins/Interface/DataObject.h>
#define ITK_MANUAL_INSTANTIATION
class vtkImageData;
// -------------------------------------------------------------------------
-#define cpPlugins_Image_Demangle( p, d, o, f, r ) \
- if( dynamic_cast< itk::Image< p, d >* >( o ) != NULL ) \
- r = this->f< itk::Image< p, d > >( o )
+/* TODO
+ #define cpPlugins_Image_Demangle( p, d, o, f, r ) \
+ if( dynamic_cast< itk::Image< p, d >* >( o ) != NULL ) \
+ r = this->f< itk::Image< p, d > >( o )
-// -------------------------------------------------------------------------
-#define cpPlugins_Image_Array_Demangle( a, p, da, di, o, f, r ) \
- if( dynamic_cast< itk::Image< a< p, da >, di >* >( o ) != NULL ) \
- r = this->f< itk::Image< a< p, da >, di > >( o )
+ // -------------------------------------------------------------------------
+ #define cpPlugins_Image_Array_Demangle( a, p, da, di, o, f, r ) \
+ if( dynamic_cast< itk::Image< a< p, da >, di >* >( o ) != NULL ) \
+ r = this->f< itk::Image< a< p, da >, di > >( o )
+*/
// -------------------------------------------------------------------------
namespace cpPlugins
{
/**
*/
- class cpPlugins_EXPORT Image
+ class cpPlugins_Interface_EXPORT Image
: public DataObject
{
public:
itkTypeMacro( Image, DataObject );
public:
- virtual void SetITKDataObject( itk::DataObject* o );
- virtual void SetVTKDataObject( vtkDataObject* o );
+ /*
+ virtual void SetITKDataObject( itk::DataObject* o );
+ virtual void SetVTKDataObject( vtkDataObject* o );
+ */
+
+ template< class I >
+ inline void SetITKImage( itk::DataObject* object );
+
+ template< class I >
+ inline I* GetITKImage( );
+ template< class I >
+ inline const I* GetITKImage( ) const;
+
+ virtual void SetVTKImageData( vtkImageData* image );
virtual vtkImageData* GetVTKImageData( );
virtual const vtkImageData* GetVTKImageData( ) const;
Image( );
virtual ~Image( );
- template< unsigned int D >
- bool _Dim( itk::DataObject* o );
+ /* TODO
+ template< unsigned int D >
+ bool _Dim( itk::DataObject* o );
- template< class I >
- bool _Type( itk::DataObject* o );
+ template< class I >
+ bool _Type( itk::DataObject* o );
+ */
private:
// Purposely not implemented
} // ecapseman
+#include <cpPlugins/Interface/Image.hxx>
+
#endif // __CPPLUGINS__INTERFACE__IMAGE__H__
// eof - $RCSfile$
--- /dev/null
+#ifndef __CPPLUGINS__INTERFACE__IMAGE__HXX__
+#define __CPPLUGINS__INTERFACE__IMAGE__HXX__
+
+#define ITK_MANUAL_INSTANTIATION
+#include <itkImageToVTKImageFilter.h>
+
+// -------------------------------------------------------------------------
+template< class I >
+void cpPlugins::Interface::Image::
+SetITKImage( itk::DataObject* object )
+{
+ // Check if input object has the desired type
+ I* image = dynamic_cast< I* >( object );
+ if( image == NULL )
+ return;
+
+ // Connect it to VTK
+ typename itk::ImageToVTKImageFilter< I >::Pointer f =
+ itk::ImageToVTKImageFilter< I >::New( );
+ f->SetInput( image );
+ f->Update( );
+
+ // Keep objects
+ this->m_ITKObject = object;
+ this->m_VTKObject = f->GetOutput( );
+ this->m_ITKvVTKConnection = f;
+ this->Modified( );
+}
+
+// -------------------------------------------------------------------------
+template< class I >
+I* cpPlugins::Interface::Image::
+GetITKImage( )
+{
+ return( dynamic_cast< I* >( this->m_ITKObject.GetPointer( ) ) );
+}
+
+// -------------------------------------------------------------------------
+template< class I >
+const I* cpPlugins::Interface::Image::
+GetITKImage( ) const
+{
+ return( dynamic_cast< const I* >( this->m_ITKObject.GetPointer( ) ) );
+}
+
+#endif // __CPPLUGINS__INTERFACE__IMAGE__HXX__
+
+// eof - $RCSfile$
+++ /dev/null
-#include <cpPlugins/Interface/ImageSink.h>
-
-// -------------------------------------------------------------------------
-cpPlugins::Interface::ImageSink::
-ImageSink( )
- : Superclass( )
-{
- this->m_ClassName = "cpPlugins::Interface::ImageSink";
- this->m_ClassCategory = "ImageSink";
-}
-
-// -------------------------------------------------------------------------
-cpPlugins::Interface::ImageSink::
-~ImageSink( )
-{
-}
-
-// eof - $RCSfile$
+++ /dev/null
-#ifndef __CPPLUGINS__INTERFACE__IMAGESINK__H__
-#define __CPPLUGINS__INTERFACE__IMAGESINK__H__
-
-#include <cpPlugins/cpPlugins_Export.h>
-#include <cpPlugins/Interface/SinkObject.h>
-
-namespace cpPlugins
-{
- namespace Interface
- {
- /**
- */
- class cpPlugins_EXPORT ImageSink
- : public SinkObject
- {
- public:
- typedef ImageSink Self;
- typedef SinkObject Superclass;
- typedef itk::SmartPointer< Self > Pointer;
- typedef itk::SmartPointer< const Self > ConstPointer;
-
- public:
- itkTypeMacro( ImageSink, SinkObject );
-
- protected:
- ImageSink( );
- virtual ~ImageSink( );
-
- private:
- // Purposely not implemented
- ImageSink( const Self& );
- Self& operator=( const Self& );
- };
-
- } // ecapseman
-
-} // ecapseman
-
-#endif // __CPPLUGINS__INTERFACE__IMAGESINK__H__
-
-// eof - $RCSfile$
+++ /dev/null
-#include <cpPlugins/Interface/ImageSource.h>
-
-// -------------------------------------------------------------------------
-cpPlugins::Interface::ImageSource::
-ImageSource( )
- : Superclass( )
-{
- this->m_ClassName = "cpPlugins::Interface::ImageSource";
- this->m_ClassCategory = "ImageSource";
-}
-
-// -------------------------------------------------------------------------
-cpPlugins::Interface::ImageSource::
-~ImageSource( )
-{
-}
-
-// eof - $RCSfile$
+++ /dev/null
-#ifndef __CPPLUGINS__INTERFACE__IMAGESOURCE__H__
-#define __CPPLUGINS__INTERFACE__IMAGESOURCE__H__
-
-#include <cpPlugins/cpPlugins_Export.h>
-#include <cpPlugins/Interface/SourceObject.h>
-
-namespace cpPlugins
-{
- namespace Interface
- {
- /**
- */
- class cpPlugins_EXPORT ImageSource
- : public SourceObject
- {
- public:
- typedef ImageSource Self;
- typedef SourceObject Superclass;
- typedef itk::SmartPointer< Self > Pointer;
- typedef itk::SmartPointer< const Self > ConstPointer;
-
- public:
- itkTypeMacro( ImageSource, SourceObject );
-
- protected:
- ImageSource( );
- virtual ~ImageSource( );
-
- private:
- // Purposely not implemented
- ImageSource( const Self& );
- Self& operator=( const Self& );
- };
-
- } // ecapseman
-
-} // ecapseman
-
-#endif // __CPPLUGINS__INTERFACE__IMAGESOURCE__H__
-
-// eof - $RCSfile$
+++ /dev/null
-#include <cpPlugins/Interface/ImageToImageFilter.h>
-
-// -------------------------------------------------------------------------
-cpPlugins::Interface::ImageToImageFilter::
-ImageToImageFilter( )
- : Superclass( )
-{
- this->m_ClassName = "cpPlugins::Interface::ImageToImageFilter";
- this->m_ClassCategory = "ImageToImageFilter";
-}
-
-// -------------------------------------------------------------------------
-cpPlugins::Interface::ImageToImageFilter::
-~ImageToImageFilter( )
-{
-}
-
-// eof - $RCSfile$
+++ /dev/null
-#ifndef __CPPLUGINS__INTERFACE__IMAGETOIMAGEFILTER__H__
-#define __CPPLUGINS__INTERFACE__IMAGETOIMAGEFILTER__H__
-
-#include <cpPlugins/cpPlugins_Export.h>
-#include <cpPlugins/Interface/FilterObject.h>
-
-namespace cpPlugins
-{
- namespace Interface
- {
- /**
- */
- class cpPlugins_EXPORT ImageToImageFilter
- : public FilterObject
- {
- public:
- typedef ImageToImageFilter Self;
- typedef FilterObject Superclass;
- typedef itk::SmartPointer< Self > Pointer;
- typedef itk::SmartPointer< const Self > ConstPointer;
-
- public:
- itkTypeMacro( ImageToImageFilter, FilterObject );
-
- protected:
- ImageToImageFilter( );
- virtual ~ImageToImageFilter( );
-
- private:
- // Purposely not implemented
- ImageToImageFilter( const Self& );
- Self& operator=( const Self& );
- };
-
- } // ecapseman
-
-} // ecapseman
-
-#endif // __CPPLUGINS__INTERFACE__IMAGETOIMAGEFILTER__H__
-
-// eof - $RCSfile$
+++ /dev/null
-#include <cpPlugins/Interface/ImageToMeshFilter.h>
-
-// -------------------------------------------------------------------------
-cpPlugins::Interface::ImageToMeshFilter::
-ImageToMeshFilter( )
- : Superclass( )
-{
- this->m_ClassName = "cpPlugins::Interface::ImageToMeshFilter";
- this->m_ClassCategory = "ImageToMeshFilter";
-}
-
-// -------------------------------------------------------------------------
-cpPlugins::Interface::ImageToMeshFilter::
-~ImageToMeshFilter( )
-{
-}
-
-// eof - $RCSfile$
+++ /dev/null
-#ifndef __CPPLUGINS__INTERFACE__IMAGETOMESHFILTER__H__
-#define __CPPLUGINS__INTERFACE__IMAGETOMESHFILTER__H__
-
-#include <cpPlugins/cpPlugins_Export.h>
-#include <cpPlugins/Interface/FilterObject.h>
-
-namespace cpPlugins
-{
- namespace Interface
- {
- /**
- */
- class cpPlugins_EXPORT ImageToMeshFilter
- : public FilterObject
- {
- public:
- typedef ImageToMeshFilter Self;
- typedef FilterObject Superclass;
- typedef itk::SmartPointer< Self > Pointer;
- typedef itk::SmartPointer< const Self > ConstPointer;
-
- public:
- itkTypeMacro( ImageToMeshFilter, FilterObject );
-
- protected:
- ImageToMeshFilter( );
- virtual ~ImageToMeshFilter( );
-
- private:
- // Purposely not implemented
- ImageToMeshFilter( const Self& );
- Self& operator=( const Self& );
- };
-
- } // ecapseman
-
-} // ecapseman
-
-#endif // __CPPLUGINS__INTERFACE__IMAGETOMESHFILTER__H__
-
-// eof - $RCSfile$
#include <vector>
#include <Pluma/Pluma.hpp>
-#include <cpPlugins/cpPlugins_Export.h>
+#include <cpPlugins/Interface/cpPlugins_Interface_Export.h>
#include <cpPlugins/Interface/Object.h>
#include <cpPlugins/Interface/ProcessObject.h>
{
/**
*/
- class cpPlugins_EXPORT Interface
+ class cpPlugins_Interface_EXPORT Interface
{
public:
typedef std::vector< ObjectProvider* > TProviders;
// -------------------------------------------------------------------------
void cpPlugins::Interface::Mesh::
+SetVTKMesh( vtkPolyData* mesh )
+{
+ this->m_VTKObject = mesh;
+ this->Modified( );
+}
+
+// -------------------------------------------------------------------------
+vtkPolyData* cpPlugins::Interface::Mesh::
+GetVTKMesh( )
+{
+ return( dynamic_cast< vtkPolyData* >( this->m_VTKObject.GetPointer( ) ) );
+}
+
+// -------------------------------------------------------------------------
+const vtkPolyData* cpPlugins::Interface::Mesh::
+GetVTKMesh( ) const
+{
+ return(
+ dynamic_cast< const vtkPolyData* >( this->m_VTKObject.GetPointer( ) )
+ );
+}
+
+/*
+void cpPlugins::Interface::Mesh::
SetITKDataObject( itk::DataObject* o )
{
// TODO: conversion!!!
dynamic_cast< const vtkPolyData* >( this->m_VTKObject.GetPointer( ) )
);
}
+*/
// -------------------------------------------------------------------------
cpPlugins::Interface::Mesh::
}
// -------------------------------------------------------------------------
+/* TODO
template< unsigned int D >
void cpPlugins::Interface::Mesh::
_ITK_2_VTK_0( itk::DataObject* o )
_VTK_2_ITK_1( itk::DataObject* o )
{
}
+*/
// eof - $RCSfile$
#ifndef __CPPLUGINS__INTERFACE__MESH__H__
#define __CPPLUGINS__INTERFACE__MESH__H__
-#include <cpPlugins/cpPlugins_Export.h>
+#include <cpPlugins/Interface/cpPlugins_Interface_Export.h>
#include <cpPlugins/Interface/DataObject.h>
class vtkPolyData;
{
/**
*/
- class cpPlugins_EXPORT Mesh
+ class cpPlugins_Interface_EXPORT Mesh
: public DataObject
{
public:
itkTypeMacro( Mesh, DataObject );
public:
- virtual void SetITKDataObject( itk::DataObject* o );
- virtual void SetVTKDataObject( vtkDataObject* o );
+ template< class M >
+ inline void SetITKMesh( itk::DataObject* object );
- vtkPolyData* GetVTKPolyData( );
- const vtkPolyData* GetVTKPolyData( ) const;
+ template< class M >
+ inline M* GetITKMesh( );
+
+ template< class M >
+ inline const M* GetITKMesh( ) const;
+
+ virtual void SetVTKMesh( vtkPolyData* mesh );
+ virtual vtkPolyData* GetVTKMesh( );
+ virtual const vtkPolyData* GetVTKMesh( ) const;
+
+ /* TODO
+ virtual void SetITKDataObject( itk::DataObject* o );
+ virtual void SetVTKDataObject( vtkDataObject* o );
+
+ vtkPolyData* GetVTKPolyData( );
+ const vtkPolyData* GetVTKPolyData( ) const;
+ */
protected:
Mesh( );
virtual ~Mesh( );
- template< unsigned int D >
- void _ITK_2_VTK_0( itk::DataObject* o );
+ /* TODO
+ template< unsigned int D >
+ void _ITK_2_VTK_0( itk::DataObject* o );
- template< class P, unsigned int D >
- void _ITK_2_VTK_1( itk::DataObject* o );
+ template< class P, unsigned int D >
+ void _ITK_2_VTK_1( itk::DataObject* o );
- template< unsigned int D >
- void _VTK_2_ITK_0( itk::DataObject* o );
+ template< unsigned int D >
+ void _VTK_2_ITK_0( itk::DataObject* o );
- template< class P, unsigned int D >
- void _VTK_2_ITK_1( itk::DataObject* o );
+ template< class P, unsigned int D >
+ void _VTK_2_ITK_1( itk::DataObject* o );
+ */
private:
// Purposely not implemented
} // ecapseman
+#include <cpPlugins/Interface/Mesh.hxx>
+
#endif // __CPPLUGINS__INTERFACE__MESH__H__
// eof - $RCSfile$
--- /dev/null
+#ifndef __CPPLUGINS__INTERFACE__MESH__HXX__
+#define __CPPLUGINS__INTERFACE__MESH__HXX__
+
+// -------------------------------------------------------------------------
+template< class M >
+void cpPlugins::Interface::Mesh::
+SetITKMesh( itk::DataObject* object )
+{
+ std::cerr << "SetITKMesh: TODO" << std::endl;
+ std::exit( 1 );
+}
+
+// -------------------------------------------------------------------------
+template< class M >
+M* cpPlugins::Interface::Mesh::
+GetITKMesh( )
+{
+ std::cerr << "GetITKMesh: TODO" << std::endl;
+ std::exit( 1 );
+ return( NULL );
+}
+
+// -------------------------------------------------------------------------
+template< class M >
+const M* cpPlugins::Interface::Mesh::
+GetITKMesh( ) const
+{
+ std::cerr << "GetITKMesh (const): TODO" << std::endl;
+ std::exit( 1 );
+ return( NULL );
+}
+
+#endif // __CPPLUGINS__INTERFACE__MESH__HXX__
+
+// eof - $RCSfile$
+++ /dev/null
-#include <cpPlugins/Interface/MeshSink.h>
-
-// -------------------------------------------------------------------------
-cpPlugins::Interface::MeshSink::
-MeshSink( )
- : Superclass( )
-{
- this->m_ClassName = "cpPlugins::Interface::MeshSink";
- this->m_ClassCategory = "MeshSink";
-}
-
-// -------------------------------------------------------------------------
-cpPlugins::Interface::MeshSink::
-~MeshSink( )
-{
-}
-
-// eof - $RCSfile$
+++ /dev/null
-#ifndef __CPPLUGINS__INTERFACE__MESHSINK__H__
-#define __CPPLUGINS__INTERFACE__MESHSINK__H__
-
-#include <cpPlugins/cpPlugins_Export.h>
-#include <cpPlugins/Interface/SinkObject.h>
-
-namespace cpPlugins
-{
- namespace Interface
- {
- /**
- */
- class cpPlugins_EXPORT MeshSink
- : public SinkObject
- {
- public:
- typedef MeshSink Self;
- typedef SinkObject Superclass;
- typedef itk::SmartPointer< Self > Pointer;
- typedef itk::SmartPointer< const Self > ConstPointer;
-
- public:
- itkTypeMacro( MeshSink, SinkObject );
-
- protected:
- MeshSink( );
- virtual ~MeshSink( );
-
- private:
- // Purposely not implemented
- MeshSink( const Self& );
- Self& operator=( const Self& );
- };
-
- } // ecapseman
-
-} // ecapseman
-
-#endif // __CPPLUGINS__INTERFACE__MESHSINK__H__
-
-// eof - $RCSfile$
+++ /dev/null
-#include <cpPlugins/Interface/MeshSource.h>
-
-// -------------------------------------------------------------------------
-cpPlugins::Interface::MeshSource::
-MeshSource( )
- : Superclass( )
-{
- this->m_ClassName = "cpPlugins::Interface::MeshSource";
- this->m_ClassCategory = "MeshSource";
-}
-
-// -------------------------------------------------------------------------
-cpPlugins::Interface::MeshSource::
-~MeshSource( )
-{
-}
-
-// eof - $RCSfile$
+++ /dev/null
-#ifndef __CPPLUGINS__INTERFACE__MESHSOURCE__H__
-#define __CPPLUGINS__INTERFACE__MESHSOURCE__H__
-
-#include <cpPlugins/cpPlugins_Export.h>
-#include <cpPlugins/Interface/SourceObject.h>
-
-namespace cpPlugins
-{
- namespace Interface
- {
- /**
- */
- class cpPlugins_EXPORT MeshSource
- : public SourceObject
- {
- public:
- typedef MeshSource Self;
- typedef SourceObject Superclass;
- typedef itk::SmartPointer< Self > Pointer;
- typedef itk::SmartPointer< const Self > ConstPointer;
-
- public:
- itkTypeMacro( MeshSource, SourceObject );
-
- protected:
- MeshSource( );
- virtual ~MeshSource( );
-
- private:
- // Purposely not implemented
- MeshSource( const Self& );
- Self& operator=( const Self& );
- };
-
- } // ecapseman
-
-} // ecapseman
-
-#endif // __CPPLUGINS__INTERFACE__MESHSOURCE__H__
-
-// eof - $RCSfile$
+++ /dev/null
-#include <cpPlugins/Interface/MeshToImageFilter.h>
-
-// -------------------------------------------------------------------------
-cpPlugins::Interface::MeshToImageFilter::
-MeshToImageFilter( )
- : Superclass( )
-{
- this->m_ClassName = "cpPlugins::Interface::MeshToImageFilter";
- this->m_ClassCategory = "MeshToImageFilter";
-}
-
-// -------------------------------------------------------------------------
-cpPlugins::Interface::MeshToImageFilter::
-~MeshToImageFilter( )
-{
-}
-
-// eof - $RCSfile$
+++ /dev/null
-#ifndef __CPPLUGINS__INTERFACE__MESHTOIMAGEFILTER__H__
-#define __CPPLUGINS__INTERFACE__MESHTOIMAGEFILTER__H__
-
-#include <cpPlugins/cpPlugins_Export.h>
-#include <cpPlugins/Interface/FilterObject.h>
-
-namespace cpPlugins
-{
- namespace Interface
- {
- /**
- */
- class cpPlugins_EXPORT MeshToImageFilter
- : public FilterObject
- {
- public:
- typedef MeshToImageFilter Self;
- typedef FilterObject Superclass;
- typedef itk::SmartPointer< Self > Pointer;
- typedef itk::SmartPointer< const Self > ConstPointer;
-
- public:
- itkTypeMacro( MeshToImageFilter, FilterObject );
-
- protected:
- MeshToImageFilter( );
- virtual ~MeshToImageFilter( );
-
- private:
- // Purposely not implemented
- MeshToImageFilter( const Self& );
- Self& operator=( const Self& );
- };
-
- } // ecapseman
-
-} // ecapseman
-
-#endif // __CPPLUGINS__INTERFACE__MESHTOIMAGEFILTER__H__
-
-// eof - $RCSfile$
+++ /dev/null
-#include <cpPlugins/Interface/MeshToMeshFilter.h>
-
-// -------------------------------------------------------------------------
-cpPlugins::Interface::MeshToMeshFilter::
-MeshToMeshFilter( )
- : Superclass( )
-{
- this->m_ClassName = "cpPlugins::Interface::MeshToMeshFilter";
- this->m_ClassCategory = "MeshToMeshFilter";
-}
-
-// -------------------------------------------------------------------------
-cpPlugins::Interface::MeshToMeshFilter::
-~MeshToMeshFilter( )
-{
-}
-
-// eof - $RCSfile$
+++ /dev/null
-#ifndef __CPPLUGINS__INTERFACE__MESHTOMESHFILTER__H__
-#define __CPPLUGINS__INTERFACE__MESHTOMESHFILTER__H__
-
-#include <cpPlugins/cpPlugins_Export.h>
-#include <cpPlugins/Interface/FilterObject.h>
-
-namespace cpPlugins
-{
- namespace Interface
- {
- /**
- */
- class cpPlugins_EXPORT MeshToMeshFilter
- : public FilterObject
- {
- public:
- typedef MeshToMeshFilter Self;
- typedef FilterObject Superclass;
- typedef itk::SmartPointer< Self > Pointer;
- typedef itk::SmartPointer< const Self > ConstPointer;
-
- public:
- itkTypeMacro( MeshToMeshFilter, FilterObject );
-
- protected:
- MeshToMeshFilter( );
- virtual ~MeshToMeshFilter( );
-
- private:
- // Purposely not implemented
- MeshToMeshFilter( const Self& );
- Self& operator=( const Self& );
- };
-
- } // ecapseman
-
-} // ecapseman
-
-#endif // __CPPLUGINS__INTERFACE__MESHTOMESHFILTER__H__
-
-// eof - $RCSfile$
#include <string>
#include <Pluma/Pluma.hpp>
-#include <cpPlugins/cpPlugins_Export.h>
+#include <cpPlugins/Interface/cpPlugins_Interface_Export.h>
#define ITK_MANUAL_INSTANTIATION
#include <itkObject.h>
// -------------------------------------------------------------------------
#define CPPLUGINS_PROVIDER_HEADER_BEGIN( TYPE ) \
- class cpPlugins_EXPORT TYPE##Provider \
+ class cpPlugins_Interface_EXPORT TYPE##Provider \
: public pluma::Provider \
{ \
- private: \
+private: \
friend class pluma::Pluma; \
static const unsigned int PLUMA_INTERFACE_VERSION; \
static const unsigned int PLUMA_INTERFACE_LOWEST_VERSION; \
static const std::string PLUMA_PROVIDER_TYPE; \
std::string plumaGetType( ) const \
{ return( PLUMA_PROVIDER_TYPE ); } \
- public: \
+public: \
unsigned int getVersion( ) const \
{ return( PLUMA_INTERFACE_VERSION ); }
// -------------------------------------------------------------------------
#define CPPLUGINS_PROVIDER_HEADER( TYPE ) \
CPPLUGINS_PROVIDER_HEADER_BEGIN( TYPE ) \
- virtual TYPE::Pointer create( ) const = 0; \
+ virtual TYPE::Pointer create( ) const = 0; \
CPPLUGINS_PROVIDER_HEADER_END
// -------------------------------------------------------------------------
{
/**
*/
- class cpPlugins_EXPORT Object
+ class cpPlugins_Interface_EXPORT Object
: public itk::Object
{
public:
#include <ostream>
#include <string>
#include <vector>
-#include <cpPlugins/cpPlugins_Export.h>
+#include <cpPlugins/Interface/cpPlugins_Interface_Export.h>
namespace cpPlugins
{
{
/**
*/
- class cpPlugins_EXPORT Parameters
+ class cpPlugins_Interface_EXPORT Parameters
{
// -------------------------------------------------------------------
friend std::ostream& operator<<(
#ifndef __CPPLUGINS__INTERFACE__PROCESSOBJECT__H__
#define __CPPLUGINS__INTERFACE__PROCESSOBJECT__H__
-#include <cpPlugins/cpPlugins_Export.h>
+#include <cpPlugins/Interface/cpPlugins_Interface_Export.h>
#include <cpPlugins/Interface/Object.h>
#include <cpPlugins/Interface/DataObject.h>
#include <cpPlugins/Interface/Parameters.h>
-#include <cpPlugins/Interface/Image.h>
-
#define ITK_MANUAL_INSTANTIATION
#include <itkProcessObject.h>
{
/**
*/
- class cpPlugins_EXPORT ProcessObject
+ class cpPlugins_Interface_EXPORT ProcessObject
: public Object
{
public:
virtual ~ProcessObject( );
template< class O >
- void _MakeOutput( unsigned int idx )
- {
- if( idx >= this->m_Outputs.size( ) )
- return;
- this->m_Outputs[ idx ] = O::New( );
- this->m_Outputs[ idx ]->SetSource( this );
- }
+ inline void _MakeOutput( unsigned int idx );
virtual std::string _GenerateData( ) = 0;
} // ecapseman
-// -------------------------------------------------------------------------
-#define cpPlugins_Image_Demangle_Methods( c ) \
- std::string _DemangleImageDimension( itk::DataObject* o ); \
- std::string _DemangleImagePixel( unsigned int d, itk::DataObject* o );
+#include <cpPlugins/Interface/ProcessObject.hxx>
-// -------------------------------------------------------------------------
-#define cpPlugins_Image_Demangle_Methods_Code( c, f ) \
- std::string c::_DemangleImageDimension( itk::DataObject* o ) \
- { \
- std::string r = ""; \
- if( dynamic_cast< itk::ImageBase< 1 >* >( o ) != NULL ) \
- { \
- cpPlugins_Image_Array_Demangle( \
- itk::Vector, float, 1, 1, o, f, r \
- ); \
- else cpPlugins_Image_Array_Demangle( \
- itk::Vector, double, 1, 1, o, f, r \
- ); \
- else cpPlugins_Image_Array_Demangle( \
- itk::Point, float, 1, 1, o, f, r \
- ); \
- else cpPlugins_Image_Array_Demangle( \
- itk::Point, double, 1, 1, o, f, r \
- ); \
- else cpPlugins_Image_Array_Demangle( \
- itk::CovariantVector, float, 1, 1, o, f, r \
- ); \
- else cpPlugins_Image_Array_Demangle( \
- itk::CovariantVector, double, 1, 1, o, f, r \
- ); \
- else cpPlugins_Image_Array_Demangle( \
- itk::SymmetricSecondRankTensor, float, 1, 1, o, f, r \
- ); \
- else cpPlugins_Image_Array_Demangle( \
- itk::SymmetricSecondRankTensor, double, 1, 1, o, f, r \
- ); \
- else r = this->_DemangleImagePixel( 1, o ); \
- } \
- else if( dynamic_cast< itk::ImageBase< 2 >* >( o ) != NULL ) \
- { \
- cpPlugins_Image_Demangle( \
- itk::RGBPixel< char >, 2, o, f, r \
- ); \
- else cpPlugins_Image_Demangle( \
- itk::RGBPixel< short >, 2, o, f, r \
- ); \
- else cpPlugins_Image_Demangle( \
- itk::RGBPixel< unsigned char >, 2, o, f, r \
- ); \
- else cpPlugins_Image_Demangle( \
- itk::RGBPixel< unsigned short >, 2, o, f, r \
- ); \
- else cpPlugins_Image_Demangle( \
- itk::RGBAPixel< char >, 2, o, f, r \
- ); \
- else cpPlugins_Image_Demangle( \
- itk::RGBAPixel< short >, 2, o, f, r \
- ); \
- else cpPlugins_Image_Demangle( \
- itk::RGBAPixel< unsigned char >, 2, o, f, r \
- ); \
- else cpPlugins_Image_Demangle( \
- itk::RGBAPixel< unsigned short >, 2, o, f, r \
- ); \
- else cpPlugins_Image_Array_Demangle( \
- itk::Vector, float, 2, 2, o, f, r \
- ); \
- else cpPlugins_Image_Array_Demangle( \
- itk::Vector, double, 2, 2, o, f, r \
- ); \
- else cpPlugins_Image_Array_Demangle( \
- itk::Point, float, 2, 2, o, f, r \
- ); \
- else cpPlugins_Image_Array_Demangle( \
- itk::Point, double, 2, 2, o, f, r \
- ); \
- else cpPlugins_Image_Array_Demangle( \
- itk::CovariantVector, float, 2, 2, o, f, r \
- ); \
- else cpPlugins_Image_Array_Demangle( \
- itk::CovariantVector, double, 2, 2, o, f, r \
- ); \
- else cpPlugins_Image_Array_Demangle( \
- itk::SymmetricSecondRankTensor, float, 2, 2, o, f, r \
- ); \
- else cpPlugins_Image_Array_Demangle( \
- itk::SymmetricSecondRankTensor, double, 2, 2, o, f, r \
- ); \
- else r = this->_DemangleImagePixel( 2, o ); \
- } \
- else if( dynamic_cast< itk::ImageBase< 3 >* >( o ) != NULL ) \
- { \
- cpPlugins_Image_Demangle( \
- itk::RGBPixel< char >, 3, o, f, r \
- ); \
- else cpPlugins_Image_Demangle( \
- itk::RGBPixel< short >, 3, o, f, r \
- ); \
- else cpPlugins_Image_Demangle( \
- itk::RGBPixel< unsigned char >, 3, o, f, r \
- ); \
- else cpPlugins_Image_Demangle( \
- itk::RGBPixel< unsigned short >, 3, o, f, r \
- ); \
- else cpPlugins_Image_Demangle( \
- itk::RGBAPixel< char >, 3, o, f, r \
- ); \
- else cpPlugins_Image_Demangle( \
- itk::RGBAPixel< short >, 3, o, f, r \
- ); \
- else cpPlugins_Image_Demangle( \
- itk::RGBAPixel< unsigned char >, 3, o, f, r \
- ); \
- else cpPlugins_Image_Demangle( \
- itk::RGBAPixel< unsigned short >, 3, o, f, r \
- ); \
- else cpPlugins_Image_Array_Demangle( \
- itk::Vector, float, 3, 3, o, f, r \
- ); \
- else cpPlugins_Image_Array_Demangle( \
- itk::Vector, double, 3, 3, o, f, r \
- ); \
- else cpPlugins_Image_Array_Demangle( \
- itk::Point, float, 3, 3, o, f, r \
- ); \
- else cpPlugins_Image_Array_Demangle( \
- itk::Point, double, 3, 3, o, f, r \
- ); \
- else cpPlugins_Image_Array_Demangle( \
- itk::CovariantVector, float, 3, 3, o, f, r \
- ); \
- else cpPlugins_Image_Array_Demangle( \
- itk::CovariantVector, double, 3, 3, o, f, r \
- ); \
- else cpPlugins_Image_Array_Demangle( \
- itk::SymmetricSecondRankTensor, float, 3, 3, o, f, r \
- ); \
- else cpPlugins_Image_Array_Demangle( \
- itk::SymmetricSecondRankTensor, double, 3, 3, o, f, r \
- ); \
- else cpPlugins_Image_Demangle( \
- itk::DiffusionTensor3D< float >, 3, o, f, r \
- ); \
- else cpPlugins_Image_Demangle( \
- itk::DiffusionTensor3D< double >, 3, o, f, r \
- ); \
- else r = this->_DemangleImagePixel( 3, o ); \
- } \
- else if( dynamic_cast< itk::ImageBase< 4 >* >( o ) != NULL ) \
- { \
- cpPlugins_Image_Demangle( \
- itk::RGBPixel< char >, 4, o, f, r \
- ); \
- else cpPlugins_Image_Demangle( \
- itk::RGBPixel< short >, 4, o, f, r \
- ); \
- else cpPlugins_Image_Demangle( \
- itk::RGBPixel< unsigned char >, 4, o, f, r \
- ); \
- else cpPlugins_Image_Demangle( \
- itk::RGBPixel< unsigned short >, 4, o, f, r \
- ); \
- else cpPlugins_Image_Demangle( \
- itk::RGBAPixel< char >, 4, o, f, r \
- ); \
- else cpPlugins_Image_Demangle( \
- itk::RGBAPixel< short >, 4, o, f, r \
- ); \
- else cpPlugins_Image_Demangle( \
- itk::RGBAPixel< unsigned char >, 4, o, f, r \
- ); \
- else cpPlugins_Image_Demangle( \
- itk::RGBAPixel< unsigned short >, 4, o, f, r \
- ); \
- else cpPlugins_Image_Array_Demangle( \
- itk::Vector, float, 4, 4, o, f, r \
- ); \
- else cpPlugins_Image_Array_Demangle( \
- itk::Vector, double, 4, 4, o, f, r \
- ); \
- else cpPlugins_Image_Array_Demangle( \
- itk::Point, float, 4, 4, o, f, r \
- ); \
- else cpPlugins_Image_Array_Demangle( \
- itk::Point, double, 4, 4, o, f, r \
- ); \
- else cpPlugins_Image_Array_Demangle( \
- itk::CovariantVector, float, 4, 4, o, f, r \
- ); \
- else cpPlugins_Image_Array_Demangle( \
- itk::CovariantVector, double, 4, 4, o, f, r \
- ); \
- else cpPlugins_Image_Array_Demangle( \
- itk::SymmetricSecondRankTensor, float, 4, 4, o, f, r \
- ); \
- else cpPlugins_Image_Array_Demangle( \
- itk::SymmetricSecondRankTensor, double, 4, 4, o, f, r \
- ); \
- else r = this->_DemangleImagePixel( 4, o ); \
- } \
- else \
- r = \
- std::string( #c ) + \
- std::string( ": Image dimension not supported." ); \
- return( r ); \
- } \
- std::string c::_DemangleImagePixel( \
- unsigned int d, itk::DataObject* o \
- ) \
- { \
- std::string r = ""; \
- if( d == 1 ) \
- { \
- cpPlugins_Image_Demangle( \
- char, 1, o, f, r \
- ); \
- else cpPlugins_Image_Demangle( \
- short, 1, o, f, r \
- ); \
- else cpPlugins_Image_Demangle( \
- int, 1, o, f, r \
- ); \
- else cpPlugins_Image_Demangle( \
- long, 1, o, f, r \
- ); \
- else cpPlugins_Image_Demangle( \
- unsigned char, 1, o, f, r \
- ); \
- else cpPlugins_Image_Demangle( \
- unsigned short, 1, o, f, r \
- ); \
- else cpPlugins_Image_Demangle( \
- unsigned int, 1, o, f, r \
- ); \
- else cpPlugins_Image_Demangle( \
- unsigned long, 1, o, f, r \
- ); \
- else cpPlugins_Image_Demangle( \
- float, 1, o, f, r \
- ); \
- else cpPlugins_Image_Demangle( \
- double, 1, o, f, r \
- ); \
- else cpPlugins_Image_Demangle( \
- std::complex< float >, 1, o, f, r \
- ); \
- else cpPlugins_Image_Demangle( \
- std::complex< double >, 1, o, f, r \
- ); \
- else cpPlugins_Image_Demangle( \
- itk::Offset< 1 >, 1, o, f, r \
- ); \
- else r = std::string( #c ) + std::string( ": Image type." ); \
- } \
- else if( d == 2 ) \
- { \
- cpPlugins_Image_Demangle( \
- char, 2, o, f, r \
- ); \
- else cpPlugins_Image_Demangle( \
- short, 2, o, f, r \
- ); \
- else cpPlugins_Image_Demangle( \
- int, 2, o, f, r \
- ); \
- else cpPlugins_Image_Demangle( \
- long, 2, o, f, r \
- ); \
- else cpPlugins_Image_Demangle( \
- unsigned char, 2, o, f, r \
- ); \
- else cpPlugins_Image_Demangle( \
- unsigned short, 2, o, f, r \
- ); \
- else cpPlugins_Image_Demangle( \
- unsigned int, 2, o, f, r \
- ); \
- else cpPlugins_Image_Demangle( \
- unsigned long, 2, o, f, r \
- ); \
- else cpPlugins_Image_Demangle( \
- float, 2, o, f, r \
- ); \
- else cpPlugins_Image_Demangle( \
- double, 2, o, f, r \
- ); \
- else cpPlugins_Image_Demangle( \
- std::complex< float >, 2, o, f, r \
- ); \
- else cpPlugins_Image_Demangle( \
- std::complex< double >, 2, o, f, r \
- ); \
- else cpPlugins_Image_Demangle( \
- itk::Offset< 2 >, 2, o, f, r \
- ); \
- else r = std::string( #c ) + std::string( ": Image type." ); \
- } \
- else if( d == 3 ) \
- { \
- cpPlugins_Image_Demangle( \
- char, 3, o, f, r \
- ); \
- else cpPlugins_Image_Demangle( \
- short, 3, o, f, r \
- ); \
- else cpPlugins_Image_Demangle( \
- int, 3, o, f, r \
- ); \
- else cpPlugins_Image_Demangle( \
- long, 3, o, f, r \
- ); \
- else cpPlugins_Image_Demangle( \
- unsigned char, 3, o, f, r \
- ); \
- else cpPlugins_Image_Demangle( \
- unsigned short, 3, o, f, r \
- ); \
- else cpPlugins_Image_Demangle( \
- unsigned int, 3, o, f, r \
- ); \
- else cpPlugins_Image_Demangle( \
- unsigned long, 3, o, f, r \
- ); \
- else cpPlugins_Image_Demangle( \
- float, 3, o, f, r \
- ); \
- else cpPlugins_Image_Demangle( \
- double, 3, o, f, r \
- ); \
- else cpPlugins_Image_Demangle( \
- std::complex< float >, 3, o, f, r \
- ); \
- else cpPlugins_Image_Demangle( \
- std::complex< double >, 3, o, f, r \
- ); \
- else cpPlugins_Image_Demangle( \
- itk::Offset< 3 >, 3, o, f, r \
- ); \
- else r = std::string( #c ) + std::string( ": Image type." ); \
- } \
- else if( d == 4 ) \
- { \
- cpPlugins_Image_Demangle( \
- char, 4, o, f, r \
- ); \
- else cpPlugins_Image_Demangle( \
- short, 4, o, f, r \
- ); \
- else cpPlugins_Image_Demangle( \
- int, 4, o, f, r \
- ); \
- else cpPlugins_Image_Demangle( \
- long, 4, o, f, r \
- ); \
- else cpPlugins_Image_Demangle( \
- unsigned char, 4, o, f, r \
- ); \
- else cpPlugins_Image_Demangle( \
- unsigned short, 4, o, f, r \
- ); \
- else cpPlugins_Image_Demangle( \
- unsigned int, 4, o, f, r \
- ); \
- else cpPlugins_Image_Demangle( \
- unsigned long, 4, o, f, r \
- ); \
- else cpPlugins_Image_Demangle( \
- float, 4, o, f, r \
- ); \
- else cpPlugins_Image_Demangle( \
- double, 4, o, f, r \
- ); \
- else cpPlugins_Image_Demangle( \
- std::complex< float >, 4, o, f, r \
- ); \
- else cpPlugins_Image_Demangle( \
- std::complex< double >, 4, o, f, r \
- ); \
- else cpPlugins_Image_Demangle( \
- itk::Offset< 4 >, 4, o, f, r \
- ); \
- else r = std::string( #c ) + std::string( ": Image type." ); \
- } \
- else \
- r = \
- std::string( #c ) + \
- std::string( ": Image dimension not supported." ); \
- return( r ); \
- }
// -------------------------------------------------------------------------
-#define cpPlugins_Image_Demangle_Methods_Code_Only_Scalars( c, f ) \
- std::string c::_DemangleImageDimension( itk::DataObject* o ) \
- { \
- std::string r = ""; \
- if( dynamic_cast< itk::ImageBase< 1 >* >( o ) != NULL ) \
- r = this->_DemangleImagePixel( 1, o ); \
- else if( dynamic_cast< itk::ImageBase< 2 >* >( o ) != NULL ) \
- r = this->_DemangleImagePixel( 2, o ); \
- else if( dynamic_cast< itk::ImageBase< 3 >* >( o ) != NULL ) \
- r = this->_DemangleImagePixel( 3, o ); \
- else if( dynamic_cast< itk::ImageBase< 4 >* >( o ) != NULL ) \
- r = this->_DemangleImagePixel( 4, o ); \
- else \
- r = \
- std::string( #c ) + \
- std::string( ": Image dimension not supported." ); \
- return( r ); \
- } \
- std::string c::_DemangleImagePixel( \
- unsigned int d, itk::DataObject* o \
- ) \
- { \
- std::string r = ""; \
- if( d == 1 ) \
- { \
- cpPlugins_Image_Demangle( \
- char, 1, o, f, r \
- ); \
- else cpPlugins_Image_Demangle( \
- short, 1, o, f, r \
- ); \
- else cpPlugins_Image_Demangle( \
- int, 1, o, f, r \
- ); \
- else cpPlugins_Image_Demangle( \
- long, 1, o, f, r \
- ); \
- else cpPlugins_Image_Demangle( \
- unsigned char, 1, o, f, r \
- ); \
- else cpPlugins_Image_Demangle( \
- unsigned short, 1, o, f, r \
- ); \
- else cpPlugins_Image_Demangle( \
- unsigned int, 1, o, f, r \
- ); \
- else cpPlugins_Image_Demangle( \
- unsigned long, 1, o, f, r \
- ); \
- else cpPlugins_Image_Demangle( \
- float, 1, o, f, r \
- ); \
- else cpPlugins_Image_Demangle( \
- double, 1, o, f, r \
- ); \
- else r = std::string( #c ) + std::string( ": Image type." ); \
- } \
- else if( d == 2 ) \
- { \
- cpPlugins_Image_Demangle( \
- char, 2, o, f, r \
- ); \
- else cpPlugins_Image_Demangle( \
- short, 2, o, f, r \
- ); \
- else cpPlugins_Image_Demangle( \
- int, 2, o, f, r \
- ); \
- else cpPlugins_Image_Demangle( \
- long, 2, o, f, r \
- ); \
- else cpPlugins_Image_Demangle( \
- unsigned char, 2, o, f, r \
- ); \
- else cpPlugins_Image_Demangle( \
- unsigned short, 2, o, f, r \
- ); \
- else cpPlugins_Image_Demangle( \
- unsigned int, 2, o, f, r \
- ); \
- else cpPlugins_Image_Demangle( \
- unsigned long, 2, o, f, r \
- ); \
- else cpPlugins_Image_Demangle( \
- float, 2, o, f, r \
- ); \
- else cpPlugins_Image_Demangle( \
- double, 2, o, f, r \
- ); \
- else r = std::string( #c ) + std::string( ": Image type." ); \
- } \
- else if( d == 3 ) \
- { \
- cpPlugins_Image_Demangle( \
- char, 3, o, f, r \
- ); \
- else cpPlugins_Image_Demangle( \
- short, 3, o, f, r \
- ); \
- else cpPlugins_Image_Demangle( \
- int, 3, o, f, r \
- ); \
- else cpPlugins_Image_Demangle( \
- long, 3, o, f, r \
- ); \
- else cpPlugins_Image_Demangle( \
- unsigned char, 3, o, f, r \
- ); \
- else cpPlugins_Image_Demangle( \
- unsigned short, 3, o, f, r \
- ); \
- else cpPlugins_Image_Demangle( \
- unsigned int, 3, o, f, r \
- ); \
- else cpPlugins_Image_Demangle( \
- unsigned long, 3, o, f, r \
- ); \
- else cpPlugins_Image_Demangle( \
- float, 3, o, f, r \
- ); \
- else cpPlugins_Image_Demangle( \
- double, 3, o, f, r \
- ); \
- else r = std::string( #c ) + std::string( ": Image type." ); \
- } \
- else if( d == 4 ) \
- { \
- cpPlugins_Image_Demangle( \
- char, 4, o, f, r \
- ); \
- else cpPlugins_Image_Demangle( \
- short, 4, o, f, r \
- ); \
- else cpPlugins_Image_Demangle( \
- int, 4, o, f, r \
- ); \
- else cpPlugins_Image_Demangle( \
- long, 4, o, f, r \
- ); \
- else cpPlugins_Image_Demangle( \
- unsigned char, 4, o, f, r \
- ); \
- else cpPlugins_Image_Demangle( \
- unsigned short, 4, o, f, r \
- ); \
- else cpPlugins_Image_Demangle( \
- unsigned int, 4, o, f, r \
- ); \
- else cpPlugins_Image_Demangle( \
- unsigned long, 4, o, f, r \
- ); \
- else cpPlugins_Image_Demangle( \
- float, 4, o, f, r \
- ); \
- else cpPlugins_Image_Demangle( \
- double, 4, o, f, r \
- ); \
- else r = std::string( #c ) + std::string( ": Image type." ); \
- } \
- else \
- r = \
- std::string( #c ) + \
- std::string( ": Image dimension not supported." ); \
- return( r ); \
- }
+/* TODO
+ #define cpPlugins_Image_Demangle_Methods( c ) \
+ std::string _DemangleImageDimension( itk::DataObject* o ); \
+ std::string _DemangleImagePixel( unsigned int d, itk::DataObject* o );
+
+ // -------------------------------------------------------------------------
+ #define cpPlugins_Image_Demangle_Methods_Code( c, f ) \
+ std::string c::_DemangleImageDimension( itk::DataObject* o ) \
+ { \
+ std::string r = ""; \
+ if( dynamic_cast< itk::ImageBase< 1 >* >( o ) != NULL ) \
+ { \
+ cpPlugins_Image_Array_Demangle( \
+ itk::Vector, float, 1, 1, o, f, r \
+ ); \
+ else cpPlugins_Image_Array_Demangle( \
+ itk::Vector, double, 1, 1, o, f, r \
+ ); \
+ else cpPlugins_Image_Array_Demangle( \
+ itk::Point, float, 1, 1, o, f, r \
+ ); \
+ else cpPlugins_Image_Array_Demangle( \
+ itk::Point, double, 1, 1, o, f, r \
+ ); \
+ else cpPlugins_Image_Array_Demangle( \
+ itk::CovariantVector, float, 1, 1, o, f, r \
+ ); \
+ else cpPlugins_Image_Array_Demangle( \
+ itk::CovariantVector, double, 1, 1, o, f, r \
+ ); \
+ else cpPlugins_Image_Array_Demangle( \
+ itk::SymmetricSecondRankTensor, float, 1, 1, o, f, r \
+ ); \
+ else cpPlugins_Image_Array_Demangle( \
+ itk::SymmetricSecondRankTensor, double, 1, 1, o, f, r \
+ ); \
+ else r = this->_DemangleImagePixel( 1, o ); \
+ } \
+ else if( dynamic_cast< itk::ImageBase< 2 >* >( o ) != NULL ) \
+ { \
+ cpPlugins_Image_Demangle( \
+ itk::RGBPixel< char >, 2, o, f, r \
+ ); \
+ else cpPlugins_Image_Demangle( \
+ itk::RGBPixel< short >, 2, o, f, r \
+ ); \
+ else cpPlugins_Image_Demangle( \
+ itk::RGBPixel< unsigned char >, 2, o, f, r \
+ ); \
+ else cpPlugins_Image_Demangle( \
+ itk::RGBPixel< unsigned short >, 2, o, f, r \
+ ); \
+ else cpPlugins_Image_Demangle( \
+ itk::RGBAPixel< char >, 2, o, f, r \
+ ); \
+ else cpPlugins_Image_Demangle( \
+ itk::RGBAPixel< short >, 2, o, f, r \
+ ); \
+ else cpPlugins_Image_Demangle( \
+ itk::RGBAPixel< unsigned char >, 2, o, f, r \
+ ); \
+ else cpPlugins_Image_Demangle( \
+ itk::RGBAPixel< unsigned short >, 2, o, f, r \
+ ); \
+ else cpPlugins_Image_Array_Demangle( \
+ itk::Vector, float, 2, 2, o, f, r \
+ ); \
+ else cpPlugins_Image_Array_Demangle( \
+ itk::Vector, double, 2, 2, o, f, r \
+ ); \
+ else cpPlugins_Image_Array_Demangle( \
+ itk::Point, float, 2, 2, o, f, r \
+ ); \
+ else cpPlugins_Image_Array_Demangle( \
+ itk::Point, double, 2, 2, o, f, r \
+ ); \
+ else cpPlugins_Image_Array_Demangle( \
+ itk::CovariantVector, float, 2, 2, o, f, r \
+ ); \
+ else cpPlugins_Image_Array_Demangle( \
+ itk::CovariantVector, double, 2, 2, o, f, r \
+ ); \
+ else cpPlugins_Image_Array_Demangle( \
+ itk::SymmetricSecondRankTensor, float, 2, 2, o, f, r \
+ ); \
+ else cpPlugins_Image_Array_Demangle( \
+ itk::SymmetricSecondRankTensor, double, 2, 2, o, f, r \
+ ); \
+ else r = this->_DemangleImagePixel( 2, o ); \
+ } \
+ else if( dynamic_cast< itk::ImageBase< 3 >* >( o ) != NULL ) \
+ { \
+ cpPlugins_Image_Demangle( \
+ itk::RGBPixel< char >, 3, o, f, r \
+ ); \
+ else cpPlugins_Image_Demangle( \
+ itk::RGBPixel< short >, 3, o, f, r \
+ ); \
+ else cpPlugins_Image_Demangle( \
+ itk::RGBPixel< unsigned char >, 3, o, f, r \
+ ); \
+ else cpPlugins_Image_Demangle( \
+ itk::RGBPixel< unsigned short >, 3, o, f, r \
+ ); \
+ else cpPlugins_Image_Demangle( \
+ itk::RGBAPixel< char >, 3, o, f, r \
+ ); \
+ else cpPlugins_Image_Demangle( \
+ itk::RGBAPixel< short >, 3, o, f, r \
+ ); \
+ else cpPlugins_Image_Demangle( \
+ itk::RGBAPixel< unsigned char >, 3, o, f, r \
+ ); \
+ else cpPlugins_Image_Demangle( \
+ itk::RGBAPixel< unsigned short >, 3, o, f, r \
+ ); \
+ else cpPlugins_Image_Array_Demangle( \
+ itk::Vector, float, 3, 3, o, f, r \
+ ); \
+ else cpPlugins_Image_Array_Demangle( \
+ itk::Vector, double, 3, 3, o, f, r \
+ ); \
+ else cpPlugins_Image_Array_Demangle( \
+ itk::Point, float, 3, 3, o, f, r \
+ ); \
+ else cpPlugins_Image_Array_Demangle( \
+ itk::Point, double, 3, 3, o, f, r \
+ ); \
+ else cpPlugins_Image_Array_Demangle( \
+ itk::CovariantVector, float, 3, 3, o, f, r \
+ ); \
+ else cpPlugins_Image_Array_Demangle( \
+ itk::CovariantVector, double, 3, 3, o, f, r \
+ ); \
+ else cpPlugins_Image_Array_Demangle( \
+ itk::SymmetricSecondRankTensor, float, 3, 3, o, f, r \
+ ); \
+ else cpPlugins_Image_Array_Demangle( \
+ itk::SymmetricSecondRankTensor, double, 3, 3, o, f, r \
+ ); \
+ else cpPlugins_Image_Demangle( \
+ itk::DiffusionTensor3D< float >, 3, o, f, r \
+ ); \
+ else cpPlugins_Image_Demangle( \
+ itk::DiffusionTensor3D< double >, 3, o, f, r \
+ ); \
+ else r = this->_DemangleImagePixel( 3, o ); \
+ } \
+ else if( dynamic_cast< itk::ImageBase< 4 >* >( o ) != NULL ) \
+ { \
+ cpPlugins_Image_Demangle( \
+ itk::RGBPixel< char >, 4, o, f, r \
+ ); \
+ else cpPlugins_Image_Demangle( \
+ itk::RGBPixel< short >, 4, o, f, r \
+ ); \
+ else cpPlugins_Image_Demangle( \
+ itk::RGBPixel< unsigned char >, 4, o, f, r \
+ ); \
+ else cpPlugins_Image_Demangle( \
+ itk::RGBPixel< unsigned short >, 4, o, f, r \
+ ); \
+ else cpPlugins_Image_Demangle( \
+ itk::RGBAPixel< char >, 4, o, f, r \
+ ); \
+ else cpPlugins_Image_Demangle( \
+ itk::RGBAPixel< short >, 4, o, f, r \
+ ); \
+ else cpPlugins_Image_Demangle( \
+ itk::RGBAPixel< unsigned char >, 4, o, f, r \
+ ); \
+ else cpPlugins_Image_Demangle( \
+ itk::RGBAPixel< unsigned short >, 4, o, f, r \
+ ); \
+ else cpPlugins_Image_Array_Demangle( \
+ itk::Vector, float, 4, 4, o, f, r \
+ ); \
+ else cpPlugins_Image_Array_Demangle( \
+ itk::Vector, double, 4, 4, o, f, r \
+ ); \
+ else cpPlugins_Image_Array_Demangle( \
+ itk::Point, float, 4, 4, o, f, r \
+ ); \
+ else cpPlugins_Image_Array_Demangle( \
+ itk::Point, double, 4, 4, o, f, r \
+ ); \
+ else cpPlugins_Image_Array_Demangle( \
+ itk::CovariantVector, float, 4, 4, o, f, r \
+ ); \
+ else cpPlugins_Image_Array_Demangle( \
+ itk::CovariantVector, double, 4, 4, o, f, r \
+ ); \
+ else cpPlugins_Image_Array_Demangle( \
+ itk::SymmetricSecondRankTensor, float, 4, 4, o, f, r \
+ ); \
+ else cpPlugins_Image_Array_Demangle( \
+ itk::SymmetricSecondRankTensor, double, 4, 4, o, f, r \
+ ); \
+ else r = this->_DemangleImagePixel( 4, o ); \
+ } \
+ else \
+ r = \
+ std::string( #c ) + \
+ std::string( ": Image dimension not supported." ); \
+ return( r ); \
+ } \
+ std::string c::_DemangleImagePixel( \
+ unsigned int d, itk::DataObject* o \
+ ) \
+ { \
+ std::string r = ""; \
+ if( d == 1 ) \
+ { \
+ cpPlugins_Image_Demangle( \
+ char, 1, o, f, r \
+ ); \
+ else cpPlugins_Image_Demangle( \
+ short, 1, o, f, r \
+ ); \
+ else cpPlugins_Image_Demangle( \
+ int, 1, o, f, r \
+ ); \
+ else cpPlugins_Image_Demangle( \
+ long, 1, o, f, r \
+ ); \
+ else cpPlugins_Image_Demangle( \
+ unsigned char, 1, o, f, r \
+ ); \
+ else cpPlugins_Image_Demangle( \
+ unsigned short, 1, o, f, r \
+ ); \
+ else cpPlugins_Image_Demangle( \
+ unsigned int, 1, o, f, r \
+ ); \
+ else cpPlugins_Image_Demangle( \
+ unsigned long, 1, o, f, r \
+ ); \
+ else cpPlugins_Image_Demangle( \
+ float, 1, o, f, r \
+ ); \
+ else cpPlugins_Image_Demangle( \
+ double, 1, o, f, r \
+ ); \
+ else cpPlugins_Image_Demangle( \
+ std::complex< float >, 1, o, f, r \
+ ); \
+ else cpPlugins_Image_Demangle( \
+ std::complex< double >, 1, o, f, r \
+ ); \
+ else cpPlugins_Image_Demangle( \
+ itk::Offset< 1 >, 1, o, f, r \
+ ); \
+ else r = std::string( #c ) + std::string( ": Image type." ); \
+ } \
+ else if( d == 2 ) \
+ { \
+ cpPlugins_Image_Demangle( \
+ char, 2, o, f, r \
+ ); \
+ else cpPlugins_Image_Demangle( \
+ short, 2, o, f, r \
+ ); \
+ else cpPlugins_Image_Demangle( \
+ int, 2, o, f, r \
+ ); \
+ else cpPlugins_Image_Demangle( \
+ long, 2, o, f, r \
+ ); \
+ else cpPlugins_Image_Demangle( \
+ unsigned char, 2, o, f, r \
+ ); \
+ else cpPlugins_Image_Demangle( \
+ unsigned short, 2, o, f, r \
+ ); \
+ else cpPlugins_Image_Demangle( \
+ unsigned int, 2, o, f, r \
+ ); \
+ else cpPlugins_Image_Demangle( \
+ unsigned long, 2, o, f, r \
+ ); \
+ else cpPlugins_Image_Demangle( \
+ float, 2, o, f, r \
+ ); \
+ else cpPlugins_Image_Demangle( \
+ double, 2, o, f, r \
+ ); \
+ else cpPlugins_Image_Demangle( \
+ std::complex< float >, 2, o, f, r \
+ ); \
+ else cpPlugins_Image_Demangle( \
+ std::complex< double >, 2, o, f, r \
+ ); \
+ else cpPlugins_Image_Demangle( \
+ itk::Offset< 2 >, 2, o, f, r \
+ ); \
+ else r = std::string( #c ) + std::string( ": Image type." ); \
+ } \
+ else if( d == 3 ) \
+ { \
+ cpPlugins_Image_Demangle( \
+ char, 3, o, f, r \
+ ); \
+ else cpPlugins_Image_Demangle( \
+ short, 3, o, f, r \
+ ); \
+ else cpPlugins_Image_Demangle( \
+ int, 3, o, f, r \
+ ); \
+ else cpPlugins_Image_Demangle( \
+ long, 3, o, f, r \
+ ); \
+ else cpPlugins_Image_Demangle( \
+ unsigned char, 3, o, f, r \
+ ); \
+ else cpPlugins_Image_Demangle( \
+ unsigned short, 3, o, f, r \
+ ); \
+ else cpPlugins_Image_Demangle( \
+ unsigned int, 3, o, f, r \
+ ); \
+ else cpPlugins_Image_Demangle( \
+ unsigned long, 3, o, f, r \
+ ); \
+ else cpPlugins_Image_Demangle( \
+ float, 3, o, f, r \
+ ); \
+ else cpPlugins_Image_Demangle( \
+ double, 3, o, f, r \
+ ); \
+ else cpPlugins_Image_Demangle( \
+ std::complex< float >, 3, o, f, r \
+ ); \
+ else cpPlugins_Image_Demangle( \
+ std::complex< double >, 3, o, f, r \
+ ); \
+ else cpPlugins_Image_Demangle( \
+ itk::Offset< 3 >, 3, o, f, r \
+ ); \
+ else r = std::string( #c ) + std::string( ": Image type." ); \
+ } \
+ else if( d == 4 ) \
+ { \
+ cpPlugins_Image_Demangle( \
+ char, 4, o, f, r \
+ ); \
+ else cpPlugins_Image_Demangle( \
+ short, 4, o, f, r \
+ ); \
+ else cpPlugins_Image_Demangle( \
+ int, 4, o, f, r \
+ ); \
+ else cpPlugins_Image_Demangle( \
+ long, 4, o, f, r \
+ ); \
+ else cpPlugins_Image_Demangle( \
+ unsigned char, 4, o, f, r \
+ ); \
+ else cpPlugins_Image_Demangle( \
+ unsigned short, 4, o, f, r \
+ ); \
+ else cpPlugins_Image_Demangle( \
+ unsigned int, 4, o, f, r \
+ ); \
+ else cpPlugins_Image_Demangle( \
+ unsigned long, 4, o, f, r \
+ ); \
+ else cpPlugins_Image_Demangle( \
+ float, 4, o, f, r \
+ ); \
+ else cpPlugins_Image_Demangle( \
+ double, 4, o, f, r \
+ ); \
+ else cpPlugins_Image_Demangle( \
+ std::complex< float >, 4, o, f, r \
+ ); \
+ else cpPlugins_Image_Demangle( \
+ std::complex< double >, 4, o, f, r \
+ ); \
+ else cpPlugins_Image_Demangle( \
+ itk::Offset< 4 >, 4, o, f, r \
+ ); \
+ else r = std::string( #c ) + std::string( ": Image type." ); \
+ } \
+ else \
+ r = \
+ std::string( #c ) + \
+ std::string( ": Image dimension not supported." ); \
+ return( r ); \
+ }
+
+ // -------------------------------------------------------------------------
+ #define cpPlugins_Image_Demangle_Methods_Code_Only_Scalars( c, f ) \
+ std::string c::_DemangleImageDimension( itk::DataObject* o ) \
+ { \
+ std::string r = ""; \
+ if( dynamic_cast< itk::ImageBase< 1 >* >( o ) != NULL ) \
+ r = this->_DemangleImagePixel( 1, o ); \
+ else if( dynamic_cast< itk::ImageBase< 2 >* >( o ) != NULL ) \
+ r = this->_DemangleImagePixel( 2, o ); \
+ else if( dynamic_cast< itk::ImageBase< 3 >* >( o ) != NULL ) \
+ r = this->_DemangleImagePixel( 3, o ); \
+ else if( dynamic_cast< itk::ImageBase< 4 >* >( o ) != NULL ) \
+ r = this->_DemangleImagePixel( 4, o ); \
+ else \
+ r = \
+ std::string( #c ) + \
+ std::string( ": Image dimension not supported." ); \
+ return( r ); \
+ } \
+ std::string c::_DemangleImagePixel( \
+ unsigned int d, itk::DataObject* o \
+ ) \
+ { \
+ std::string r = ""; \
+ if( d == 1 ) \
+ { \
+ cpPlugins_Image_Demangle( \
+ char, 1, o, f, r \
+ ); \
+ else cpPlugins_Image_Demangle( \
+ short, 1, o, f, r \
+ ); \
+ else cpPlugins_Image_Demangle( \
+ int, 1, o, f, r \
+ ); \
+ else cpPlugins_Image_Demangle( \
+ long, 1, o, f, r \
+ ); \
+ else cpPlugins_Image_Demangle( \
+ unsigned char, 1, o, f, r \
+ ); \
+ else cpPlugins_Image_Demangle( \
+ unsigned short, 1, o, f, r \
+ ); \
+ else cpPlugins_Image_Demangle( \
+ unsigned int, 1, o, f, r \
+ ); \
+ else cpPlugins_Image_Demangle( \
+ unsigned long, 1, o, f, r \
+ ); \
+ else cpPlugins_Image_Demangle( \
+ float, 1, o, f, r \
+ ); \
+ else cpPlugins_Image_Demangle( \
+ double, 1, o, f, r \
+ ); \
+ else r = std::string( #c ) + std::string( ": Image type." ); \
+ } \
+ else if( d == 2 ) \
+ { \
+ cpPlugins_Image_Demangle( \
+ char, 2, o, f, r \
+ ); \
+ else cpPlugins_Image_Demangle( \
+ short, 2, o, f, r \
+ ); \
+ else cpPlugins_Image_Demangle( \
+ int, 2, o, f, r \
+ ); \
+ else cpPlugins_Image_Demangle( \
+ long, 2, o, f, r \
+ ); \
+ else cpPlugins_Image_Demangle( \
+ unsigned char, 2, o, f, r \
+ ); \
+ else cpPlugins_Image_Demangle( \
+ unsigned short, 2, o, f, r \
+ ); \
+ else cpPlugins_Image_Demangle( \
+ unsigned int, 2, o, f, r \
+ ); \
+ else cpPlugins_Image_Demangle( \
+ unsigned long, 2, o, f, r \
+ ); \
+ else cpPlugins_Image_Demangle( \
+ float, 2, o, f, r \
+ ); \
+ else cpPlugins_Image_Demangle( \
+ double, 2, o, f, r \
+ ); \
+ else r = std::string( #c ) + std::string( ": Image type." ); \
+ } \
+ else if( d == 3 ) \
+ { \
+ cpPlugins_Image_Demangle( \
+ char, 3, o, f, r \
+ ); \
+ else cpPlugins_Image_Demangle( \
+ short, 3, o, f, r \
+ ); \
+ else cpPlugins_Image_Demangle( \
+ int, 3, o, f, r \
+ ); \
+ else cpPlugins_Image_Demangle( \
+ long, 3, o, f, r \
+ ); \
+ else cpPlugins_Image_Demangle( \
+ unsigned char, 3, o, f, r \
+ ); \
+ else cpPlugins_Image_Demangle( \
+ unsigned short, 3, o, f, r \
+ ); \
+ else cpPlugins_Image_Demangle( \
+ unsigned int, 3, o, f, r \
+ ); \
+ else cpPlugins_Image_Demangle( \
+ unsigned long, 3, o, f, r \
+ ); \
+ else cpPlugins_Image_Demangle( \
+ float, 3, o, f, r \
+ ); \
+ else cpPlugins_Image_Demangle( \
+ double, 3, o, f, r \
+ ); \
+ else r = std::string( #c ) + std::string( ": Image type." ); \
+ } \
+ else if( d == 4 ) \
+ { \
+ cpPlugins_Image_Demangle( \
+ char, 4, o, f, r \
+ ); \
+ else cpPlugins_Image_Demangle( \
+ short, 4, o, f, r \
+ ); \
+ else cpPlugins_Image_Demangle( \
+ int, 4, o, f, r \
+ ); \
+ else cpPlugins_Image_Demangle( \
+ long, 4, o, f, r \
+ ); \
+ else cpPlugins_Image_Demangle( \
+ unsigned char, 4, o, f, r \
+ ); \
+ else cpPlugins_Image_Demangle( \
+ unsigned short, 4, o, f, r \
+ ); \
+ else cpPlugins_Image_Demangle( \
+ unsigned int, 4, o, f, r \
+ ); \
+ else cpPlugins_Image_Demangle( \
+ unsigned long, 4, o, f, r \
+ ); \
+ else cpPlugins_Image_Demangle( \
+ float, 4, o, f, r \
+ ); \
+ else cpPlugins_Image_Demangle( \
+ double, 4, o, f, r \
+ ); \
+ else r = std::string( #c ) + std::string( ": Image type." ); \
+ } \
+ else \
+ r = \
+ std::string( #c ) + \
+ std::string( ": Image dimension not supported." ); \
+ return( r ); \
+ }
+*/
#endif // __CPPLUGINS__INTERFACE__PROCESSOBJECT__H__
--- /dev/null
+#ifndef __CPPLUGINS__INTERFACE__PROCESSOBJECT__HXX__
+#define __CPPLUGINS__INTERFACE__PROCESSOBJECT__HXX__
+
+// -------------------------------------------------------------------------
+template< class O >
+void cpPlugins::Interface::ProcessObject::
+_MakeOutput( unsigned int idx )
+{
+ if( idx >= this->m_Outputs.size( ) )
+ return;
+ this->m_Outputs[ idx ] = O::New( );
+ this->m_Outputs[ idx ]->SetSource( this );
+}
+
+#endif // __CPPLUGINS__INTERFACE__PROCESSOBJECT__HXX__
+
+// eof - $RCSfile$
+++ /dev/null
-#include <cpPlugins/Interface/SinkObject.h>
-
-// -------------------------------------------------------------------------
-cpPlugins::Interface::SinkObject::
-SinkObject( )
- : Superclass( )
-{
- this->m_ClassName = "cpPlugins::Interface::SinkObject";
- this->m_ClassCategory = "BasicObject";
- this->SetNumberOfOutputs( 0 );
-}
-
-// -------------------------------------------------------------------------
-cpPlugins::Interface::SinkObject::
-~SinkObject( )
-{
-}
-
-// eof - $RCSfile$
+++ /dev/null
-#ifndef __CPPLUGINS__INTERFACE__SINKOBJECT__H__
-#define __CPPLUGINS__INTERFACE__SINKOBJECT__H__
-
-#include <cpPlugins/cpPlugins_Export.h>
-#include <cpPlugins/Interface/ProcessObject.h>
-
-namespace cpPlugins
-{
- namespace Interface
- {
- /**
- */
- class cpPlugins_EXPORT SinkObject
- : public ProcessObject
- {
- public:
- typedef SinkObject Self;
- typedef ProcessObject Superclass;
- typedef itk::SmartPointer< Self > Pointer;
- typedef itk::SmartPointer< const Self > ConstPointer;
-
- public:
- itkTypeMacro( SinkObject, ProcessObject );
-
- protected:
- SinkObject( );
- virtual ~SinkObject( );
-
- private:
- // Purposely not implemented
- SinkObject( const Self& );
- Self& operator=( const Self& );
- };
-
- } // ecapseman
-
-} // ecapseman
-
-#endif // __CPPLUGINS__INTERFACE__SINKOBJECT__H__
-
-// eof - $RCSfile$
+++ /dev/null
-#include <cpPlugins/Interface/SourceObject.h>
-
-// -------------------------------------------------------------------------
-cpPlugins::Interface::SourceObject::
-SourceObject( )
- : Superclass( )
-{
- this->m_ClassName = "cpPlugins::Interface::SourceObject";
- this->m_ClassCategory = "BasicObject";
- this->SetNumberOfInputs( 0 );
-}
-
-// -------------------------------------------------------------------------
-cpPlugins::Interface::SourceObject::
-~SourceObject( )
-{
-}
-
-// eof - $RCSfile$
+++ /dev/null
-#ifndef __CPPLUGINS__INTERFACE__SOURCEOBJECT__H__
-#define __CPPLUGINS__INTERFACE__SOURCEOBJECT__H__
-
-#include <cpPlugins/cpPlugins_Export.h>
-#include <cpPlugins/Interface/ProcessObject.h>
-
-namespace cpPlugins
-{
- namespace Interface
- {
- /**
- */
- class cpPlugins_EXPORT SourceObject
- : public ProcessObject
- {
- public:
- typedef SourceObject Self;
- typedef ProcessObject Superclass;
- typedef itk::SmartPointer< Self > Pointer;
- typedef itk::SmartPointer< const Self > ConstPointer;
-
- public:
- itkTypeMacro( SourceObject, ProcessObject );
-
- protected:
- SourceObject( );
- virtual ~SourceObject( );
-
- private:
- // Purposely not implemented
- SourceObject( const Self& );
- Self& operator=( const Self& );
- };
-
- } // ecapseman
-
-} // ecapseman
-
-#endif // __CPPLUGINS__INTERFACE__SOURCEOBJECT__H__
-
-// eof - $RCSfile$