]> Creatis software - cpPlugins.git/blob - lib/cpPlugins/Interface/DataObject.h
e61da5cbef4f04b82e41afccb1e092008795cd63
[cpPlugins.git] / lib / cpPlugins / Interface / DataObject.h
1 #ifndef __CPPLUGINS__INTERFACE__DATAOBJECT__H__
2 #define __CPPLUGINS__INTERFACE__DATAOBJECT__H__
3
4 #include <map>
5 #include <string>
6 #include <vtkDataObject.h>
7 #include <vtkSmartPointer.h>
8 #include <cpPlugins/Interface/cpPlugins_Interface_Export.h>
9 #include <cpPlugins/Interface/Object.h>
10
11 #define ITK_MANUAL_INSTANTIATION
12 #include <itkDataObject.h>
13
14 namespace cpPlugins
15 {
16   namespace Interface
17   {
18     /**
19      */
20     class cpPlugins_Interface_EXPORT DataObject
21       : public Object
22     {
23     public:
24       typedef DataObject                      Self;
25       typedef Object                          Superclass;
26       typedef itk::SmartPointer< Self >       Pointer;
27       typedef itk::SmartPointer< const Self > ConstPointer;
28
29     public:
30       itkTypeMacro( DataObject, Object );
31
32     public:
33       virtual itk::DataObject* GetITKDataObject( );
34       virtual const itk::DataObject* GetITKDataObject( ) const;
35       virtual void SetITKDataObject( itk::DataObject* o ) = 0;
36
37       virtual vtkDataObject* GetVTKDataObject( );
38       virtual const vtkDataObject* GetVTKDataObject( ) const;
39       virtual void SetVTKDataObject( vtkDataObject* o ) = 0;
40
41       Object* GetSource( );
42       const Object* GetSource( ) const;
43       void SetSource( Object* src );
44
45       void DisconnectPipeline( );
46
47     protected:
48       DataObject( );
49       virtual ~DataObject( );
50
51     private:
52       // Purposely not implemented
53       DataObject( const Self& );
54       Self& operator=( const Self& );
55
56     protected:
57       itk::DataObject::Pointer         m_ITKObject;
58       vtkSmartPointer< vtkDataObject > m_VTKObject;
59       Object::Pointer                  m_Source;
60     };
61
62   } // ecapseman
63
64 } // ecapseman
65
66 #endif // __CPPLUGINS__INTERFACE__DATAOBJECT__H__
67
68 // eof - $RCSfile$