]> Creatis software - cpPlugins.git/blobdiff - lib/cpPlugins/Interface/Image.h
Garbage collector added
[cpPlugins.git] / lib / cpPlugins / Interface / Image.h
index f5454c4e6bb33c205da03f89eea03ab7ddfd4365..4ba14cbf558fc80964f610acf9b2b0df393f47ec 100644 (file)
@@ -19,25 +19,36 @@ 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 );
 
+    public:
       virtual std::string GetClassName( ) const;
-      virtual void SetDataObject( itk::DataObject* dobj );
+      virtual void SetRealDataObject( itk::DataObject* dobj );
 
       vtkImageData* GetVTKImageData( ) const;
       void UpdateVTKImageData( );
 
     protected:
+      Image( );
+      virtual ~Image( );
+
       template< unsigned int D >
-      void _ConnectToVTK_0( );
+        void _VTK_0( );
 
       template< class P, unsigned int D >
-      void _ConnectToVTK_1( );
+        void _VTK_1( );
+
+    private:
+      // Purposely not implemented
+      Image( const Self& );
+      Self& operator=( const Self& );
 
     protected:
       itk::ProcessObject::Pointer m_Image2VTKImageData;