]> Creatis software - cpPlugins.git/blobdiff - lib/cpExtensions/Visualization/ImageSliceActors.cxx
MVC integration at 50%
[cpPlugins.git] / lib / cpExtensions / Visualization / ImageSliceActors.cxx
index 2254ac9501169b8a7e729dc8c684a1c559a04ec5..3ac1e5d909afd1530a394419bc724edfb515e999 100644 (file)
@@ -82,6 +82,21 @@ SetInputData( vtkImageData* data, int orientation )
   this->_ConfigureInput( orientation );
 }
 
+// -------------------------------------------------------------------------
+void cpExtensions::Visualization::ImageSliceActors::
+SetInputActor( vtkProp* actor, int orientation )
+{
+  auto real_actor = dynamic_cast< vtkImageActor* >( actor );
+  if( real_actor == NULL )
+    return;
+  auto real_mapper =
+    dynamic_cast< vtkImageSliceMapper* >( real_actor->GetMapper( ) );
+  if( real_mapper == NULL )
+    return;
+  this->m_Mapper = real_mapper;
+  this->_ConfigureInput( orientation );
+}
+
 // -------------------------------------------------------------------------
 vtkImageData* cpExtensions::Visualization::ImageSliceActors::
 GetInputData( )