X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2FcpPlugins%2FInterface%2FImage.h;h=88808c4a59c7e360ece328eb27a23fc050356b9c;hb=a89305e04527ebe2e81d0d1a62bbe34e0d35a141;hp=6902b706fce2b79b3e6bcac322f9d168b9ee052f;hpb=7c7bc497af96e7b5845be9a2fc277036ec752be9;p=cpPlugins.git diff --git a/lib/cpPlugins/Interface/Image.h b/lib/cpPlugins/Interface/Image.h index 6902b70..88808c4 100644 --- a/lib/cpPlugins/Interface/Image.h +++ b/lib/cpPlugins/Interface/Image.h @@ -1,27 +1,10 @@ #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 @@ -40,37 +23,24 @@ namespace cpPlugins public: itkNewMacro( Self ); itkTypeMacro( Image, DataObject ); + cpPlugins_Id_Macro( 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; + virtual void SetITK( itk::LightObject* o ); + virtual void SetVTK( vtkObjectBase* o ); protected: Image( ); virtual ~Image( ); - /* TODO - template< unsigned int D > - bool _Dim( itk::DataObject* o ); + template< unsigned int D > + inline bool _ITK_2_VTK_0( itk::LightObject* o ); + + template< class P, unsigned int D > + inline bool _ITK_2_VTK_1( itk::LightObject* o ); - template< class I > - bool _Type( itk::DataObject* o ); - */ + template< class I > + inline bool _ITK_2_VTK_2( itk::LightObject* o ); private: // Purposely not implemented @@ -78,7 +48,7 @@ namespace cpPlugins Self& operator=( const Self& ); protected: - itk::ProcessObject::Pointer m_ITKvVTKConnection; + itk::ProcessObject::Pointer m_ITKvVTK; }; } // ecapseman