#ifndef __CPPLUGINS__INTERFACE__IMAGE__H__ #define __CPPLUGINS__INTERFACE__IMAGE__H__ #include #include #define ITK_MANUAL_INSTANTIATION #include class vtkImageData; // ------------------------------------------------------------------------- /* TODO #define cpPlugins_Image_Demangle( p, d, o, f, r ) \ if( dynamic_cast< itk::Image< p, d >* >( o ) != NULL ) \ r = this->f< itk::Image< p, d > >( o ) // ------------------------------------------------------------------------- #define cpPlugins_Image_Array_Demangle( a, p, da, di, o, f, r ) \ if( dynamic_cast< itk::Image< a< p, da >, di >* >( o ) != NULL ) \ r = this->f< itk::Image< a< p, da >, di > >( o ) */ // ------------------------------------------------------------------------- namespace cpPlugins { namespace Interface { /** */ class cpPlugins_Interface_EXPORT Image : public DataObject { public: typedef Image Self; typedef DataObject Superclass; typedef itk::SmartPointer< Self > Pointer; typedef itk::SmartPointer< const Self > ConstPointer; public: itkNewMacro( Self ); itkTypeMacro( Image, DataObject ); public: /* virtual void SetITKDataObject( itk::DataObject* o ); virtual void SetVTKDataObject( vtkDataObject* o ); */ template< class I > inline void SetITKImage( itk::DataObject* object ); template< class I > inline I* GetITKImage( ); template< class I > inline const I* GetITKImage( ) const; virtual void SetVTKImageData( vtkImageData* image ); virtual vtkImageData* GetVTKImageData( ); virtual const vtkImageData* GetVTKImageData( ) const; protected: Image( ); virtual ~Image( ); template< class P, unsigned int D > inline void _ITK_2_VTK( itk::DataObject* object ); /* TODO template< unsigned int D > bool _Dim( itk::DataObject* o ); template< class I > bool _Type( itk::DataObject* o ); */ private: // Purposely not implemented Image( const Self& ); Self& operator=( const Self& ); protected: itk::ProcessObject::Pointer m_ITKvVTKConnection; }; } // ecapseman } // ecapseman #include #endif // __CPPLUGINS__INTERFACE__IMAGE__H__ // eof - $RCSfile$