From e47bde8ac7d00b8980bf04fb60aa7925e5c42bfa Mon Sep 17 00:00:00 2001 From: Simon Rit Date: Tue, 15 Jan 2013 14:35:30 +0100 Subject: [PATCH] Fix for bug #1881 --- vv/vvSlicer.cxx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/vv/vvSlicer.cxx b/vv/vvSlicer.cxx index 1e1245f..fd5240b 100644 --- a/vv/vvSlicer.cxx +++ b/vv/vvSlicer.cxx @@ -1396,12 +1396,12 @@ void vvSlicer::Render() double yCursor = (y - this->GetInput()->GetOrigin()[1])/this->GetInput()->GetSpacing()[1]; double zCursor = (z - this->GetInput()->GetOrigin()[2])/this->GetInput()->GetSpacing()[2]; - if (xCursor >= this->GetImageActor()->GetDisplayExtent()[0] && - xCursor < this->GetImageActor()->GetDisplayExtent()[1]+1 && - yCursor >= this->GetImageActor()->GetDisplayExtent()[2] && - yCursor < this->GetImageActor()->GetDisplayExtent()[3]+1 && - zCursor >= this->GetImageActor()->GetDisplayExtent()[4] && - zCursor < this->GetImageActor()->GetDisplayExtent()[5]+1 ) { + if (xCursor >= this->GetImageActor()->GetDisplayExtent()[0]-0.5 && + xCursor < this->GetImageActor()->GetDisplayExtent()[1]+0.5 && + yCursor >= this->GetImageActor()->GetDisplayExtent()[2]-0.5 && + yCursor < this->GetImageActor()->GetDisplayExtent()[3]+0.5 && + zCursor >= this->GetImageActor()->GetDisplayExtent()[4]-0.5 && + zCursor < this->GetImageActor()->GetDisplayExtent()[5]+0.5 ) { vtkRenderer * renderer = this->Renderer; renderer->WorldToView(x,y,z); -- 2.47.1