X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2FcpPlugins%2FInterface%2FObject.h;h=92de13cb646f4823107a073628e5558dc3e5c065;hb=1f5bfcecaf07f48e16ca55201faa50e597239042;hp=d64ece2221e262b20342c6bd165cbdb57f48b552;hpb=8c23766af88a29c3e830299dffc4b95d9fe61df9;p=cpPlugins.git diff --git a/lib/cpPlugins/Interface/Object.h b/lib/cpPlugins/Interface/Object.h index d64ece2..92de13c 100644 --- a/lib/cpPlugins/Interface/Object.h +++ b/lib/cpPlugins/Interface/Object.h @@ -1,8 +1,15 @@ #ifndef __CPPLUGINS__INTERFACE__OBJECT__H__ #define __CPPLUGINS__INTERFACE__OBJECT__H__ +#include + #include -#include + +#include +#include + +#include +#include namespace cpPlugins { @@ -10,22 +17,68 @@ namespace cpPlugins { /** */ - class Object + class cpPlugins_Interface_EXPORT Object + : public itk::Object { public: + typedef Object Self; + typedef itk::Object Superclass; + typedef itk::SmartPointer< Self > Pointer; + typedef itk::SmartPointer< const Self > ConstPointer; + + public: + itkNewMacro( Self ); + itkTypeMacro( Object, itkObject ); + cpPlugins_Id_Macro( Object, BaseObject ); + + itkGetStringMacro( Name ); + itkGetConstMacro( ViewX, float ); + itkGetConstMacro( ViewY, float ); + + itkSetStringMacro( Name ); + itkSetMacro( ViewX, float ); + itkSetMacro( ViewY, float ); + + public: + virtual void Modified( ) const; + void SetViewCoords( float x, float y ); + + template< class T > + inline T* GetITK( ); + + template< class T > + inline const T* GetITK( ) const; + + template< class T > + inline T* GetVTK( ); + + template< class T > + inline const T* GetVTK( ) const; + + protected: Object( ); virtual ~Object( ); - virtual std::string GetClassName( ) const; - }; + private: + // Purposely not implemented + Object( const Self& ); + Self& operator=( const Self& ); + + protected: + itk::LightObject::Pointer m_ITKObject; + vtkSmartPointer< vtkObjectBase > m_VTKObject; + std::string m_Name; - // TODO: doc - PLUMA_PROVIDER_HEADER( Object ); + float m_ViewX; + float m_ViewY; + }; } // ecapseman } // ecapseman +#include + #endif // __CPPLUGINS__INTERFACE__OBJECT__H__ // eof - $RCSfile$