]> Creatis software - cpPlugins.git/blobdiff - lib/cpPlugins/BaseObjects/Object.cxx
Cast image filter added. ROI filter modified.
[cpPlugins.git] / lib / cpPlugins / BaseObjects / Object.cxx
index 9fffab63e44e0c487623ccb68defbcd3aff5bcd3..bb9ab4a211923d00f53f51cd2460cc29d7d8eec4 100644 (file)
@@ -31,36 +31,14 @@ SetViewCoords( float x, float y )
 void cpPlugins::BaseObjects::Object::
 Modified( ) const
 {
-  const itk::Object* i = this->GetITK< itk::Object >( );
-  vtkObject* v = const_cast< vtkObject* >( this->GetVTK< vtkObject >( ) );
+  const itk::Object* i =
+    dynamic_cast< const itk::Object* >( this->m_ITK.GetPointer( ) );
+  vtkObject* v = dynamic_cast< vtkObject* >( this->m_VTK.GetPointer( ) );
   if( i != NULL ) i->Modified( );
   if( v != NULL ) v->Modified( );
   this->Superclass::Modified( );
 }
 
-// -------------------------------------------------------------------------
-itk::ModifiedTimeType cpPlugins::BaseObjects::Object::
-GetMTime( ) const
-{
-  itk::ModifiedTimeType lt = this->Superclass::GetMTime( );
-  const itk::Object* i = this->GetITK< itk::Object >( );
-  vtkObject* v = const_cast< vtkObject* >( this->GetVTK< vtkObject >( ) );
-
-  itk::ModifiedTimeType rt;
-  if( i != NULL && v == NULL )
-    rt = i->GetMTime( );
-  else if( i == NULL && v != NULL )
-    rt = v->GetMTime( );
-  else if( i != NULL && v != NULL )
-  {
-    auto iTime = i->GetMTime( );
-    auto vTime = v->GetMTime( );
-    rt = ( iTime < vTime )? vTime: iTime;
-
-  } // fi
-  return( ( lt < rt )? rt: lt );
-}
-
 // -------------------------------------------------------------------------
 void cpPlugins::BaseObjects::Object::
 SetITK( itk::LightObject* o )
@@ -101,4 +79,20 @@ cpPlugins::BaseObjects::Object::
 {
 }
 
+// -------------------------------------------------------------------------
+void cpPlugins::BaseObjects::Object::
+_UpdateITK( ) const
+{
+  // WARNING: do nothing since this is supposed to be defined by DataObjects
+  // with ITK-VTK conversion strategies.
+}
+
+// -------------------------------------------------------------------------
+void cpPlugins::BaseObjects::Object::
+_UpdateVTK( ) const
+{
+  // WARNING: do nothing since this is supposed to be defined by DataObjects
+  // with ITK-VTK conversion strategies.
+}
+
 // eof - $RCSfile$