1 #ifndef __CPPLUGINS__INTERFACE__IMAGE__H__
2 #define __CPPLUGINS__INTERFACE__IMAGE__H__
4 #include <cpPlugins/Interface/cpPlugins_Interface_Export.h>
5 #include <cpPlugins/Interface/DataObject.h>
7 #define ITK_MANUAL_INSTANTIATION
8 #include <itkProcessObject.h>
12 // -------------------------------------------------------------------------
14 #define cpPlugins_Image_Demangle( p, d, o, f, r ) \
15 if( dynamic_cast< itk::Image< p, d >* >( o ) != NULL ) \
16 r = this->f< itk::Image< p, d > >( o )
18 // -------------------------------------------------------------------------
19 #define cpPlugins_Image_Array_Demangle( a, p, da, di, o, f, r ) \
20 if( dynamic_cast< itk::Image< a< p, da >, di >* >( o ) != NULL ) \
21 r = this->f< itk::Image< a< p, da >, di > >( o )
24 // -------------------------------------------------------------------------
31 class cpPlugins_Interface_EXPORT Image
36 typedef DataObject Superclass;
37 typedef itk::SmartPointer< Self > Pointer;
38 typedef itk::SmartPointer< const Self > ConstPointer;
42 itkTypeMacro( Image, DataObject );
46 virtual void SetITKDataObject( itk::DataObject* o );
47 virtual void SetVTKDataObject( vtkDataObject* o );
51 inline void SetITKImage( itk::DataObject* object );
54 inline I* GetITKImage( );
57 inline const I* GetITKImage( ) const;
59 virtual void SetVTKImageData( vtkImageData* image );
60 virtual vtkImageData* GetVTKImageData( );
61 virtual const vtkImageData* GetVTKImageData( ) const;
67 template< class P, unsigned int D >
68 inline void _ITK_2_VTK( itk::DataObject* object );
71 template< unsigned int D >
72 bool _Dim( itk::DataObject* o );
75 bool _Type( itk::DataObject* o );
79 // Purposely not implemented
81 Self& operator=( const Self& );
84 itk::ProcessObject::Pointer m_ITKvVTKConnection;
91 #include <cpPlugins/Interface/Image.hxx>
93 #endif // __CPPLUGINS__INTERFACE__IMAGE__H__