]> Creatis software - cpPlugins.git/blobdiff - lib/cpPlugins/Interface/Image.h
MPR finished
[cpPlugins.git] / lib / cpPlugins / Interface / Image.h
index e6b2b7762708360c5781af9651fe1f6ffc91212d..30bfbf549cb1b725d32cc86063ae46b09d47649a 100644 (file)
@@ -1,14 +1,11 @@
 #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>
 
-class vtkImageData;
+#include <itkProcessObject.h>
 
+// -------------------------------------------------------------------------
 namespace cpPlugins
 {
   namespace Interface
@@ -19,34 +16,44 @@ namespace cpPlugins
       : public DataObject
     {
     public:
-      typedef Image      Self;
-      typedef DataObject Superclass;
+      typedef Image                           Self;
+      typedef DataObject                      Superclass;
+      typedef itk::SmartPointer< Self >       Pointer;
+      typedef itk::SmartPointer< const Self > ConstPointer;
 
     public:
-      Image( );
-      virtual ~Image( );
+      itkNewMacro( Self );
+      itkTypeMacro( Image, DataObject );
+      cpPlugins_Id_Macro( Image, "DataObject" );
 
-      virtual std::string GetClassName( ) const;
-      virtual void SetDataObject( itk::DataObject* dobj );
+    public:
+      template< class I >
+        inline void SetITK( itk::Object* object );
 
-      vtkImageData* GetVTKImageData( ) const;
+      virtual void SetVTK( vtkObject* image );
 
     protected:
-      template< unsigned int D >
-      void _ConnectToVTK_0( );
+      Image( );
+      virtual ~Image( );
 
       template< class P, unsigned int D >
-      void _ConnectToVTK_1( );
+        inline void _ITK_2_VTK( itk::Object* object );
+
+    private:
+      // Purposely not implemented
+      Image( const Self& );
+      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$