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;
68 template< unsigned int D >
69 bool _Dim( itk::DataObject* o );
72 bool _Type( itk::DataObject* o );
76 // Purposely not implemented
78 Self& operator=( const Self& );
81 itk::ProcessObject::Pointer m_ITKvVTKConnection;
88 #include <cpPlugins/Interface/Image.hxx>
90 #endif // __CPPLUGINS__INTERFACE__IMAGE__H__