X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2FcpPlugins%2FInterface%2FImage.h;h=45b47faf37175195f59d7249eafa4b2721c70464;hb=7e29f3aec097ba1bff1894fed6eb1094276c5b72;hp=f5454c4e6bb33c205da03f89eea03ab7ddfd4365;hpb=2e68bf3e3a3433d77adbc67cebc17fd5cb0111f6;p=cpPlugins.git diff --git a/lib/cpPlugins/Interface/Image.h b/lib/cpPlugins/Interface/Image.h index f5454c4..45b47fa 100644 --- a/lib/cpPlugins/Interface/Image.h +++ b/lib/cpPlugins/Interface/Image.h @@ -1,13 +1,9 @@ #ifndef __CPPLUGINS__INTERFACE__IMAGE__H__ #define __CPPLUGINS__INTERFACE__IMAGE__H__ -#include -#include -#include -#include #include -class vtkImageData; +#include namespace cpPlugins { @@ -19,35 +15,48 @@ 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: - Image( ); - virtual ~Image( ); - - virtual std::string GetClassName( ) const; - virtual void SetDataObject( itk::DataObject* dobj ); + itkNewMacro( Self ); + itkTypeMacro( Image, DataObject ); + cpPlugins_Id_Macro( Image, DataObject ); - vtkImageData* GetVTKImageData( ) const; - void UpdateVTKImageData( ); + public: + virtual void SetITK( itk::LightObject* o ); + virtual void SetVTK( vtkObjectBase* o ); protected: + Image( ); + virtual ~Image( ); + template< unsigned int D > - void _ConnectToVTK_0( ); + inline void _ITK_2_VTK_0( itk::LightObject* o ); template< class P, unsigned int D > - void _ConnectToVTK_1( ); + inline void _ITK_2_VTK_1( itk::LightObject* o ); + + template< class I > + inline void _ITK_2_VTK_2( itk::LightObject* o ); + + private: + // Purposely not implemented + Image( const Self& ); + Self& operator=( const Self& ); protected: - itk::ProcessObject::Pointer m_Image2VTKImageData; - vtkImageData* m_VTKImageData; + itk::ProcessObject::Pointer m_ITKvVTK; }; } // ecapseman } // ecapseman +#include + #endif // __CPPLUGINS__INTERFACE__IMAGE__H__ // eof - $RCSfile$