X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=appli%2Fexamples%2Fexample_HandleWidget.cxx;h=e2dee09fd4cdc791544ec5d6249fad8d222cd613;hb=b6c7e73ebcce23619daced67f85d9e1364b33f30;hp=2cce131af8e9560ad93dcb52e175a03c6278237b;hpb=ec99f46f898bfcd579161f1b2c28f8d9b2c8f333;p=cpPlugins.git diff --git a/appli/examples/example_HandleWidget.cxx b/appli/examples/example_HandleWidget.cxx index 2cce131..e2dee09 100644 --- a/appli/examples/example_HandleWidget.cxx +++ b/appli/examples/example_HandleWidget.cxx @@ -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( 0 ) ); + placer->SetImageActor( image_actors->GetImageActor( ) ); double bnds[ 6 ]; - image_actors->GetImageActor( 0 )->GetDisplayBounds( bnds ); + image_actors->GetImageActor( )->GetDisplayBounds( bnds ); double pos[] = { bnds[ 0 ], bnds[ 2 ], bnds[ 4 ] }; vtkSmartPointer< vtkPointHandleRepresentation3D > rep =