X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2FcpPlugins%2FInterface%2FImage.h;h=a5beda39b58b59c7e3424a435f1cdbb9c1cafb7a;hb=75dc4945344b4a5a7be10a3ca33fa2e6fff87df8;hp=e6b2b7762708360c5781af9651fe1f6ffc91212d;hpb=1adce86c283e253ec41f762652bc477d56d617a5;p=cpPlugins.git diff --git a/lib/cpPlugins/Interface/Image.h b/lib/cpPlugins/Interface/Image.h index e6b2b77..a5beda3 100644 --- a/lib/cpPlugins/Interface/Image.h +++ b/lib/cpPlugins/Interface/Image.h @@ -1,14 +1,14 @@ #ifndef __CPPLUGINS__INTERFACE__IMAGE__H__ #define __CPPLUGINS__INTERFACE__IMAGE__H__ -#include -#include -#include #include #include +#include + class vtkImageData; +// ------------------------------------------------------------------------- namespace cpPlugins { namespace Interface @@ -19,34 +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: - Image( ); - virtual ~Image( ); + itkNewMacro( Self ); + itkTypeMacro( Image, DataObject ); + + public: + template< class I > + inline void SetITKImage( itk::DataObject* object ); + + template< class I > + inline I* GetITKImage( ); - virtual std::string GetClassName( ) const; - virtual void SetDataObject( itk::DataObject* dobj ); + template< class I > + inline const I* GetITKImage( ) const; - vtkImageData* GetVTKImageData( ) const; + virtual void SetVTKImageData( vtkImageData* image ); + virtual vtkImageData* GetVTKImageData( ); + virtual const vtkImageData* GetVTKImageData( ) const; protected: - template< unsigned int D > - void _ConnectToVTK_0( ); + Image( ); + virtual ~Image( ); template< class P, unsigned int D > - void _ConnectToVTK_1( ); + inline void _ITK_2_VTK( itk::DataObject* object ); + + private: + // Purposely not implemented + Image( const Self& ); + Self& operator=( const Self& ); protected: - itk::ProcessObject::Pointer m_Image2VTKImageData; - vtkImageData* m_VTKImageData; + itk::ProcessObject::Pointer m_ITKvVTKConnection; }; } // ecapseman } // ecapseman +#include + #endif // __CPPLUGINS__INTERFACE__IMAGE__H__ // eof - $RCSfile$