]> Creatis software - clitk.git/commitdiff
Fix for bug #1881
authorSimon Rit <simon.rit@creatis.insa-lyon.fr>
Tue, 15 Jan 2013 13:35:30 +0000 (14:35 +0100)
committerSimon Rit <simon.rit@creatis.insa-lyon.fr>
Tue, 15 Jan 2013 13:35:30 +0000 (14:35 +0100)
vv/vvSlicer.cxx

index 1e1245f425b787523aeb69d7e9cf87c7086c851d..fd5240b29f06ad5931646559a3c7d9760cdb98b5 100644 (file)
@@ -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);