]> Creatis software - cpPlugins.git/blobdiff - appli/examples/example_MPR.cxx
contour widget example update
[cpPlugins.git] / appli / examples / example_MPR.cxx
index 502302c48b7f1d2dcda5173f1125b3ca8c2d67ab..9f6e113151d5d0ed38b07a13ac998d3bf0a58e3a 100644 (file)
@@ -53,9 +53,9 @@ public:
       else if( title == "Z" )
         this->Actors->SetSlice( 2, int( rep->GetValue( ) ) );
       else if( title == "Window" )
-        this->Actors->SetWindow( rep->GetValue( ) );
+        this->Actors->SetWindow( 0, rep->GetValue( ) );
       else if( title == "Level" )
-        this->Actors->SetLevel( rep->GetValue( ) );
+        this->Actors->SetLevel( 0, rep->GetValue( ) );
     }
   SliderCallback( )
     : vtkCommand( )
@@ -178,7 +178,7 @@ int main( int argc, char* argv[] )
   // Actors
   vtkSmartPointer< TMPRActors > mpr_actors =
     vtkSmartPointer< TMPRActors >::New( );
-  mpr_actors->SetInputData( image );
+  mpr_actors->AddInputData( image );
   mpr_actors->PushDataInto( NULL, NULL, NULL, renderer );
 
   // Callbacks
@@ -208,16 +208,16 @@ int main( int argc, char* argv[] )
     0.500, 0.15, 0.690, 0.15, cb
     );
   Slider w_slider(
-    mpr_actors->GetMinWindow( ),
-    mpr_actors->GetMaxWindow( ),
-    mpr_actors->GetWindow( ),
+    mpr_actors->GetMinWindow( ),
+    mpr_actors->GetMaxWindow( ),
+    mpr_actors->GetWindow( ),
     "Window", interactor,
     0.100, 0.05, 0.290, 0.05, cb
     );
   Slider l_slider(
-    mpr_actors->GetMinWindow( ),
-    mpr_actors->GetMaxWindow( ),
-    mpr_actors->GetWindow( ),
+    mpr_actors->GetMinWindow( ),
+    mpr_actors->GetMaxWindow( ),
+    mpr_actors->GetWindow( ),
     "Level", interactor,
     0.300, 0.05, 0.490, 0.05, cb
     );