]> Creatis software - cpPlugins.git/commitdiff
...
authorLeonardo Florez-Valencia <florez-l@javeriana.edu.co>
Mon, 21 Sep 2015 13:05:00 +0000 (15:05 +0200)
committerLeonardo Florez-Valencia <florez-l@javeriana.edu.co>
Mon, 21 Sep 2015 13:05:00 +0000 (15:05 +0200)
21 files changed:
lib/cpPlugins/Interface/BaseProcessObjects.h
lib/cpPlugins/Interface/DataObject.cxx
lib/cpPlugins/Interface/DataObject.h
lib/cpPlugins/Interface/Image.h
lib/cpPlugins/Interface/Image.hxx
lib/cpPlugins/Interface/Instances_itkImage.cxx [new file with mode: 0644]
lib/cpPlugins/Interface/Instances_itkMesh.cxx [new file with mode: 0644]
lib/cpPlugins/Interface/Macros.h [new file with mode: 0644]
lib/cpPlugins/Interface/Mesh.cxx
lib/cpPlugins/Interface/Mesh.h
lib/cpPlugins/Interface/Mesh.hxx
lib/cpPlugins/Interface/Object.h
lib/cpPlugins/Interface/ProcessObject.h
lib/cpPlugins/Interface/ProcessObject.hxx
lib/cpPlugins/Plugins/CMakeLists.txt
lib/cpPlugins/Plugins/Host.cxx
lib/cpPlugins/Plugins/ImageReader.cxx
lib/cpPlugins/Plugins/ImageReader.h
lib/cpPlugins/Plugins/Instances_itkImage.cxx [deleted file]
lib/cpPlugins/Plugins/Instances_itkMesh.cxx [deleted file]
lib/cpPlugins/Plugins/MeshReader.cxx

index 688a9555f6847b065277ff72d84a0e77d4c73832..229a0c34b9a98b8920ec830fd6a656d3f899f431 100644 (file)
@@ -139,10 +139,18 @@ namespace cpPlugins
     cpPlugins_Interface_Define_ProcessObject( MeshSource, SourceObject );
     cpPlugins_Interface_Define_ProcessObject( ImageSink, SinkObject );
     cpPlugins_Interface_Define_ProcessObject( MeshSink, SinkObject );
-    cpPlugins_Interface_Define_ProcessObject( ImageToImageFilter, FilterObject );
-    cpPlugins_Interface_Define_ProcessObject( ImageToMeshFilter, FilterObject );
-    cpPlugins_Interface_Define_ProcessObject( MeshToImageFilter, FilterObject );
-    cpPlugins_Interface_Define_ProcessObject( MeshToMeshFilter, FilterObject );
+    cpPlugins_Interface_Define_ProcessObject(
+      ImageToImageFilter, FilterObject
+      );
+    cpPlugins_Interface_Define_ProcessObject(
+      ImageToMeshFilter, FilterObject
+      );
+    cpPlugins_Interface_Define_ProcessObject(
+      MeshToImageFilter, FilterObject
+      );
+    cpPlugins_Interface_Define_ProcessObject(
+      MeshToMeshFilter, FilterObject
+      );
 
   } // ecapseman
 
index da2cdf0747a4fbac100c38ff6513246183aa1165..09df979f3b0da19aceae48562c54c305a3ce435d 100644 (file)
@@ -2,36 +2,6 @@
 #include <vtkImageData.h>
 #include <vtkPolyData.h>
 
-// -------------------------------------------------------------------------
-/* 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( ) );
-   }
-
-   // -------------------------------------------------------------------------
-   vtkDataObject* cpPlugins::Interface::DataObject::
-   GetVTKDataObject( )
-   {
-   return( this->m_VTKObject.GetPointer( ) );
-   }
-
-   // -------------------------------------------------------------------------
-   const vtkDataObject* cpPlugins::Interface::DataObject::
-   GetVTKDataObject( ) const
-   {
-   return( this->m_VTKObject.GetPointer( ) );
-   }
-*/
-
 // -------------------------------------------------------------------------
 cpPlugins::Interface::Object* cpPlugins::Interface::DataObject::
 GetSource( )
index be40af5b2989d4c5978760fab68308c172c11d58..c08b3a345475f28fc4521c3876fee70233ff513a 100644 (file)
@@ -8,7 +8,6 @@
 #include <cpPlugins/Interface/cpPlugins_Interface_Export.h>
 #include <cpPlugins/Interface/Object.h>
 
-#define ITK_MANUAL_INSTANTIATION
 #include <itkDataObject.h>
 
 namespace cpPlugins
@@ -30,14 +29,6 @@ namespace cpPlugins
       itkTypeMacro( DataObject, Object );
 
     public:
-      /* TODO
-         virtual itk::DataObject* GetITKDataObject( );
-         virtual const itk::DataObject* GetITKDataObject( ) const;
-
-         virtual vtkDataObject* GetVTKDataObject( );
-         virtual const vtkDataObject* GetVTKDataObject( ) const;
-      */
-
       Object* GetSource( );
       const Object* GetSource( ) const;
       void SetSource( Object* src );
index 1da443bfa457df5350392f859d0b9884d502005e..a5beda39b58b59c7e3424a435f1cdbb9c1cafb7a 100644 (file)
@@ -4,23 +4,10 @@
 #include <cpPlugins/Interface/cpPlugins_Interface_Export.h>
 #include <cpPlugins/Interface/DataObject.h>
 
-#define ITK_MANUAL_INSTANTIATION
 #include <itkProcessObject.h>
 
 class vtkImageData;
 
-// -------------------------------------------------------------------------
-/* 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 )
-*/
-
 // -------------------------------------------------------------------------
 namespace cpPlugins
 {
@@ -42,11 +29,6 @@ namespace cpPlugins
       itkTypeMacro( Image, DataObject );
 
     public:
-      /*
-        virtual void SetITKDataObject( itk::DataObject* o );
-        virtual void SetVTKDataObject( vtkDataObject* o );
-      */
-
       template< class I >
         inline void SetITKImage( itk::DataObject* object );
 
@@ -67,14 +49,6 @@ namespace cpPlugins
       template< class P, unsigned int D >
         inline void _ITK_2_VTK( itk::DataObject* object );
 
-      /* TODO
-         template< unsigned int D >
-         bool _Dim( itk::DataObject* o );
-
-         template< class I >
-         bool _Type( itk::DataObject* o );
-      */
-
     private:
       // Purposely not implemented
       Image( const Self& );
index bb1c667bf30af84bc91df05d8e38723728d12ffd..640e01c3cf05a8a5a22b69a21c9c077bebc54f56 100644 (file)
@@ -1,7 +1,8 @@
 #ifndef __CPPLUGINS__INTERFACE__IMAGE__HXX__
 #define __CPPLUGINS__INTERFACE__IMAGE__HXX__
 
-#define ITK_MANUAL_INSTANTIATION
+#include <cpPlugins/Interface/Macros.h>
+
 #include <itkImage.h>
 #include <itkImageToVTKImageFilter.h>
 
     TI, itk::SymmetricSecondRankTensor, double, D, D, o                 \
     )
 
+// -------------------------------------------------------------------------
+#define cpPlugins_Image_Import( T, D )                                  \
+  cpPlugins_TEMPLATE_IMPORT(                                            \
+    2(class cpPlugins_Interface_EXPORT itk::Image< T, D >)              \
+    )
+
+// -------------------------------------------------------------------------
+#define cpPlugins_VTKImage_Import( T, D )                               \
+  cpPlugins_TEMPLATE_IMPORT(                                            \
+    2(                                                                  \
+      class cpPlugins_Interface_EXPORT                                  \
+      itk::ImageToVTKImageFilter< itk::Image< T, D > >                  \
+      )                                                                 \
+    )
+
+// -------------------------------------------------------------------------
+#define cpPlugins_ImageArray_Import( A, T, DA, DI )                     \
+  cpPlugins_TEMPLATE_IMPORT(                                            \
+    3(                                                                  \
+      class cpPlugins_Interface_EXPORT                                  \
+      itk::Image< itk::A< T, DA >, DI >                                 \
+      )                                                                 \
+    )
+
+// -------------------------------------------------------------------------
+#define cpPlugins_VTKImageArray_Import( A, T, DA, DI )                  \
+  cpPlugins_TEMPLATE_IMPORT(                                            \
+    3(                                                                  \
+      class cpPlugins_Interface_EXPORT                                  \
+      itk::ImageToVTKImageFilter< itk::Image< itk::A< T, DA >, DI > >   \
+      )                                                                 \
+    )
+
+// -------------------------------------------------------------------------
+#define cpPlugins_Image_Import_AllDimensions( T )       \
+  cpPlugins_Image_Import( T, 2 );                       \
+  cpPlugins_Image_Import( T, 3 );                       \
+  cpPlugins_Image_Import( T, 4 )
+
+// -------------------------------------------------------------------------
+#define cpPlugins_VTKImage_Import_AllDimensions( T )       \
+  cpPlugins_VTKImage_Import( T, 2 );                       \
+  cpPlugins_VTKImage_Import( T, 3 )
+
+// -------------------------------------------------------------------------
+#define cpPlugins_ImageArray_Import_AllDimensions( A, T )             \
+  cpPlugins_ImageArray_Import( A, T, 2, 2 );                          \
+  cpPlugins_ImageArray_Import( A, T, 3, 3 );                          \
+  cpPlugins_ImageArray_Import( A, T, 4, 4 )
+
+// -------------------------------------------------------------------------
+#define cpPlugins_VTKImageArray_Import_AllDimensions( A, T )            \
+  cpPlugins_VTKImageArray_Import( A, T, 2, 2 );                         \
+  cpPlugins_VTKImageArray_Import( A, T, 3, 3 )
+
+// -------------------------------------------------------------------------
+// ITK base clases
+cpPlugins_Image_Import_AllDimensions( char );
+cpPlugins_Image_Import_AllDimensions( short );
+cpPlugins_Image_Import_AllDimensions( int );
+cpPlugins_Image_Import_AllDimensions( long );
+cpPlugins_Image_Import_AllDimensions( unsigned char );
+cpPlugins_Image_Import_AllDimensions( unsigned short );
+cpPlugins_Image_Import_AllDimensions( unsigned int );
+cpPlugins_Image_Import_AllDimensions( unsigned long );
+cpPlugins_Image_Import_AllDimensions( float );
+cpPlugins_Image_Import_AllDimensions( double );
+
+cpPlugins_Image_Import_AllDimensions( std::complex< float > );
+cpPlugins_Image_Import_AllDimensions( std::complex< double > );
+
+cpPlugins_Image_Import_AllDimensions( itk::RGBPixel< char > );
+cpPlugins_Image_Import_AllDimensions( itk::RGBPixel< short > );
+cpPlugins_Image_Import_AllDimensions( itk::RGBPixel< int > );
+cpPlugins_Image_Import_AllDimensions( itk::RGBPixel< long > );
+cpPlugins_Image_Import_AllDimensions( itk::RGBPixel< unsigned char > );
+cpPlugins_Image_Import_AllDimensions( itk::RGBPixel< unsigned short > );
+cpPlugins_Image_Import_AllDimensions( itk::RGBPixel< unsigned int > );
+cpPlugins_Image_Import_AllDimensions( itk::RGBPixel< unsigned long > );
+
+cpPlugins_Image_Import_AllDimensions( itk::RGBAPixel< char > );
+cpPlugins_Image_Import_AllDimensions( itk::RGBAPixel< short > );
+cpPlugins_Image_Import_AllDimensions( itk::RGBAPixel< int > );
+cpPlugins_Image_Import_AllDimensions( itk::RGBAPixel< long > );
+cpPlugins_Image_Import_AllDimensions( itk::RGBAPixel< unsigned char > );
+cpPlugins_Image_Import_AllDimensions( itk::RGBAPixel< unsigned short > );
+cpPlugins_Image_Import_AllDimensions( itk::RGBAPixel< unsigned int > );
+cpPlugins_Image_Import_AllDimensions( itk::RGBAPixel< unsigned long > );
+
+cpPlugins_ImageArray_Import_AllDimensions( Vector, float );
+cpPlugins_ImageArray_Import_AllDimensions( Vector, double );
+
+cpPlugins_ImageArray_Import_AllDimensions( CovariantVector, float );
+cpPlugins_ImageArray_Import_AllDimensions( CovariantVector, double );
+
+cpPlugins_ImageArray_Import_AllDimensions( Point, float );
+cpPlugins_ImageArray_Import_AllDimensions( Point, double );
+
+cpPlugins_ImageArray_Import_AllDimensions(
+  SymmetricSecondRankTensor, float
+  );
+cpPlugins_ImageArray_Import_AllDimensions(
+  SymmetricSecondRankTensor, double
+  );
+
+cpPlugins_Image_Import( itk::DiffusionTensor3D< float >, 3 );
+cpPlugins_Image_Import( itk::DiffusionTensor3D< double >, 3 );
+cpPlugins_Image_Import( itk::Offset< 2 >, 2 );
+cpPlugins_Image_Import( itk::Offset< 3 >, 3 );
+cpPlugins_Image_Import( itk::Offset< 4 >, 4 );
+
+// -------------------------------------------------------------------------
+// ITK<->VTK base clases
+cpPlugins_VTKImage_Import_AllDimensions( char );
+cpPlugins_VTKImage_Import_AllDimensions( short );
+cpPlugins_VTKImage_Import_AllDimensions( int );
+cpPlugins_VTKImage_Import_AllDimensions( long );
+cpPlugins_VTKImage_Import_AllDimensions( unsigned char );
+cpPlugins_VTKImage_Import_AllDimensions( unsigned short );
+cpPlugins_VTKImage_Import_AllDimensions( unsigned int );
+cpPlugins_VTKImage_Import_AllDimensions( unsigned long );
+cpPlugins_VTKImage_Import_AllDimensions( float );
+cpPlugins_VTKImage_Import_AllDimensions( double );
+
+cpPlugins_VTKImage_Import_AllDimensions( itk::RGBPixel< char > );
+cpPlugins_VTKImage_Import_AllDimensions( itk::RGBPixel< short > );
+cpPlugins_VTKImage_Import_AllDimensions( itk::RGBPixel< int > );
+cpPlugins_VTKImage_Import_AllDimensions( itk::RGBPixel< long > );
+cpPlugins_VTKImage_Import_AllDimensions( itk::RGBPixel< unsigned char > );
+cpPlugins_VTKImage_Import_AllDimensions( itk::RGBPixel< unsigned short > );
+cpPlugins_VTKImage_Import_AllDimensions( itk::RGBPixel< unsigned int > );
+cpPlugins_VTKImage_Import_AllDimensions( itk::RGBPixel< unsigned long > );
+
+cpPlugins_VTKImage_Import_AllDimensions( itk::RGBAPixel< char > );
+cpPlugins_VTKImage_Import_AllDimensions( itk::RGBAPixel< short > );
+cpPlugins_VTKImage_Import_AllDimensions( itk::RGBAPixel< int > );
+cpPlugins_VTKImage_Import_AllDimensions( itk::RGBAPixel< long > );
+cpPlugins_VTKImage_Import_AllDimensions( itk::RGBAPixel< unsigned char > );
+cpPlugins_VTKImage_Import_AllDimensions( itk::RGBAPixel< unsigned short > );
+cpPlugins_VTKImage_Import_AllDimensions( itk::RGBAPixel< unsigned int > );
+cpPlugins_VTKImage_Import_AllDimensions( itk::RGBAPixel< unsigned long > );
+
+cpPlugins_VTKImageArray_Import_AllDimensions( Vector, float );
+cpPlugins_VTKImageArray_Import_AllDimensions( Vector, double );
+
+cpPlugins_VTKImageArray_Import_AllDimensions( CovariantVector, float );
+cpPlugins_VTKImageArray_Import_AllDimensions( CovariantVector, double );
+
+cpPlugins_VTKImageArray_Import_AllDimensions( Point, float );
+cpPlugins_VTKImageArray_Import_AllDimensions( Point, double );
+
+cpPlugins_VTKImageArray_Import_AllDimensions(
+  SymmetricSecondRankTensor, float
+  );
+cpPlugins_VTKImageArray_Import_AllDimensions(
+  SymmetricSecondRankTensor, double
+  );
+
+cpPlugins_VTKImage_Import( itk::DiffusionTensor3D< float >, 3 );
+cpPlugins_VTKImage_Import( itk::DiffusionTensor3D< double >, 3 );
+
 // -------------------------------------------------------------------------
 template< class I >
 void cpPlugins::Interface::Image::
diff --git a/lib/cpPlugins/Interface/Instances_itkImage.cxx b/lib/cpPlugins/Interface/Instances_itkImage.cxx
new file mode 100644 (file)
index 0000000..a040f44
--- /dev/null
@@ -0,0 +1,177 @@
+#include <cpPlugins/Interface/Macros.h>
+
+#include <complex>
+
+#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>
+
+// -------------------------------------------------------------------------
+#define cpPlugins_Image_Export( T, D )                                  \
+  cpPlugins_TEMPLATE_EXPORT(                                            \
+    2(class cpPlugins_Interface_EXPORT itk::Image< T, D >)              \
+    )
+
+// -------------------------------------------------------------------------
+#define cpPlugins_VTKImage_Export( T, D )                               \
+  cpPlugins_TEMPLATE_EXPORT(                                            \
+    2(                                                                  \
+      class cpPlugins_Interface_EXPORT                                  \
+      itk::ImageToVTKImageFilter< itk::Image< T, D > >                  \
+      )                                                                 \
+    )
+
+// -------------------------------------------------------------------------
+#define cpPlugins_ImageArray_Export( A, T, DA, DI )                     \
+  cpPlugins_TEMPLATE_EXPORT(                                            \
+    3(                                                                  \
+      class cpPlugins_Interface_EXPORT                                  \
+      itk::Image< itk::A< T, DA >, DI >                                 \
+      )                                                                 \
+    )
+
+// -------------------------------------------------------------------------
+#define cpPlugins_VTKImageArray_Export( A, T, DA, DI )                  \
+  cpPlugins_TEMPLATE_EXPORT(                                            \
+    3(                                                                  \
+      class cpPlugins_Interface_EXPORT                                  \
+      itk::ImageToVTKImageFilter< itk::Image< itk::A< T, DA >, DI > >   \
+      )                                                                 \
+    )
+
+// -------------------------------------------------------------------------
+#define cpPlugins_Image_Export_AllDimensions( T )       \
+  cpPlugins_Image_Export( T, 2 );                       \
+  cpPlugins_Image_Export( T, 3 );                       \
+  cpPlugins_Image_Export( T, 4 )
+
+// -------------------------------------------------------------------------
+#define cpPlugins_VTKImage_Export_AllDimensions( T )       \
+  cpPlugins_VTKImage_Export( T, 2 );                       \
+  cpPlugins_VTKImage_Export( T, 3 )
+
+// -------------------------------------------------------------------------
+#define cpPlugins_ImageArray_Export_AllDimensions( A, T )             \
+  cpPlugins_ImageArray_Export( A, T, 2, 2 );                          \
+  cpPlugins_ImageArray_Export( A, T, 3, 3 );                          \
+  cpPlugins_ImageArray_Export( A, T, 4, 4 )
+
+// -------------------------------------------------------------------------
+#define cpPlugins_VTKImageArray_Export_AllDimensions( A, T )            \
+  cpPlugins_VTKImageArray_Export( A, T, 2, 2 );                         \
+  cpPlugins_VTKImageArray_Export( A, T, 3, 3 )
+
+// -------------------------------------------------------------------------
+// ITK base clases
+cpPlugins_Image_Export_AllDimensions( char );
+cpPlugins_Image_Export_AllDimensions( short );
+cpPlugins_Image_Export_AllDimensions( int );
+cpPlugins_Image_Export_AllDimensions( long );
+cpPlugins_Image_Export_AllDimensions( unsigned char );
+cpPlugins_Image_Export_AllDimensions( unsigned short );
+cpPlugins_Image_Export_AllDimensions( unsigned int );
+cpPlugins_Image_Export_AllDimensions( unsigned long );
+cpPlugins_Image_Export_AllDimensions( float );
+cpPlugins_Image_Export_AllDimensions( double );
+
+cpPlugins_Image_Export_AllDimensions( std::complex< float > );
+cpPlugins_Image_Export_AllDimensions( std::complex< double > );
+
+cpPlugins_Image_Export_AllDimensions( itk::RGBPixel< char > );
+cpPlugins_Image_Export_AllDimensions( itk::RGBPixel< short > );
+cpPlugins_Image_Export_AllDimensions( itk::RGBPixel< int > );
+cpPlugins_Image_Export_AllDimensions( itk::RGBPixel< long > );
+cpPlugins_Image_Export_AllDimensions( itk::RGBPixel< unsigned char > );
+cpPlugins_Image_Export_AllDimensions( itk::RGBPixel< unsigned short > );
+cpPlugins_Image_Export_AllDimensions( itk::RGBPixel< unsigned int > );
+cpPlugins_Image_Export_AllDimensions( itk::RGBPixel< unsigned long > );
+
+cpPlugins_Image_Export_AllDimensions( itk::RGBAPixel< char > );
+cpPlugins_Image_Export_AllDimensions( itk::RGBAPixel< short > );
+cpPlugins_Image_Export_AllDimensions( itk::RGBAPixel< int > );
+cpPlugins_Image_Export_AllDimensions( itk::RGBAPixel< long > );
+cpPlugins_Image_Export_AllDimensions( itk::RGBAPixel< unsigned char > );
+cpPlugins_Image_Export_AllDimensions( itk::RGBAPixel< unsigned short > );
+cpPlugins_Image_Export_AllDimensions( itk::RGBAPixel< unsigned int > );
+cpPlugins_Image_Export_AllDimensions( itk::RGBAPixel< unsigned long > );
+
+cpPlugins_ImageArray_Export_AllDimensions( Vector, float );
+cpPlugins_ImageArray_Export_AllDimensions( Vector, double );
+
+cpPlugins_ImageArray_Export_AllDimensions( CovariantVector, float );
+cpPlugins_ImageArray_Export_AllDimensions( CovariantVector, double );
+
+cpPlugins_ImageArray_Export_AllDimensions( Point, float );
+cpPlugins_ImageArray_Export_AllDimensions( Point, double );
+
+cpPlugins_ImageArray_Export_AllDimensions(
+  SymmetricSecondRankTensor, float
+  );
+cpPlugins_ImageArray_Export_AllDimensions(
+  SymmetricSecondRankTensor, double
+  );
+
+cpPlugins_Image_Export( itk::DiffusionTensor3D< float >, 3 );
+cpPlugins_Image_Export( itk::DiffusionTensor3D< double >, 3 );
+cpPlugins_Image_Export( itk::Offset< 2 >, 2 );
+cpPlugins_Image_Export( itk::Offset< 3 >, 3 );
+cpPlugins_Image_Export( itk::Offset< 4 >, 4 );
+
+// -------------------------------------------------------------------------
+// ITK<->VTK base clases
+cpPlugins_VTKImage_Export_AllDimensions( char );
+cpPlugins_VTKImage_Export_AllDimensions( short );
+cpPlugins_VTKImage_Export_AllDimensions( int );
+cpPlugins_VTKImage_Export_AllDimensions( long );
+cpPlugins_VTKImage_Export_AllDimensions( unsigned char );
+cpPlugins_VTKImage_Export_AllDimensions( unsigned short );
+cpPlugins_VTKImage_Export_AllDimensions( unsigned int );
+cpPlugins_VTKImage_Export_AllDimensions( unsigned long );
+cpPlugins_VTKImage_Export_AllDimensions( float );
+cpPlugins_VTKImage_Export_AllDimensions( double );
+
+cpPlugins_VTKImage_Export_AllDimensions( itk::RGBPixel< char > );
+cpPlugins_VTKImage_Export_AllDimensions( itk::RGBPixel< short > );
+cpPlugins_VTKImage_Export_AllDimensions( itk::RGBPixel< int > );
+cpPlugins_VTKImage_Export_AllDimensions( itk::RGBPixel< long > );
+cpPlugins_VTKImage_Export_AllDimensions( itk::RGBPixel< unsigned char > );
+cpPlugins_VTKImage_Export_AllDimensions( itk::RGBPixel< unsigned short > );
+cpPlugins_VTKImage_Export_AllDimensions( itk::RGBPixel< unsigned int > );
+cpPlugins_VTKImage_Export_AllDimensions( itk::RGBPixel< unsigned long > );
+
+cpPlugins_VTKImage_Export_AllDimensions( itk::RGBAPixel< char > );
+cpPlugins_VTKImage_Export_AllDimensions( itk::RGBAPixel< short > );
+cpPlugins_VTKImage_Export_AllDimensions( itk::RGBAPixel< int > );
+cpPlugins_VTKImage_Export_AllDimensions( itk::RGBAPixel< long > );
+cpPlugins_VTKImage_Export_AllDimensions( itk::RGBAPixel< unsigned char > );
+cpPlugins_VTKImage_Export_AllDimensions( itk::RGBAPixel< unsigned short > );
+cpPlugins_VTKImage_Export_AllDimensions( itk::RGBAPixel< unsigned int > );
+cpPlugins_VTKImage_Export_AllDimensions( itk::RGBAPixel< unsigned long > );
+
+cpPlugins_VTKImageArray_Export_AllDimensions( Vector, float );
+cpPlugins_VTKImageArray_Export_AllDimensions( Vector, double );
+
+cpPlugins_VTKImageArray_Export_AllDimensions( CovariantVector, float );
+cpPlugins_VTKImageArray_Export_AllDimensions( CovariantVector, double );
+
+cpPlugins_VTKImageArray_Export_AllDimensions( Point, float );
+cpPlugins_VTKImageArray_Export_AllDimensions( Point, double );
+
+cpPlugins_VTKImageArray_Export_AllDimensions(
+  SymmetricSecondRankTensor, float
+  );
+cpPlugins_VTKImageArray_Export_AllDimensions(
+  SymmetricSecondRankTensor, double
+  );
+
+cpPlugins_VTKImage_Export( itk::DiffusionTensor3D< float >, 3 );
+cpPlugins_VTKImage_Export( itk::DiffusionTensor3D< double >, 3 );
+
+// eof - $RCSfile$
diff --git a/lib/cpPlugins/Interface/Instances_itkMesh.cxx b/lib/cpPlugins/Interface/Instances_itkMesh.cxx
new file mode 100644 (file)
index 0000000..a7d3df4
--- /dev/null
@@ -0,0 +1,22 @@
+#include <cpPlugins/Interface/Macros.h>
+
+#include <itkMesh.h>
+#include <itkQuadEdgeMesh.h>
+
+// -------------------------------------------------------------------------
+#define cpPlugins_Mesh_Export( N, T, D )                                \
+  cpPlugins_TEMPLATE_EXPORT(                                            \
+    2(class cpPlugins_Interface_EXPORT itk::N< T, D >)                  \
+    )
+
+// -------------------------------------------------------------------------
+cpPlugins_Mesh_Export( Mesh, float, 2 );
+cpPlugins_Mesh_Export( Mesh, double, 2 );
+cpPlugins_Mesh_Export( Mesh, float, 3 );
+cpPlugins_Mesh_Export( Mesh, double, 3 );
+cpPlugins_Mesh_Export( QuadEdgeMesh, float, 2 );
+cpPlugins_Mesh_Export( QuadEdgeMesh, double, 2 );
+cpPlugins_Mesh_Export( QuadEdgeMesh, float, 3 );
+cpPlugins_Mesh_Export( QuadEdgeMesh, double, 3 );
+
+// eof - $RCSfile$
diff --git a/lib/cpPlugins/Interface/Macros.h b/lib/cpPlugins/Interface/Macros.h
new file mode 100644 (file)
index 0000000..0a6bd60
--- /dev/null
@@ -0,0 +1,44 @@
+#ifndef __CPPLUGINS__INTERFACE__MACROS__H__
+#define __CPPLUGINS__INTERFACE__MACROS__H__
+
+#include <cpPlugins/Interface/cpPlugins_Interface_Export.h>
+
+/**
+ * Based upon: http://www.itk.org/Wiki/Proposals:Explicit_Instantiation
+ */
+
+// -------------------------------------------------------------------------
+#define cpPlugins_TEMPLATE_1( X1 )              \
+  X1
+#define cpPlugins_TEMPLATE_2( X1, X2 )          \
+  X1,X2
+#define cpPlugins_TEMPLATE_3( X1, X2, X3 )      \
+  X1,X2,X3
+#define cpPlugins_TEMPLATE_4( X1, X2, X3, X4 )  \
+  X1,X2,X3,X4
+#define cpPlugins_TEMPLATE_5( X1, X2, X3, X4, X5 )      \
+  X1,X2,X3,X4,X5
+#define cpPlugins_TEMPLATE_6( X1, X2, X3, X4, X5, X6 )  \
+  X1,X2,X3,X4,X5,X6
+#define cpPlugins_TEMPLATE_7( X1, X2, X3, X4, X5, X6, X7 )      \
+  X1,X2,X3,X4,X5,X6,X7
+#define cpPlugins_TEMPLATE_8( X1, X2, X3, X4, X5, X6, X7, X8 )  \
+  X1,X2,X3,X4,X5,X6,X7,X8
+#define cpPlugins_TEMPLATE_9( X1, X2, X3, X4, X5, X6, X7, X8, X9 )      \
+  X1,X2,X3,X4,X5,X6,X7,X8,X9
+  
+#define cpPlugins_TEMPLATE_EXPORT( X )          \
+  template cpPlugins_TEMPLATE_##X;
+#define cpPlugins_TEMPLATE_IMPORT( X )          \
+  extern template cpPlugins_TEMPLATE_##X;
+
+/* TODO
+   #define cpPlugins_EXPORT_TEMPLATE( E, c, T )                 \
+   cpPlugins_TEMPLATE_##c( cpPlugins_TEMPLATE_EXPORT, E, T )
+   #define cpPlugins_IMPORT_TEMPLATE( E, c, T )                 \
+   cpPlugins_TEMPLATE_##c( cpPlugins_TEMPLATE_IMPORT, E, T )
+*/
+
+#endif // __CPPLUGINS__INTERFACE__MACROS__H__
+
+// eof - $RCSfile$
index 55114dd5ee26966471f3b4d52972e93d9737babd..0f7468199ef2770928b68ae8b202ec34a03a9002 100644 (file)
@@ -26,46 +26,6 @@ GetVTKMesh( ) const
     );
 }
 
-/*
-void cpPlugins::Interface::Mesh::
-SetITKDataObject( itk::DataObject* o )
-{
-  // TODO: conversion!!!
-  std::cout << "Mesh: SetITKDataObject " << std::endl;
-  std::exit( 1 );
-}
-
-// -------------------------------------------------------------------------
-void cpPlugins::Interface::Mesh::
-SetVTKDataObject( vtkDataObject* o )
-{
-  if( dynamic_cast< vtkPolyData* >( o ) != NULL )
-  {
-    this->m_VTKObject = o;
-
-    // TODO: conversion!!!
-  }
-  else
-    this->m_VTKObject = NULL;
-}
-
-// -------------------------------------------------------------------------
-vtkPolyData* cpPlugins::Interface::Mesh::
-GetVTKPolyData( )
-{
-  return( dynamic_cast< vtkPolyData* >( this->m_VTKObject.GetPointer( ) ) );
-}
-
-// -------------------------------------------------------------------------
-const vtkPolyData* cpPlugins::Interface::Mesh::
-GetVTKPolyData( ) const
-{
-  return(
-    dynamic_cast< const vtkPolyData* >( this->m_VTKObject.GetPointer( ) )
-    );
-}
-*/
-
 // -------------------------------------------------------------------------
 cpPlugins::Interface::Mesh::
 Mesh( )
@@ -81,34 +41,4 @@ cpPlugins::Interface::Mesh::
 {
 }
 
-// -------------------------------------------------------------------------
-/* TODO
-template< unsigned int D >
-void cpPlugins::Interface::Mesh::
-_ITK_2_VTK_0( itk::DataObject* o )
-{
-}
-
-// -------------------------------------------------------------------------
-template< class P, unsigned int D >
-void cpPlugins::Interface::Mesh::
-_ITK_2_VTK_1( itk::DataObject* o )
-{
-}
-
-// -------------------------------------------------------------------------
-template< unsigned int D >
-void cpPlugins::Interface::Mesh::
-_VTK_2_ITK_0( itk::DataObject* o )
-{
-}
-
-// -------------------------------------------------------------------------
-template< class P, unsigned int D >
-void cpPlugins::Interface::Mesh::
-_VTK_2_ITK_1( itk::DataObject* o )
-{
-}
-*/
-
 // eof - $RCSfile$
index 11a52e8dae2a71bc04254c52e7bbc86403d3ec61..c934f33b09f3322909252b48d05ef98927b8bfc5 100644 (file)
@@ -39,32 +39,10 @@ namespace cpPlugins
       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( );
 
-      /* 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< 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 );
-      */
-
     private:
       // Purposely not implemented
       Mesh( const Self& );
index 980321dd76521581cc510cb5199e5f353853fb67..9163971ad774f73f8810b3bd8bdbdcc505b4549a 100644 (file)
@@ -1,6 +1,27 @@
 #ifndef __CPPLUGINS__INTERFACE__MESH__HXX__
 #define __CPPLUGINS__INTERFACE__MESH__HXX__
 
+#include <cpPlugins/Interface/Macros.h>
+
+#include <itkMesh.h>
+#include <itkQuadEdgeMesh.h>
+
+// -------------------------------------------------------------------------
+#define cpPlugins_Mesh_Import( N, T, D )                                \
+  cpPlugins_TEMPLATE_IMPORT(                                            \
+    2(class cpPlugins_Interface_EXPORT itk::N< T, D >)                  \
+    )
+
+// -------------------------------------------------------------------------
+cpPlugins_Mesh_Import( Mesh, float, 2 );
+cpPlugins_Mesh_Import( Mesh, double, 2 );
+cpPlugins_Mesh_Import( Mesh, float, 3 );
+cpPlugins_Mesh_Import( Mesh, double, 3 );
+cpPlugins_Mesh_Import( QuadEdgeMesh, float, 2 );
+cpPlugins_Mesh_Import( QuadEdgeMesh, double, 2 );
+cpPlugins_Mesh_Import( QuadEdgeMesh, float, 3 );
+cpPlugins_Mesh_Import( QuadEdgeMesh, double, 3 );
+
 // -------------------------------------------------------------------------
 template< class M >
 void cpPlugins::Interface::Mesh::
index bcb7e60f6423881dc242234108c92bdc5a2e0e65..6e273f174264f5fe3ea7f822c5254a76102557e8 100644 (file)
@@ -5,7 +5,6 @@
 #include <Pluma/Pluma.hpp>
 #include <cpPlugins/Interface/cpPlugins_Interface_Export.h>
 
-#define ITK_MANUAL_INSTANTIATION
 #include <itkObject.h>
 #include <itkObjectFactory.h>
 
index ee5beddc025258d57c24e77c4faedf0de802ce60..d25516d73c9d692f1204da9935e178159d7d18ac 100644 (file)
@@ -6,7 +6,6 @@
 #include <cpPlugins/Interface/DataObject.h>
 #include <cpPlugins/Interface/Parameters.h>
 
-#define ITK_MANUAL_INSTANTIATION
 #include <itkProcessObject.h>
 
 namespace cpPlugins
index 7b4e080c5245aec6ab6aafc80c9d6ee43e4ab807..a4a417bde2fbe6f289fdf62e55491c4a1df0642e 100644 (file)
@@ -29,7 +29,9 @@ const T* cpPlugins::Interface::ProcessObject::
 _Input( unsigned int idx ) const
 {
   if( idx < this->m_Inputs.size( ) )
-    return( dynamic_cast< const T* >( this->m_Inputs[ idx ].GetPointer( ) ) );
+    return(
+      dynamic_cast< const T* >( this->m_Inputs[ idx ].GetPointer( ) )
+      );
   else
     return( NULL );
 }
@@ -51,7 +53,9 @@ const T* cpPlugins::Interface::ProcessObject::
 _Output( unsigned int idx ) const
 {
   if( idx < this->m_Outputs.size( ) )
-    return( dynamic_cast< const T* >( this->m_Outputs[ idx ].GetPointer( ) ) );
+    return(
+      dynamic_cast< const T* >( this->m_Outputs[ idx ].GetPointer( ) )
+      );
   else
     return( NULL );
 }
index 21a1217f97ca74765d3608734b4d0858211c99e8..4bac628213b7186ea2400fa9f1b125c387db2506 100644 (file)
@@ -15,23 +15,21 @@ SET(LIBRARY_NAME cpPlugins)
 SET(
   LIB_HEADERS_H
   ImageReader.h
-  ImageWriter.h
-  MeshReader.h
-  MeshWriter.h
-  MarchingCubes.h
-  OtsuThresholdImageFilter.h
+  #ImageWriter.h
+  #MeshReader.h
+  #MeshWriter.h
+  #MarchingCubes.h
+  #OtsuThresholdImageFilter.h
   )
 SET(
   LIB_SOURCES_CXX
-  Instances_itkImage.cxx
-  Instances_itkMesh.cxx
   Host.cxx
   ImageReader.cxx
-  ImageWriter.cxx
-  MeshReader.cxx
-  MeshWriter.cxx
-  MarchingCubes.cxx
-  OtsuThresholdImageFilter.cxx
+  #ImageWriter.cxx
+  #MeshReader.cxx
+  #MeshWriter.cxx
+  #MarchingCubes.cxx
+  #OtsuThresholdImageFilter.cxx
   )
 
 ## =====================
@@ -55,8 +53,8 @@ GENERATE_EXPORT_HEADER(
 TARGET_LINK_LIBRARIES(
   ${LIBRARY_NAME}
   cpPlugins_Interface
-  ${ITK_LIBRARIES}
-  ${VTK_LIBRARIES}
+  #${ITK_LIBRARIES}
+  #${VTK_LIBRARIES}
   )
 
 ## ========================
index fdf703da8bfea4df93f1b2ab82830ad61d41cbf2..c74bd45216e474d56f702fecbeab728246ef7fb9 100644 (file)
@@ -1,11 +1,12 @@
 #include <Pluma/Connector.hpp>
 #include <cpPlugins/Plugins/ImageReader.h>
+/*
 #include <cpPlugins/Plugins/ImageWriter.h>
 #include <cpPlugins/Plugins/MeshReader.h>
 #include <cpPlugins/Plugins/MeshWriter.h>
 #include <cpPlugins/Plugins/MarchingCubes.h>
 #include <cpPlugins/Plugins/OtsuThresholdImageFilter.h>
-
+*/
 /*
   #include <cpPlugins/Plugins/ImageSeriesReader.h>
   #include <cpPlugins/Plugins/MeshReader.h>
@@ -20,11 +21,13 @@ bool connect( pluma::Host& host )
   using namespace cpPlugins::Plugins;
 
   host.add( new ImageReaderProvider( ) );
+  /*
   host.add( new ImageWriterProvider( ) );
   host.add( new MeshReaderProvider( ) );
   host.add( new MeshWriterProvider( ) );
   host.add( new MarchingCubesProvider( ) );
   host.add( new OtsuThresholdImageFilterProvider( ) );
+  */
 
   /*
     host.add( new ImageSeriesReaderProvider( ) );
index d4ca0ba1471f500df0036b130cdb87b93e6e032e..25bdc7ae43280419528a881e3e252ccc0b75b13c 100644 (file)
@@ -1,21 +1,8 @@
 #include <cpPlugins/Plugins/ImageReader.h>
 #include <cpPlugins/Interface/Image.h>
 
-#include <complex>
 #include <set>
 
-#define ITK_MANUAL_INSTANTIATION
-#include <itkImage.h>
-
-#include <itkCovariantVector.h>
-#include <itkDiffusionTensor3D.h>
-#include <itkPoint.h>
-#include <itkRGBPixel.h>
-#include <itkRGBAPixel.h>
-#include <itkSymmetricSecondRankTensor.h>
-#include <itkVector.h>
-
-#undef ITK_MANUAL_INSTANTIATION
 #include <itkImageFileReader.h>
 #include <itkImageSeriesReader.h>
 
index 47fff4102b959aedeb80f4d9e1573521923c95e0..1bcf6aec5fff1c8c327894c3dd450dbd818444ae 100644 (file)
@@ -6,8 +6,10 @@
 #include <cpPlugins/Plugins/cpPlugins_Export.h>
 #include <cpPlugins/Interface/BaseProcessObjects.h>
 
-#define ITK_MANUAL_INSTANTIATION
-#include <itkImageIOBase.h>
+namespace itk
+{
+  class ImageIOBase;
+}
 
 namespace cpPlugins
 {
@@ -15,7 +17,7 @@ namespace cpPlugins
   {
     /**
      */
-    class /*cpPlugins_EXPORT*/ ImageReader
+    class cpPlugins_EXPORT ImageReader
       : public cpPlugins::Interface::ImageSource
     {
     public:
diff --git a/lib/cpPlugins/Plugins/Instances_itkImage.cxx b/lib/cpPlugins/Plugins/Instances_itkImage.cxx
deleted file mode 100644 (file)
index ef29677..0000000
+++ /dev/null
@@ -1,283 +0,0 @@
-#include <cpPlugins/Plugins/cpPlugins_Export.h>
-
-#include <complex>
-
-#undef ITK_MANUAL_INSTANTIATION
-#include <itkImage.h>
-#include <itkImportImageContainer.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>
-
-// -------------------------------------------------------------------------
-#define cpPlugins_I_itk( p, d )                         \
-  template class cpPlugins_EXPORT itk::Image< p, d >;
-
-// -------------------------------------------------------------------------
-#define cpPlugins_I_itk_array( a, p, da, di )                   \
-  template class cpPlugins_EXPORT itk::Image< a< p, da >, di >;
-
-// -------------------------------------------------------------------------
-#define cpPlugins_I_itk_Container( p )                                  \
-  template class cpPlugins_EXPORT                                       \
-  itk::ImportImageContainer< itk::SizeValueType, p >;
-
-// -------------------------------------------------------------------------
-#define cpPlugins_I_itk_array_Container( a, p, d )              \
-  template class cpPlugins_EXPORT                               \
-  itk::ImportImageContainer< itk::SizeValueType, a< p, d > >;
-
-// -------------------------------------------------------------------------
-#define cpPlugins_I_itk_vtk( p, d )                                     \
-  template class cpPlugins_EXPORT                                       \
-  itk::ImageToVTKImageFilter< itk::Image< p, d > >;
-
-// -------------------------------------------------------------------------
-#define cpPlugins_I_itk_vtk_array( a, p, da, di )                       \
-  template class cpPlugins_EXPORT                                       \
-  itk::ImageToVTKImageFilter< itk::Image< a< p, da > , di > >;
-
-// -------------------------------------------------------------------------
-// Possible itk types
-
-namespace itk
-{
-  /* TODO
-     template cpPlugins_EXPORT std::ostream& operator<<(
-     std::ostream& os, const ImageRegion< 1 >& obj
-     );
-     template class cpPlugins_EXPORT Point< double, 1 >;
-     template class cpPlugins_EXPORT Vector< double, 1 >;
-  */
-
-} // ecapseman
-
-cpPlugins_I_itk_Container( char );
-cpPlugins_I_itk_Container( short );
-cpPlugins_I_itk_Container( int );
-cpPlugins_I_itk_Container( long );
-cpPlugins_I_itk_Container( unsigned char );
-cpPlugins_I_itk_Container( unsigned short );
-cpPlugins_I_itk_Container( unsigned int );
-cpPlugins_I_itk_Container( unsigned long );
-cpPlugins_I_itk_Container( float );
-cpPlugins_I_itk_Container( double );
-cpPlugins_I_itk_Container( std::complex< float > );
-cpPlugins_I_itk_Container( std::complex< double > );
-cpPlugins_I_itk_Container( itk::RGBPixel< char > );
-cpPlugins_I_itk_Container( itk::RGBPixel< short > );
-cpPlugins_I_itk_Container( itk::RGBPixel< unsigned char > );
-cpPlugins_I_itk_Container( itk::RGBPixel< unsigned short > );
-cpPlugins_I_itk_Container( itk::RGBAPixel< char > );
-cpPlugins_I_itk_Container( itk::RGBAPixel< short > );
-cpPlugins_I_itk_Container( itk::RGBAPixel< unsigned char > );
-cpPlugins_I_itk_Container( itk::RGBAPixel< unsigned short > );
-cpPlugins_I_itk_Container( itk::Offset< 2 > );
-cpPlugins_I_itk_Container( itk::Offset< 3 > );
-cpPlugins_I_itk_Container( itk::Offset< 4 > );
-cpPlugins_I_itk_array_Container( itk::Vector, float, 2 );
-cpPlugins_I_itk_array_Container( itk::Vector, double, 2 );
-cpPlugins_I_itk_array_Container( itk::Vector, float, 3 );
-cpPlugins_I_itk_array_Container( itk::Vector, double, 3 );
-cpPlugins_I_itk_array_Container( itk::Vector, float, 4 );
-cpPlugins_I_itk_array_Container( itk::Vector, double, 4 );
-cpPlugins_I_itk_array_Container( itk::Point, float, 2 );
-cpPlugins_I_itk_array_Container( itk::Point, double, 2 );
-cpPlugins_I_itk_array_Container( itk::Point, float, 3 );
-cpPlugins_I_itk_array_Container( itk::Point, double, 3 );
-cpPlugins_I_itk_array_Container( itk::Point, float, 4 );
-cpPlugins_I_itk_array_Container( itk::Point, double, 4 );
-cpPlugins_I_itk_array_Container( itk::CovariantVector, float, 2 );
-cpPlugins_I_itk_array_Container( itk::CovariantVector, double, 2 );
-cpPlugins_I_itk_array_Container( itk::CovariantVector, float, 3 );
-cpPlugins_I_itk_array_Container( itk::CovariantVector, double, 3 );
-cpPlugins_I_itk_array_Container( itk::CovariantVector, float, 4 );
-cpPlugins_I_itk_array_Container( itk::CovariantVector, double, 4 );
-cpPlugins_I_itk_array_Container( itk::SymmetricSecondRankTensor, float, 2 );
-cpPlugins_I_itk_array_Container( itk::SymmetricSecondRankTensor, double, 2 );
-cpPlugins_I_itk_array_Container( itk::SymmetricSecondRankTensor, float, 3 );
-cpPlugins_I_itk_array_Container( itk::SymmetricSecondRankTensor, double, 3 );
-cpPlugins_I_itk_array_Container( itk::SymmetricSecondRankTensor, float, 4 );
-cpPlugins_I_itk_array_Container( itk::SymmetricSecondRankTensor, double, 4 );
-cpPlugins_I_itk_Container( itk::DiffusionTensor3D< float > );
-cpPlugins_I_itk_Container( itk::DiffusionTensor3D< double > );
-
-cpPlugins_I_itk( char, 2 );
-cpPlugins_I_itk( short, 2 );
-cpPlugins_I_itk( int, 2 );
-cpPlugins_I_itk( long, 2 );
-cpPlugins_I_itk( unsigned char, 2 );
-cpPlugins_I_itk( unsigned short, 2 );
-cpPlugins_I_itk( unsigned int, 2 );
-cpPlugins_I_itk( unsigned long, 2 );
-cpPlugins_I_itk( float, 2 );
-cpPlugins_I_itk( double, 2 );
-
-cpPlugins_I_itk( char, 3 );
-cpPlugins_I_itk( short, 3 );
-cpPlugins_I_itk( int, 3 );
-cpPlugins_I_itk( long, 3 );
-cpPlugins_I_itk( unsigned char, 3 );
-cpPlugins_I_itk( unsigned short, 3 );
-cpPlugins_I_itk( unsigned int, 3 );
-cpPlugins_I_itk( unsigned long, 3 );
-cpPlugins_I_itk( float, 3 );
-cpPlugins_I_itk( double, 3 );
-
-cpPlugins_I_itk( char, 4 );
-cpPlugins_I_itk( short, 4 );
-cpPlugins_I_itk( int, 4 );
-cpPlugins_I_itk( long, 4 );
-cpPlugins_I_itk( unsigned char, 4 );
-cpPlugins_I_itk( unsigned short, 4 );
-cpPlugins_I_itk( unsigned int, 4 );
-cpPlugins_I_itk( unsigned long, 4 );
-cpPlugins_I_itk( float, 4 );
-cpPlugins_I_itk( double, 4 );
-
-cpPlugins_I_itk( std::complex< float >, 2 );
-cpPlugins_I_itk( std::complex< double >, 2 );
-cpPlugins_I_itk( std::complex< float >, 3 );
-cpPlugins_I_itk( std::complex< double >, 3 );
-cpPlugins_I_itk( std::complex< float >, 4 );
-cpPlugins_I_itk( std::complex< double >, 4 );
-
-cpPlugins_I_itk( itk::RGBPixel< char >, 2 );
-cpPlugins_I_itk( itk::RGBPixel< short >, 2 );
-cpPlugins_I_itk( itk::RGBPixel< unsigned char >, 2 );
-cpPlugins_I_itk( itk::RGBPixel< unsigned short >, 2 );
-cpPlugins_I_itk( itk::RGBPixel< char >, 3 );
-cpPlugins_I_itk( itk::RGBPixel< short >, 3 );
-cpPlugins_I_itk( itk::RGBPixel< unsigned char >, 3 );
-cpPlugins_I_itk( itk::RGBPixel< unsigned short >, 3 );
-cpPlugins_I_itk( itk::RGBPixel< char >, 4 );
-cpPlugins_I_itk( itk::RGBPixel< short >, 4 );
-cpPlugins_I_itk( itk::RGBPixel< unsigned char >, 4 );
-cpPlugins_I_itk( itk::RGBPixel< unsigned short >, 4 );
-
-cpPlugins_I_itk( itk::RGBAPixel< char >, 2 );
-cpPlugins_I_itk( itk::RGBAPixel< short >, 2 );
-cpPlugins_I_itk( itk::RGBAPixel< unsigned char >, 2 );
-cpPlugins_I_itk( itk::RGBAPixel< unsigned short >, 2 );
-cpPlugins_I_itk( itk::RGBAPixel< char >, 3 );
-cpPlugins_I_itk( itk::RGBAPixel< short >, 3 );
-cpPlugins_I_itk( itk::RGBAPixel< unsigned char >, 3 );
-cpPlugins_I_itk( itk::RGBAPixel< unsigned short >, 3 );
-cpPlugins_I_itk( itk::RGBAPixel< char >, 4 );
-cpPlugins_I_itk( itk::RGBAPixel< short >, 4 );
-cpPlugins_I_itk( itk::RGBAPixel< unsigned char >, 4 );
-cpPlugins_I_itk( itk::RGBAPixel< unsigned short >, 4 );
-
-cpPlugins_I_itk( itk::Offset< 2 >, 2 );
-cpPlugins_I_itk( itk::Offset< 3 >, 3 );
-cpPlugins_I_itk( itk::Offset< 4 >, 4 );
-
-cpPlugins_I_itk_array( itk::Vector, float, 2, 2 );
-cpPlugins_I_itk_array( itk::Vector, double, 2, 2 );
-cpPlugins_I_itk_array( itk::Vector, float, 3, 3 );
-cpPlugins_I_itk_array( itk::Vector, double, 3, 3 );
-cpPlugins_I_itk_array( itk::Vector, float, 4, 4 );
-cpPlugins_I_itk_array( itk::Vector, double, 4, 4 );
-
-cpPlugins_I_itk_array( itk::Point, float, 2, 2 );
-cpPlugins_I_itk_array( itk::Point, double, 2, 2 );
-cpPlugins_I_itk_array( itk::Point, float, 3, 3 );
-cpPlugins_I_itk_array( itk::Point, double, 3, 3 );
-cpPlugins_I_itk_array( itk::Point, float, 4, 4 );
-cpPlugins_I_itk_array( itk::Point, double, 4, 4 );
-
-cpPlugins_I_itk_array( itk::CovariantVector, float, 2, 2 );
-cpPlugins_I_itk_array( itk::CovariantVector, double, 2, 2 );
-cpPlugins_I_itk_array( itk::CovariantVector, float, 3, 3 );
-cpPlugins_I_itk_array( itk::CovariantVector, double, 3, 3 );
-cpPlugins_I_itk_array( itk::CovariantVector, float, 4, 4 );
-cpPlugins_I_itk_array( itk::CovariantVector, double, 4, 4 );
-
-cpPlugins_I_itk_array( itk::SymmetricSecondRankTensor, float, 2, 2 );
-cpPlugins_I_itk_array( itk::SymmetricSecondRankTensor, double, 2, 2 );
-cpPlugins_I_itk_array( itk::SymmetricSecondRankTensor, float, 3, 3 );
-cpPlugins_I_itk_array( itk::SymmetricSecondRankTensor, double, 3, 3 );
-cpPlugins_I_itk_array( itk::SymmetricSecondRankTensor, float, 4, 4 );
-cpPlugins_I_itk_array( itk::SymmetricSecondRankTensor, double, 4, 4 );
-
-cpPlugins_I_itk( itk::DiffusionTensor3D< float >, 3 );
-cpPlugins_I_itk( itk::DiffusionTensor3D< double >, 3 );
-
-/* TODO
- * itk::FixedArray
- * itk::Matrix
- */
-
-// -------------------------------------------------------------------------
-// Possible itk types that could be connected to vtk
-
-cpPlugins_I_itk_vtk( char, 2 );
-cpPlugins_I_itk_vtk( short, 2 );
-cpPlugins_I_itk_vtk( int, 2 );
-cpPlugins_I_itk_vtk( long, 2 );
-cpPlugins_I_itk_vtk( unsigned char, 2 );
-cpPlugins_I_itk_vtk( unsigned short, 2 );
-cpPlugins_I_itk_vtk( unsigned int, 2 );
-cpPlugins_I_itk_vtk( unsigned long, 2 );
-cpPlugins_I_itk_vtk( float, 2 );
-cpPlugins_I_itk_vtk( double, 2 );
-
-cpPlugins_I_itk_vtk( char, 3 );
-cpPlugins_I_itk_vtk( short, 3 );
-cpPlugins_I_itk_vtk( int, 3 );
-cpPlugins_I_itk_vtk( long, 3 );
-cpPlugins_I_itk_vtk( unsigned char, 3 );
-cpPlugins_I_itk_vtk( unsigned short, 3 );
-cpPlugins_I_itk_vtk( unsigned int, 3 );
-cpPlugins_I_itk_vtk( unsigned long, 3 );
-cpPlugins_I_itk_vtk( float, 3 );
-cpPlugins_I_itk_vtk( double, 3 );
-
-cpPlugins_I_itk_vtk( itk::RGBPixel< char >, 2 );
-cpPlugins_I_itk_vtk( itk::RGBPixel< short >, 2 );
-cpPlugins_I_itk_vtk( itk::RGBPixel< unsigned char >, 2 );
-cpPlugins_I_itk_vtk( itk::RGBPixel< unsigned short >, 2 );
-cpPlugins_I_itk_vtk( itk::RGBPixel< char >, 3 );
-cpPlugins_I_itk_vtk( itk::RGBPixel< short >, 3 );
-cpPlugins_I_itk_vtk( itk::RGBPixel< unsigned char >, 3 );
-cpPlugins_I_itk_vtk( itk::RGBPixel< unsigned short >, 3 );
-
-cpPlugins_I_itk_vtk( itk::RGBAPixel< char >, 2 );
-cpPlugins_I_itk_vtk( itk::RGBAPixel< short >, 2 );
-cpPlugins_I_itk_vtk( itk::RGBAPixel< unsigned char >, 2 );
-cpPlugins_I_itk_vtk( itk::RGBAPixel< unsigned short >, 2 );
-cpPlugins_I_itk_vtk( itk::RGBAPixel< char >, 3 );
-cpPlugins_I_itk_vtk( itk::RGBAPixel< short >, 3 );
-cpPlugins_I_itk_vtk( itk::RGBAPixel< unsigned char >, 3 );
-cpPlugins_I_itk_vtk( itk::RGBAPixel< unsigned short >, 3 );
-
-cpPlugins_I_itk_vtk_array( itk::Vector, float, 2, 2 );
-cpPlugins_I_itk_vtk_array( itk::Vector, double, 2, 2 );
-cpPlugins_I_itk_vtk_array( itk::Vector, float, 3, 3 );
-cpPlugins_I_itk_vtk_array( itk::Vector, double, 3, 3 );
-
-cpPlugins_I_itk_vtk_array( itk::Point, float, 2, 2 );
-cpPlugins_I_itk_vtk_array( itk::Point, double, 2, 2 );
-cpPlugins_I_itk_vtk_array( itk::Point, float, 3, 3 );
-cpPlugins_I_itk_vtk_array( itk::Point, double, 3, 3 );
-
-cpPlugins_I_itk_vtk_array( itk::CovariantVector, float, 2, 2 );
-cpPlugins_I_itk_vtk_array( itk::CovariantVector, double, 2, 2 );
-cpPlugins_I_itk_vtk_array( itk::CovariantVector, float, 3, 3 );
-cpPlugins_I_itk_vtk_array( itk::CovariantVector, double, 3, 3 );
-
-cpPlugins_I_itk_vtk_array( itk::SymmetricSecondRankTensor, float, 2, 2 );
-cpPlugins_I_itk_vtk_array( itk::SymmetricSecondRankTensor, double, 2, 2 );
-cpPlugins_I_itk_vtk_array( itk::SymmetricSecondRankTensor, float, 3, 3 );
-cpPlugins_I_itk_vtk_array( itk::SymmetricSecondRankTensor, double, 3, 3 );
-
-cpPlugins_I_itk_vtk( itk::DiffusionTensor3D< float >, 3 );
-cpPlugins_I_itk_vtk( itk::DiffusionTensor3D< double >, 3 );
-
-// eof - $RCSfile$
diff --git a/lib/cpPlugins/Plugins/Instances_itkMesh.cxx b/lib/cpPlugins/Plugins/Instances_itkMesh.cxx
deleted file mode 100644 (file)
index 7a462f3..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-#include <cpPlugins/Plugins/cpPlugins_Export.h>
-
-#undef ITK_MANUAL_INSTANTIATION
-#include <itkMesh.h>
-#include <itkQuadEdgeMesh.h>
-
-template class cpPlugins_EXPORT itk::Mesh< float, 2 >;
-template class cpPlugins_EXPORT itk::Mesh< float, 3 >;
-template class cpPlugins_EXPORT itk::Mesh< double, 2 >;
-template class cpPlugins_EXPORT itk::Mesh< double, 3 >;
-template class cpPlugins_EXPORT itk::QuadEdgeMesh< float, 2 >;
-template class cpPlugins_EXPORT itk::QuadEdgeMesh< float, 3 >;
-template class cpPlugins_EXPORT itk::QuadEdgeMesh< double, 2 >;
-template class cpPlugins_EXPORT itk::QuadEdgeMesh< double, 3 >;
-
-// eof - $RCSfile$
index e658d8611b0fa69d998a85fd2c83fb79dca11210..0528e6cd4b15d35507e630751f5d0350a77be0c3 100644 (file)
@@ -7,7 +7,8 @@
 // -------------------------------------------------------------------------
 cpPlugins::Plugins::MeshReader::
 MeshReader( )
-  : Superclass( )
+  : Superclass( ),
+    m_Reader( NULL )
 {
   this->m_ClassName = "cpPlugins::MeshReader";
   this->m_ClassCategory = "MeshReader";
@@ -28,6 +29,8 @@ MeshReader( )
 cpPlugins::Plugins::MeshReader::
 ~MeshReader( )
 {
+  if( this->m_Reader != NULL )
+    this->m_Reader = NULL;
 }
 
 // -------------------------------------------------------------------------