X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2FcpPlugins%2FBaseObjects%2FObject.h;h=6dcfae1e4ec236ba539842f00d0e3e5f67779030;hb=514419c89876aa75880cabee60c14f7582b1d33c;hp=4d0ab88105fde6369e979fc6f0085928435f4d7d;hpb=d74a07c7e0854fcfe2b0189805b992785f3631e8;p=cpPlugins.git diff --git a/lib/cpPlugins/BaseObjects/Object.h b/lib/cpPlugins/BaseObjects/Object.h index 4d0ab88..6dcfae1 100644 --- a/lib/cpPlugins/BaseObjects/Object.h +++ b/lib/cpPlugins/BaseObjects/Object.h @@ -42,16 +42,28 @@ namespace cpPlugins virtual void SetVTK( vtkObjectBase* o ); template< class _TType = itk::LightObject > - inline _TType* GetITK( ); + inline _TType* GetITK( ) + { return( dynamic_cast< _TType* >( this->m_ITK.GetPointer( ) ) ); } template< class _TType = itk::LightObject > - inline const _TType* GetITK( ) const; + inline const _TType* GetITK( ) const + { + return( + dynamic_cast< const _TType* >( this->m_ITK.GetPointer( ) ) + ); + } template< class _TType = vtkObjectBase > - inline _TType* GetVTK( ); + inline _TType* GetVTK( ) + { return( dynamic_cast< _TType* >( this->m_VTK.GetPointer( ) ) ); } template< class _TType = vtkObjectBase > - inline const _TType* GetVTK( ) const; + inline const _TType* GetVTK( ) const + { + return( + dynamic_cast< const _TType* >( this->m_VTK.GetPointer( ) ) + ); + } protected: Object( ); @@ -74,8 +86,6 @@ namespace cpPlugins } // ecapseman -#include - #endif // __cpPlugins__BaseObjects__Object__h__ // eof - $RCSfile$