From: tbaudier Date: Mon, 22 Feb 2016 14:44:58 +0000 (+0100) Subject: Consistency of information between Info Pannel and Cursor Position Overlay X-Git-Tag: v1.4.0~49 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=2b8e7f1fda772413d48a86b172c7910dd9677205;p=clitk.git Consistency of information between Info Pannel and Cursor Position Overlay Now the position is correct (in voxel) event with an anistropic image --- 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;