]> Creatis software - cpPlugins.git/blob - lib/cpPlugins/Interface/Image.h
...
[cpPlugins.git] / lib / cpPlugins / Interface / Image.h
1 #ifndef __CPPLUGINS__INTERFACE__IMAGE__H__
2 #define __CPPLUGINS__INTERFACE__IMAGE__H__
3
4 #include <cpPlugins/Interface/cpPlugins_Interface_Export.h>
5 #include <cpPlugins/Interface/DataObject.h>
6
7 #include <itkProcessObject.h>
8
9 class vtkImageData;
10
11 // -------------------------------------------------------------------------
12 namespace cpPlugins
13 {
14   namespace Interface
15   {
16     /**
17      */
18     class cpPlugins_Interface_EXPORT Image
19       : public DataObject
20     {
21     public:
22       typedef Image                           Self;
23       typedef DataObject                      Superclass;
24       typedef itk::SmartPointer< Self >       Pointer;
25       typedef itk::SmartPointer< const Self > ConstPointer;
26
27     public:
28       itkNewMacro( Self );
29       itkTypeMacro( Image, DataObject );
30
31     public:
32       template< class I >
33         inline void SetITKImage( itk::DataObject* object );
34
35       template< class I >
36         inline I* GetITKImage( );
37
38       template< class I >
39         inline const I* GetITKImage( ) const;
40
41       virtual void SetVTKImageData( vtkImageData* image );
42       virtual vtkImageData* GetVTKImageData( );
43       virtual const vtkImageData* GetVTKImageData( ) const;
44
45     protected:
46       Image( );
47       virtual ~Image( );
48
49       template< class P, unsigned int D >
50         inline void _ITK_2_VTK( itk::DataObject* object );
51
52     private:
53       // Purposely not implemented
54       Image( const Self& );
55       Self& operator=( const Self& );
56
57     protected:
58       itk::ProcessObject::Pointer m_ITKvVTKConnection;
59     };
60
61   } // ecapseman
62
63 } // ecapseman
64
65 #include <cpPlugins/Interface/Image.hxx>
66
67 #endif // __CPPLUGINS__INTERFACE__IMAGE__H__
68
69 // eof - $RCSfile$