X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=vv%2FvvSlicerManager.cxx;h=1a9ad685f80e355b1fc105083e882b05156ad049;hb=4c7c440af01cab76e8a1c288aaa37da4ed0f10b0;hp=b1829e0a29223abb5b578e0932355276c9ab98c3;hpb=6bf969f3007e5d7e3a646be2d1df3f64ea5e5322;p=clitk.git diff --git a/vv/vvSlicerManager.cxx b/vv/vvSlicerManager.cxx index b1829e0..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; @@ -1710,7 +1710,7 @@ void vvSlicerManager::AddLandmark(float x,float y,float z,float t) y_index <= mSlicers[0]->GetInput()->GetWholeExtent()[3]+0.5 && z_index >= mSlicers[0]->GetInput()->GetWholeExtent()[4]-0.5 && z_index <= mSlicers[0]->GetInput()->GetWholeExtent()[5]+0.5) { - double value = this->GetScalarComponentAsDouble(mSlicers[0]->GetInput(), x_index, y_index, z_index); + double value = this->GetScalarComponentAsDouble(mSlicers[mSelectedSlicer]->GetInput(), x_index, y_index, z_index); //Value in selected Slicer (not 0): bug #2848 this->GetLandmarks()->AddLandmark(x,y,z,t,value); emit LandmarkAdded(); } @@ -1723,7 +1723,7 @@ void vvSlicerManager::AddLandmark(float x,float y,float z,float t) y_index <= extentImageReslice[3]+0.5 && z_index >= extentImageReslice[4]-0.5 && z_index <= extentImageReslice[5]+0.5) { - double value = this->GetScalarComponentAsDouble(mImage->GetVTKImages()[mSlicers[0]->GetTSlice()], x_index, y_index, z_index); + double value = this->GetScalarComponentAsDouble(mSlicers[mSelectedSlicer]->GetInput(), x_index, y_index, z_index); //Value in selected Slicer (not 0): bug #2848 this->GetLandmarks()->AddLandmark(x,y,z,t,value); emit LandmarkAdded(); } @@ -1744,7 +1744,7 @@ void vvSlicerManager::AddLandmarkProfile(float x,float y,float z,float t) y_index <= mSlicers[0]->GetInput()->GetWholeExtent()[3]+0.5 && z_index >= mSlicers[0]->GetInput()->GetWholeExtent()[4]-0.5 && z_index <= mSlicers[0]->GetInput()->GetWholeExtent()[5]+0.5) { - double value = this->GetScalarComponentAsDouble(mSlicers[0]->GetInput(), x_index, y_index, z_index); + double value = this->GetScalarComponentAsDouble(mSlicers[mSelectedSlicer]->GetInput(), x_index, y_index, z_index); //Value in selected Slicer (not 0): bug #2848 this->GetLandmarks()->AddLandmark(x,y,z,t,value); } #else @@ -1756,7 +1756,7 @@ void vvSlicerManager::AddLandmarkProfile(float x,float y,float z,float t) y_index <= extentImageReslice[3]+0.5 && z_index >= extentImageReslice[4]-0.5 && z_index <= extentImageReslice[5]+0.5) { - double value = this->GetScalarComponentAsDouble(mImage->GetVTKImages()[mSlicers[0]->GetTSlice()], x_index, y_index, z_index); + double value = this->GetScalarComponentAsDouble(mSlicers[mSelectedSlicer]->GetInput(), x_index, y_index, z_index); //Value in selected Slicer (not 0): bug #2848 this->GetLandmarks()->AddLandmark(x,y,z,t,value); } #endif