From b7ea297944fd0df19cbaa19889cdb25673d93095 Mon Sep 17 00:00:00 2001 From: srit Date: Mon, 7 Jun 2010 21:50:15 +0000 Subject: [PATCH] Corrected bug in landmarks with negative spacing --- vv/vvSlicer.cxx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) 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]; -- 2.46.1