]> Creatis software - clitk.git/commitdiff
Let the renderer do the computation
authorsrit <srit>
Thu, 3 Mar 2011 14:29:05 +0000 (14:29 +0000)
committersrit <srit>
Thu, 3 Mar 2011 14:29:05 +0000 (14:29 +0000)
vv/vvSlicer.cxx

index c070d60bb4b6c11d491a764bc2a7157a4d2598f1..af7f0668941291455b37149ef79626eccfbd2d8f 100644 (file)
@@ -1062,14 +1062,7 @@ void vvSlicer::SetRenderWindow(int orientation, vtkRenderWindow * rw)
 //----------------------------------------------------------------------------
 void vvSlicer::ResetCamera()
 {
-  if (this->GetInput()) {
-    double* input_bounds=this->GetInput()->GetBounds();
-    double bmax=input_bounds[1]-input_bounds[0];
-    if (bmax < input_bounds[3]-input_bounds[2]) bmax=input_bounds[3]-input_bounds[2];
-    if (bmax < input_bounds[5]-input_bounds[4]) bmax=input_bounds[5]-input_bounds[4];
-    this->GetRenderer()->ResetCamera();
-    this->GetRenderer()->GetActiveCamera()->SetParallelScale(bmax/2);
-  }
+  this->GetRenderer()->ResetCamera();
 }
 //----------------------------------------------------------------------------