From: srit Date: Thu, 3 Mar 2011 14:29:05 +0000 (+0000) Subject: Let the renderer do the computation X-Git-Tag: v1.2.0~205 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=8455690c8e536d1cec06bc62a80d23c6c78ca955;p=clitk.git Let the renderer do the computation --- diff --git a/vv/vvSlicer.cxx b/vv/vvSlicer.cxx index c070d60..af7f066 100644 --- a/vv/vvSlicer.cxx +++ b/vv/vvSlicer.cxx @@ -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(); } //----------------------------------------------------------------------------