]> Creatis software - cpPlugins.git/blob - lib/cpPlugins/Interface/DataObject.h
sphere widget done, finally
[cpPlugins.git] / lib / cpPlugins / Interface / DataObject.h
1 #ifndef __CPPLUGINS__INTERFACE__DATAOBJECT__H__
2 #define __CPPLUGINS__INTERFACE__DATAOBJECT__H__
3
4 #include <cpPlugins/Interface/Object.h>
5
6 #include <itkObject.h>
7 #include <vtkSmartPointer.h>
8 #include <vtkObject.h>
9
10 namespace cpPlugins
11 {
12   namespace Interface
13   {
14     // Some forward declarations
15     class ProcessObject;
16
17     /**
18      */
19     class cpPlugins_Interface_EXPORT DataObject
20       : public Object
21     {
22     public:
23       typedef DataObject                      Self;
24       typedef Object                          Superclass;
25       typedef itk::SmartPointer< Self >       Pointer;
26       typedef itk::SmartPointer< const Self > ConstPointer;
27
28     public:
29       itkTypeMacro( DataObject, Object );
30       cpPlugins_Id_Macro( DataObject, "BasicObject" );
31
32     public:
33       ProcessObject* GetSource( );
34       const ProcessObject* GetSource( ) const;
35       void SetSource( ProcessObject* src );
36
37       void DisconnectPipeline( );
38
39       template< class T >
40         inline T* GetITK( );
41
42       template< class T >
43         inline const T* GetITK( ) const;
44
45       template< class T >
46         inline T* GetVTK( );
47
48       template< class T >
49         inline const T* GetVTK( ) const;
50
51     protected:
52       DataObject( );
53       virtual ~DataObject( );
54
55     private:
56       // Purposely not implemented
57       DataObject( const Self& );
58       Self& operator=( const Self& );
59
60     protected:
61       itk::Object::Pointer         m_ITKObject;
62       vtkSmartPointer< vtkObject > m_VTKObject;
63       ProcessObject*               m_Source;
64     };
65
66   } // ecapseman
67
68 } // ecapseman
69
70 #include <cpPlugins/Interface/DataObject.hxx>
71
72 #endif // __CPPLUGINS__INTERFACE__DATAOBJECT__H__
73
74 // eof - $RCSfile$