]> Creatis software - cpPlugins.git/blob - lib/cpInstances/DataObjects/Image.h
7a4a387a2e962d41af44e907bb0f0c21400ff770
[cpPlugins.git] / lib / cpInstances / DataObjects / Image.h
1 #ifndef __cpInstances__Image__h__
2 #define __cpInstances__Image__h__
3
4 #define ITK_MANUAL_INSTANTIATION
5 #include <cpInstances/cpPluginsDataObjects_Export.h>
6 #include <cpInstances/DataObjects/Image_Demanglers.h>
7 #include <cpPlugins/Pipeline/DataObject.h>
8 #include <itkProcessObject.h>
9
10 class vtkImageData;
11
12 namespace cpInstances
13 {
14   namespace DataObjects
15   {
16     /**
17      */
18     class cpPluginsDataObjects_EXPORT Image
19       : public cpPlugins::Pipeline::DataObject
20     {
21     public:
22       typedef Image                           Self;
23       typedef cpPlugins::Pipeline::DataObject Superclass;
24       typedef itk::SmartPointer< Self >       Pointer;
25       typedef itk::SmartPointer< const Self > ConstPointer;
26
27     public:
28       itkNewMacro( Self );
29       itkTypeMacro( Image, cpPlugins::Pipeline::DataObject );
30       cpPlugins_Id_Macro( Image, Object );
31       cpPlugins_Compatibility_Macro;
32
33     public:
34       virtual void SetITK( itk::LightObject* o ) override;
35       virtual void SetVTK( vtkObjectBase* o ) override;
36
37     protected:
38       Image( );
39       virtual ~Image( );
40
41       virtual void _UpdateITK( ) const override;
42       virtual void _UpdateVTK( ) const override;
43
44       template< class _TImage >
45       inline void _ITK_2_VTK_0( _TImage* image ) const;
46
47       template< class _TImage >
48       inline void _ITK_2_VTK_1( _TImage* image ) const;
49
50       template< class _TPixel >
51       inline bool _VTK_2_ITK_0( vtkImageData* image );
52
53       template< class _TPixel, unsigned int _VDim >
54       inline bool _VTK_2_ITK_1( vtkImageData* image );
55
56     private:
57       // Purposely not implemented
58       Image( const Self& );
59       Self& operator=( const Self& );
60
61     protected:
62       itk::ProcessObject::Pointer m_ITKvVTK;
63     };
64
65   } // ecapseman
66
67 } // ecapseman
68
69 #endif // __cpInstances__Image__h__
70
71 // eof - $RCSfile$