]> Creatis software - cpPlugins.git/blobdiff - lib/cpPlugins/Interface/Image.h
...
[cpPlugins.git] / lib / cpPlugins / Interface / Image.h
index 1da443bfa457df5350392f859d0b9884d502005e..729acdf682aaaa382d4e50db41ab40dadda85666 100644 (file)
@@ -1,27 +1,13 @@
 #ifndef __CPPLUGINS__INTERFACE__IMAGE__H__
 #define __CPPLUGINS__INTERFACE__IMAGE__H__
 
-#include <cpPlugins/Interface/cpPlugins_Interface_Export.h>
 #include <cpPlugins/Interface/DataObject.h>
 
-#define ITK_MANUAL_INSTANTIATION
 #include <itkProcessObject.h>
 
-class vtkImageData;
+// Some forward declarations
+class vtkObject;
 
-// -------------------------------------------------------------------------
-/* 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
 {
   namespace Interface
@@ -40,40 +26,20 @@ namespace cpPlugins
     public:
       itkNewMacro( Self );
       itkTypeMacro( Image, DataObject );
+      cpPlugins_Id_Macro( Image, DataObject );
 
     public:
-      /*
-        virtual void SetITKDataObject( itk::DataObject* o );
-        virtual void SetVTKDataObject( vtkDataObject* o );
-      */
-
       template< class I >
-        inline void SetITKImage( itk::DataObject* object );
+        inline void SetITK( itk::Object* 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;
+      virtual void SetVTK( vtkObject* image );
 
     protected:
       Image( );
       virtual ~Image( );
 
       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 );
-      */
+        inline void _ITK_2_VTK( itk::Object* object );
 
     private:
       // Purposely not implemented