X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2FcpPlugins%2FInterface%2FImage.h;h=1aeee5cc18a7b6945951fcbf7d692d1748318b70;hb=4f9005fe71854d7cff6ab68e48627989a6d1fbc8;hp=6902b706fce2b79b3e6bcac322f9d168b9ee052f;hpb=7c7bc497af96e7b5845be9a2fc277036ec752be9;p=cpPlugins.git diff --git a/lib/cpPlugins/Interface/Image.h b/lib/cpPlugins/Interface/Image.h index 6902b70..1aeee5c 100644 --- a/lib/cpPlugins/Interface/Image.h +++ b/lib/cpPlugins/Interface/Image.h @@ -4,23 +4,10 @@ #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 { @@ -40,37 +27,22 @@ namespace cpPlugins public: itkNewMacro( Self ); itkTypeMacro( Image, DataObject ); + cpPlugins_Id_Macro( + cpPlugins::Interface::Image, "DataObject" + ); public: - /* - virtual void SetITKDataObject( itk::DataObject* o ); - virtual void SetVTKDataObject( vtkDataObject* o ); - */ - template< class I > - inline void SetITKImage( itk::DataObject* object ); + inline void SetITK( itk::Object* 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; + virtual void SetVTK( vtkObject* image ); protected: Image( ); virtual ~Image( ); - /* TODO - template< unsigned int D > - bool _Dim( itk::DataObject* o ); - - template< class I > - bool _Type( itk::DataObject* o ); - */ + template< class P, unsigned int D > + inline void _ITK_2_VTK( itk::Object* object ); private: // Purposely not implemented