1 #ifndef __CPPLUGINS__INTERFACE__IMAGE__H__
2 #define __CPPLUGINS__INTERFACE__IMAGE__H__
6 #include <cpPlugins/Interface/cpPlugins_Interface_Export.h>
7 #include <cpPlugins/Interface/DataObject.h>
9 #define ITK_MANUAL_INSTANTIATION
10 #include <itkProcessObject.h>
14 // -------------------------------------------------------------------------
15 #define cpPlugins_Image_Demangle( p, d, o, f, r ) \
16 if( dynamic_cast< itk::Image< p, d >* >( o ) != NULL ) \
17 r = this->f< itk::Image< p, d > >( o )
19 // -------------------------------------------------------------------------
20 #define cpPlugins_Image_Array_Demangle( a, p, da, di, o, f, r ) \
21 if( dynamic_cast< itk::Image< a< p, da >, di >* >( o ) != NULL ) \
22 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 );
45 virtual void SetITKDataObject( itk::DataObject* o );
46 virtual void SetVTKDataObject( vtkDataObject* o );
48 virtual vtkImageData* GetVTKImageData( );
49 virtual const vtkImageData* GetVTKImageData( ) const;
55 template< unsigned int D >
56 bool _Dim( itk::DataObject* o );
59 bool _Type( itk::DataObject* o );
62 // Purposely not implemented
64 Self& operator=( const Self& );
67 itk::ProcessObject::Pointer m_ITKvVTKConnection;
74 #endif // __CPPLUGINS__INTERFACE__IMAGE__H__