From 2b8e7f1fda772413d48a86b172c7910dd9677205 Mon Sep 17 00:00:00 2001 From: tbaudier Date: Mon, 22 Feb 2016 15:44:58 +0100 Subject: [PATCH] Consistency of information between Info Pannel and Cursor Position Overlay Now the position is correct (in voxel) event with an anistropic image --- vv/vvSlicerManager.cxx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/vv/vvSlicerManager.cxx b/vv/vvSlicerManager.cxx index 75e37d6..1a9ad68 100644 --- a/vv/vvSlicerManager.cxx +++ b/vv/vvSlicerManager.cxx @@ -1176,12 +1176,12 @@ void vvSlicerManager::UpdateInfoOnCursorPosition(int slicer) xyz[1] = y; xyz[2] = z; mSlicers[slicer]->GetConcatenatedTransform()->TransformPoint(xyz, xyzTransform); - double XTransform = (xyzTransform[0] - mSlicers[slicer]->GetInput()->GetOrigin()[0])/ - mSlicers[slicer]->GetInput()->GetSpacing()[0]; - double YTransform = (xyzTransform[1] - mSlicers[slicer]->GetInput()->GetOrigin()[1])/ - mSlicers[slicer]->GetInput()->GetSpacing()[1]; - double ZTransform = (xyzTransform[2] - mSlicers[slicer]->GetInput()->GetOrigin()[2])/ - mSlicers[slicer]->GetInput()->GetSpacing()[2]; + double XTransform = (xyzTransform[0] - mSlicers[slicer]->GetImage()->GetVTKImages()[GetTSlice()]->GetOrigin()[0])/ + mSlicers[slicer]->GetImage()->GetVTKImages()[GetTSlice()]->GetSpacing()[0]; + double YTransform = (xyzTransform[1] - mSlicers[slicer]->GetImage()->GetVTKImages()[GetTSlice()]->GetOrigin()[1])/ + mSlicers[slicer]->GetImage()->GetVTKImages()[GetTSlice()]->GetSpacing()[1]; + double ZTransform = (xyzTransform[2] - mSlicers[slicer]->GetImage()->GetVTKImages()[GetTSlice()]->GetOrigin()[2])/ + mSlicers[slicer]->GetImage()->GetVTKImages()[GetTSlice()]->GetSpacing()[2]; double value = -VTK_DOUBLE_MAX; int displayVec = 0; double xVec=0, yVec=0, zVec=0, valueVec=0; -- 2.47.1