]> Creatis software - cpPlugins.git/blobdiff - appli/examples/example_HandleWidget.cxx
...
[cpPlugins.git] / appli / examples / example_HandleWidget.cxx
index 2cce131af8e9560ad93dcb52e175a03c6278237b..e2dee09fd4cdc791544ec5d6249fad8d222cd613 100644 (file)
@@ -49,8 +49,8 @@ int main( int argc, char* argv[] )
   } // fi
 
   // Create objects
-  TProcessObject::Pointer reader;
-  reader = plugins.CreateProcessObject( "cpPlugins::IO::ImageReader" );
+  TProcessObject::Pointer reader =
+    plugins.CreateObject( "cpPlugins::IO::ImageReader" );
   if( reader.IsNull( ) )
   {
     std::cerr
@@ -94,15 +94,16 @@ 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( ) );
 
   double bnds[ 6 ];
-  image_actors->GetImageActor( )->GetDisplayBounds( bnds );
+  image_actors->GetImageActor( )->GetDisplayBounds( bnds );
   double pos[] = { bnds[ 0 ], bnds[ 2 ], bnds[ 4 ] };
 
   vtkSmartPointer< vtkPointHandleRepresentation3D > rep =