X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;ds=sidebyside;f=lib%2FcpPlugins%2FInterface%2FImage.h;h=68367fdf7c9bba0fb9acee81f0f4de8246a0efc7;hb=2361f4f97631e09d88d8a5510a369817dcaa19db;hp=e69de29bb2d1d6434b8b29ae775ad8c2e48c5391;hpb=8c23766af88a29c3e830299dffc4b95d9fe61df9;p=cpPlugins.git diff --git a/lib/cpPlugins/Interface/Image.h b/lib/cpPlugins/Interface/Image.h index e69de29..68367fd 100644 --- a/lib/cpPlugins/Interface/Image.h +++ b/lib/cpPlugins/Interface/Image.h @@ -0,0 +1,76 @@ +#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 +{ + namespace Interface + { + /** + */ + class cpPlugins_EXPORT Image + : public DataObject + { + public: + typedef Image Self; + typedef DataObject Superclass; + typedef itk::SmartPointer< Self > Pointer; + typedef itk::SmartPointer< const Self > ConstPointer; + + public: + itkNewMacro( Self ); + itkTypeMacro( Image, DataObject ); + + public: + virtual void SetITKDataObject( itk::DataObject* o ); + virtual void SetVTKDataObject( vtkDataObject* o ); + + virtual vtkImageData* GetVTKImageData( ); + virtual const vtkImageData* GetVTKImageData( ) const; + + protected: + Image( ); + virtual ~Image( ); + + template< unsigned int D > + bool _Dim( itk::DataObject* o ); + + template< class I > + bool _Type( itk::DataObject* o ); + + private: + // Purposely not implemented + Image( const Self& ); + Self& operator=( const Self& ); + + protected: + itk::ProcessObject::Pointer m_ITKvVTKConnection; + }; + + } // ecapseman + +} // ecapseman + +#endif // __CPPLUGINS__INTERFACE__IMAGE__H__ + +// eof - $RCSfile$