]> Creatis software - clitk.git/commitdiff
Consistency of information between Info Pannel and Cursor Position Overlay
authortbaudier <thomas.baudier@creatis.insa-lyon.fr>
Mon, 22 Feb 2016 14:44:58 +0000 (15:44 +0100)
committertbaudier <thomas.baudier@creatis.insa-lyon.fr>
Mon, 22 Feb 2016 14:44:58 +0000 (15:44 +0100)
Now the position is correct (in voxel) event with an anistropic image

vv/vvSlicerManager.cxx

index 75e37d6ef1721b7f448c7ce7604810de949ba1cc..1a9ad685f80e355b1fc105083e882b05156ad049 100644 (file)
@@ -1176,12 +1176,12 @@ void vvSlicerManager::UpdateInfoOnCursorPosition(int slicer)
   xyz[1] = y;\r
   xyz[2] = z;\r
   mSlicers[slicer]->GetConcatenatedTransform()->TransformPoint(xyz, xyzTransform);\r
-  double XTransform = (xyzTransform[0] - mSlicers[slicer]->GetInput()->GetOrigin()[0])/\r
-    mSlicers[slicer]->GetInput()->GetSpacing()[0];\r
-  double YTransform = (xyzTransform[1] - mSlicers[slicer]->GetInput()->GetOrigin()[1])/\r
-    mSlicers[slicer]->GetInput()->GetSpacing()[1];\r
-  double ZTransform = (xyzTransform[2] - mSlicers[slicer]->GetInput()->GetOrigin()[2])/\r
-    mSlicers[slicer]->GetInput()->GetSpacing()[2];\r
+  double XTransform = (xyzTransform[0] - mSlicers[slicer]->GetImage()->GetVTKImages()[GetTSlice()]->GetOrigin()[0])/\r
+    mSlicers[slicer]->GetImage()->GetVTKImages()[GetTSlice()]->GetSpacing()[0];\r
+  double YTransform = (xyzTransform[1] - mSlicers[slicer]->GetImage()->GetVTKImages()[GetTSlice()]->GetOrigin()[1])/\r
+    mSlicers[slicer]->GetImage()->GetVTKImages()[GetTSlice()]->GetSpacing()[1];\r
+  double ZTransform = (xyzTransform[2] - mSlicers[slicer]->GetImage()->GetVTKImages()[GetTSlice()]->GetOrigin()[2])/\r
+    mSlicers[slicer]->GetImage()->GetVTKImages()[GetTSlice()]->GetSpacing()[2];\r
   double value = -VTK_DOUBLE_MAX;\r
   int displayVec = 0;\r
   double xVec=0, yVec=0, zVec=0, valueVec=0;\r