X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2FcpPlugins%2FInterface%2FImage.h;h=30bfbf549cb1b725d32cc86063ae46b09d47649a;hb=f654620df52b811be7bd263a1775c93d29c69a65;hp=68367fdf7c9bba0fb9acee81f0f4de8246a0efc7;hpb=2361f4f97631e09d88d8a5510a369817dcaa19db;p=cpPlugins.git diff --git a/lib/cpPlugins/Interface/Image.h b/lib/cpPlugins/Interface/Image.h index 68367fd..30bfbf5 100644 --- a/lib/cpPlugins/Interface/Image.h +++ b/lib/cpPlugins/Interface/Image.h @@ -1,26 +1,10 @@ #ifndef __CPPLUGINS__INTERFACE__IMAGE__H__ #define __CPPLUGINS__INTERFACE__IMAGE__H__ -#include -#include -#include #include -#define ITK_MANUAL_INSTANTIATION #include -class vtkImageData; - -// ------------------------------------------------------------------------- -#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 { @@ -28,7 +12,7 @@ namespace cpPlugins { /** */ - class cpPlugins_EXPORT Image + class cpPlugins_Interface_EXPORT Image : public DataObject { public: @@ -40,23 +24,20 @@ 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 SetITK( itk::Object* object ); - virtual vtkImageData* GetVTKImageData( ); - virtual const vtkImageData* GetVTKImageData( ) const; + virtual void SetVTK( vtkObject* image ); protected: Image( ); virtual ~Image( ); - 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 @@ -71,6 +52,8 @@ namespace cpPlugins } // ecapseman +#include + #endif // __CPPLUGINS__INTERFACE__IMAGE__H__ // eof - $RCSfile$