From: Simon Rit Date: Thu, 26 Jul 2012 11:13:26 +0000 (+0200) Subject: simplified code X-Git-Tag: v1.4.0~281^2~25 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=bc6406413211e543d16f2af0a94ac27ad75cbbb3;p=clitk.git simplified code --- diff --git a/vv/vvSlicer.cxx b/vv/vvSlicer.cxx index 1e133d6..2478205 100644 --- a/vv/vvSlicer.cxx +++ b/vv/vvSlicer.cxx @@ -920,9 +920,8 @@ void vvSlicer::UpdateDisplayExtent() double cpos = (double)cam->GetPosition()[this->SliceOrientation]; double range = fabs(spos - cpos); double *spacing = input->GetSpacing(); - double avg_spacing = - ((double)spacing[0] + (double)spacing[1] + (double)spacing[2]) / 3.0; - cam->SetClippingRange(range - avg_spacing * 3.0, range + avg_spacing * 3.0); + double sumSpacing = spacing[0] + spacing[1] + spacing[2]; + cam->SetClippingRange(range - sumSpacing, range + sumSpacing); } } }