]> Creatis software - cpPlugins.git/blobdiff - appli/examples/example_SeedWidget.cxx
OpenGL binary images visualization finished.
[cpPlugins.git] / appli / examples / example_SeedWidget.cxx
index d1e776e638f459a25d5575c010deef1a1d9fc606..cb3c7e6341b5090d1e8fb05a3b5c62c378580bd9 100644 (file)
@@ -52,7 +52,7 @@ int main( int argc, char* argv[] )
 
   // Create objects
   TProcessObject::Pointer reader;
-  reader = plugins.CreateProcessObject( "cpPlugins::IO::ImageReader" );
+  reader = plugins.CreateObject( "cpPlugins::IO::ImageReader" );
   if( reader.IsNull( ) )
   {
     std::cerr
@@ -96,12 +96,13 @@ int main( int argc, char* argv[] )
   // Create slice actors
   vtkSmartPointer< TSliceActors > image_actors =
     vtkSmartPointer< TSliceActors >::New( );
-  image_actors->AddInputData( image->GetVTK< vtkImageData >( ), 2 );
+  image_actors->SetInputImage( image->GetVTK< vtkImageData >( ) );
+  image_actors->SetAxis( 2 );
   image_actors->PushActorsInto( window );
 
   vtkSmartPointer< vtkImageActorPointPlacer > placer =
     vtkSmartPointer< vtkImageActorPointPlacer >::New( );
-  placer->SetImageActor( image_actors->GetImageActor( ) );
+  placer->SetImageActor( image_actors->GetImageActor( ) );
 
   // Create the widget and its representation
   vtkSmartPointer< vtkPointHandleRepresentation3D > handle =