]> Creatis software - cpPlugins.git/blob - lib/cpPlugins/Interface/DataObject.h
Machete filter with interactive plane: it now supports images and meshes. Not yet...
[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       itkNewMacro( Self );
30       itkTypeMacro( DataObject, Object );
31       cpPlugins_Id_Macro( DataObject, "BasicObject" );
32
33     public:
34       ProcessObject* GetSource( );
35       const ProcessObject* GetSource( ) const;
36       void SetSource( ProcessObject* src );
37
38       void DisconnectPipeline( );
39
40       template< class T >
41         inline T* GetITK( );
42
43       template< class T >
44         inline const T* GetITK( ) const;
45
46       template< class T >
47         inline T* GetVTK( );
48
49       template< class T >
50         inline const T* GetVTK( ) const;
51
52     protected:
53       DataObject( );
54       virtual ~DataObject( );
55
56     private:
57       // Purposely not implemented
58       DataObject( const Self& );
59       Self& operator=( const Self& );
60
61     protected:
62       itk::Object::Pointer         m_ITKObject;
63       vtkSmartPointer< vtkObject > m_VTKObject;
64       ProcessObject*               m_Source;
65     };
66
67   } // ecapseman
68
69 } // ecapseman
70
71 #include <cpPlugins/Interface/DataObject.hxx>
72
73 #endif // __CPPLUGINS__INTERFACE__DATAOBJECT__H__
74
75 // eof - $RCSfile$