X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2FcpPlugins%2FPipeline%2FObject.h;fp=lib%2FcpPlugins%2FPipeline%2FObject.h;h=0000000000000000000000000000000000000000;hb=2e142df11d6f312a2a2b5097b8da73571ed523e8;hp=4f2b2bd67fe8dfbca2c016a9d4caa797e50d2621;hpb=61b3659afe961ed248f30e26f9ca8f28fcfafddc;p=cpPlugins.git diff --git a/lib/cpPlugins/Pipeline/Object.h b/lib/cpPlugins/Pipeline/Object.h deleted file mode 100644 index 4f2b2bd..0000000 --- a/lib/cpPlugins/Pipeline/Object.h +++ /dev/null @@ -1,105 +0,0 @@ -#ifndef __cpPlugins__Pipeline__Object__h__ -#define __cpPlugins__Pipeline__Object__h__ - -#include - -#include -#include -#include -#include -#include - -namespace cpPlugins -{ - namespace Pipeline - { - /** - */ - class cpPlugins_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: - itkTypeMacro( Object, itk::Object ); - - public: - virtual const char* GetClassName( ) const = 0; - virtual const char* GetClassCategory( ) const = 0; - - const float& GetViewX( ) const; - const float& GetViewY( ) const; - void SetViewCoords( float x, float y ); - - virtual void Modified( ) const override; - - virtual void SetITK( itk::LightObject* o ); - virtual void SetVTK( vtkObjectBase* o ); - - template< class _TType = itk::LightObject > - inline _TType* GetITK( ) - { - if( this->m_ITK.GetPointer( ) == NULL ) - this->_UpdateITK( ); - return( dynamic_cast< _TType* >( this->m_ITK.GetPointer( ) ) ); - } - - template< class _TType = itk::LightObject > - inline const _TType* GetITK( ) const - { - if( this->m_ITK.GetPointer( ) == NULL ) - this->_UpdateITK( ); - return( - dynamic_cast< const _TType* >( this->m_ITK.GetPointer( ) ) - ); - } - - template< class _TType = vtkObjectBase > - inline _TType* GetVTK( ) - { - if( this->m_VTK.GetPointer( ) == NULL ) - this->_UpdateVTK( ); - return( dynamic_cast< _TType* >( this->m_VTK.GetPointer( ) ) ); - } - - template< class _TType = vtkObjectBase > - inline const _TType* GetVTK( ) const - { - if( this->m_VTK.GetPointer( ) == NULL ) - this->_UpdateVTK( ); - return( - dynamic_cast< const _TType* >( this->m_VTK.GetPointer( ) ) - ); - } - - protected: - Object( ); - virtual ~Object( ); - - virtual void _UpdateITK( ) const; - virtual void _UpdateVTK( ) const; - - private: - // Purposely not implemented - Object( const Self& ); - Self& operator=( const Self& ); - - protected: - itk::LightObject::Pointer m_ITK; - vtkSmartPointer< vtkObjectBase > m_VTK; - - float m_ViewX; - float m_ViewY; - }; - - } // ecapseman - -} // ecapseman - -#endif // __cpPlugins__Pipeline__Object__h__ - -// eof - $RCSfile$