]> Creatis software - cpPlugins.git/blobdiff - lib/cpPlugins/Interface/Image.h
...
[cpPlugins.git] / lib / cpPlugins / Interface / Image.h
index 4ba14cbf558fc80964f610acf9b2b0df393f47ec..a5beda39b58b59c7e3424a435f1cdbb9c1cafb7a 100644 (file)
@@ -1,14 +1,14 @@
 #ifndef __CPPLUGINS__INTERFACE__IMAGE__H__
 #define __CPPLUGINS__INTERFACE__IMAGE__H__
 
-#include <map>
-#include <string>
-#include <itkProcessObject.h>
 #include <cpPlugins/Interface/cpPlugins_Interface_Export.h>
 #include <cpPlugins/Interface/DataObject.h>
 
+#include <itkProcessObject.h>
+
 class vtkImageData;
 
+// -------------------------------------------------------------------------
 namespace cpPlugins
 {
   namespace Interface
@@ -29,21 +29,25 @@ namespace cpPlugins
       itkTypeMacro( Image, DataObject );
 
     public:
-      virtual std::string GetClassName( ) const;
-      virtual void SetRealDataObject( itk::DataObject* dobj );
+      template< class I >
+        inline void SetITKImage( itk::DataObject* object );
+
+      template< class I >
+        inline I* GetITKImage( );
 
-      vtkImageData* GetVTKImageData( ) const;
-      void UpdateVTKImageData( );
+      template< class I >
+        inline const I* GetITKImage( ) const;
+
+      virtual void SetVTKImageData( vtkImageData* image );
+      virtual vtkImageData* GetVTKImageData( );
+      virtual const vtkImageData* GetVTKImageData( ) const;
 
     protected:
       Image( );
       virtual ~Image( );
 
-      template< unsigned int D >
-        void _VTK_0( );
-
       template< class P, unsigned int D >
-        void _VTK_1( );
+        inline void _ITK_2_VTK( itk::DataObject* object );
 
     private:
       // Purposely not implemented
@@ -51,14 +55,15 @@ namespace cpPlugins
       Self& operator=( const Self& );
 
     protected:
-      itk::ProcessObject::Pointer m_Image2VTKImageData;
-      vtkImageData* m_VTKImageData;
+      itk::ProcessObject::Pointer m_ITKvVTKConnection;
     };
 
   } // ecapseman
 
 } // ecapseman
 
+#include <cpPlugins/Interface/Image.hxx>
+
 #endif // __CPPLUGINS__INTERFACE__IMAGE__H__
 
 // eof - $RCSfile$