X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=vv%2FvvSlicer.cxx;h=0e18d54d991c1465587b0ff9bc34c0dbbb442db0;hb=9a9ae52b68d1cc0fea67acb45702d092446b423e;hp=bbecaa40acd3e8e515ff856c3a891dc4394e566d;hpb=1e034c70105f0926939acaaa27ddb46e904ae8bf;p=clitk.git diff --git a/vv/vvSlicer.cxx b/vv/vvSlicer.cxx index bbecaa4..0e18d54 100644 --- a/vv/vvSlicer.cxx +++ b/vv/vvSlicer.cxx @@ -736,8 +736,8 @@ void vvSlicer::UpdateDisplayExtent() bounds[1] = ImageActor->GetBounds()[1]; bounds[2] = ImageActor->GetBounds()[2]; bounds[3] = ImageActor->GetBounds()[3]; - bounds[4] = ImageActor->GetBounds()[4]-(0.9/this->GetInput()->GetSpacing()[2]); - bounds[5] = ImageActor->GetBounds()[5]+(0.9/this->GetInput()->GetSpacing()[2]); + bounds[4] = ImageActor->GetBounds()[4]-fabs(0.5/this->GetInput()->GetSpacing()[2]); + bounds[5] = ImageActor->GetBounds()[5]+fabs(0.5/this->GetInput()->GetSpacing()[2]); mClipBox->SetBounds(bounds); UpdateLandmarks(); } @@ -786,8 +786,8 @@ void vvSlicer::UpdateDisplayExtent() double bounds [6]; bounds[0] = ImageActor->GetBounds()[0]; bounds[1] = ImageActor->GetBounds()[1]; - bounds[2] = ImageActor->GetBounds()[2]-(0.5/this->GetInput()->GetSpacing()[1]); - bounds[3] = ImageActor->GetBounds()[3]+(0.5/this->GetInput()->GetSpacing()[1]); + bounds[2] = ImageActor->GetBounds()[2]-fabs(0.5/this->GetInput()->GetSpacing()[1]); + bounds[3] = ImageActor->GetBounds()[3]+fabs(0.5/this->GetInput()->GetSpacing()[1]); bounds[4] = ImageActor->GetBounds()[4]; bounds[5] = ImageActor->GetBounds()[5]; mClipBox->SetBounds(bounds); @@ -836,8 +836,8 @@ void vvSlicer::UpdateDisplayExtent() if (mLandActor) { if (mClipBox) { double bounds [6]; - bounds[0] = ImageActor->GetBounds()[0]-(0.5/this->GetInput()->GetSpacing()[0]); - bounds[1] = ImageActor->GetBounds()[1]+(0.5/this->GetInput()->GetSpacing()[0]); + bounds[0] = ImageActor->GetBounds()[0]-fabs(0.5/this->GetInput()->GetSpacing()[0]); + bounds[1] = ImageActor->GetBounds()[1]+fabs(0.5/this->GetInput()->GetSpacing()[0]); bounds[2] = ImageActor->GetBounds()[2]; bounds[3] = ImageActor->GetBounds()[3]; bounds[4] = ImageActor->GetBounds()[4];