]> Creatis software - cpPlugins.git/blobdiff - lib/cpPlugins/BaseObjects/Object.h
...
[cpPlugins.git] / lib / cpPlugins / BaseObjects / Object.h
index 4d0ab88105fde6369e979fc6f0085928435f4d7d..6dcfae1e4ec236ba539842f00d0e3e5f67779030 100644 (file)
@@ -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 <cpPlugins/BaseObjects/Object.hxx>
-
 #endif // __cpPlugins__BaseObjects__Object__h__
 
 // eof - $RCSfile$