X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2FcpPlugins%2FInterface%2FImage.h;h=a5beda39b58b59c7e3424a435f1cdbb9c1cafb7a;hb=94a44f4cdf4747eccc933df0a9c75ec86e825d2e;hp=cbdc219f7590e296f375204abbaffc360e35b323;hpb=c29448936abc15d110205b2da435035131398a87;p=cpPlugins.git diff --git a/lib/cpPlugins/Interface/Image.h b/lib/cpPlugins/Interface/Image.h index cbdc219..a5beda3 100644 --- a/lib/cpPlugins/Interface/Image.h +++ b/lib/cpPlugins/Interface/Image.h @@ -1,12 +1,14 @@ #ifndef __CPPLUGINS__INTERFACE__IMAGE__H__ #define __CPPLUGINS__INTERFACE__IMAGE__H__ -#include -#include -#include #include #include +#include + +class vtkImageData; + +// ------------------------------------------------------------------------- namespace cpPlugins { namespace Interface @@ -17,20 +19,51 @@ namespace cpPlugins : public DataObject { public: - typedef Image Self; - typedef DataObject Superclass; + typedef Image Self; + typedef DataObject Superclass; + typedef itk::SmartPointer< Self > Pointer; + typedef itk::SmartPointer< const Self > ConstPointer; public: + itkNewMacro( Self ); + itkTypeMacro( Image, DataObject ); + + public: + 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( ); - virtual std::string GetClassName( ) const; + template< class P, unsigned int D > + inline void _ITK_2_VTK( itk::DataObject* object ); + + 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$