]> Creatis software - clitk.git/blobdiff - vv/vvSlicerManager.cxx
Debug LandmarkPanel
[clitk.git] / vv / vvSlicerManager.cxx
index b1829e0a29223abb5b578e0932355276c9ab98c3..75e37d6ef1721b7f448c7ce7604810de949ba1cc 100644 (file)
@@ -1710,7 +1710,7 @@ void vvSlicerManager::AddLandmark(float x,float y,float z,float t)
       y_index <= mSlicers[0]->GetInput()->GetWholeExtent()[3]+0.5 &&\r
       z_index >= mSlicers[0]->GetInput()->GetWholeExtent()[4]-0.5 &&\r
       z_index <= mSlicers[0]->GetInput()->GetWholeExtent()[5]+0.5) {\r
-    double value = this->GetScalarComponentAsDouble(mSlicers[0]->GetInput(), x_index, y_index, z_index);\r
+    double value = this->GetScalarComponentAsDouble(mSlicers[mSelectedSlicer]->GetInput(), x_index, y_index, z_index); //Value in selected Slicer (not 0): bug #2848\r
     this->GetLandmarks()->AddLandmark(x,y,z,t,value);\r
     emit LandmarkAdded();\r
   }\r
@@ -1723,7 +1723,7 @@ void vvSlicerManager::AddLandmark(float x,float y,float z,float t)
       y_index <= extentImageReslice[3]+0.5 &&\r
       z_index >= extentImageReslice[4]-0.5 &&\r
       z_index <= extentImageReslice[5]+0.5) {\r
-    double value = this->GetScalarComponentAsDouble(mImage->GetVTKImages()[mSlicers[0]->GetTSlice()], x_index, y_index, z_index);\r
+    double value = this->GetScalarComponentAsDouble(mSlicers[mSelectedSlicer]->GetInput(), x_index, y_index, z_index); //Value in selected Slicer (not 0): bug #2848\r
     this->GetLandmarks()->AddLandmark(x,y,z,t,value);\r
     emit LandmarkAdded();\r
   }\r
@@ -1744,7 +1744,7 @@ void vvSlicerManager::AddLandmarkProfile(float x,float y,float z,float t)
       y_index <= mSlicers[0]->GetInput()->GetWholeExtent()[3]+0.5 &&\r
       z_index >= mSlicers[0]->GetInput()->GetWholeExtent()[4]-0.5 &&\r
       z_index <= mSlicers[0]->GetInput()->GetWholeExtent()[5]+0.5) {\r
-    double value = this->GetScalarComponentAsDouble(mSlicers[0]->GetInput(), x_index, y_index, z_index);\r
+    double value = this->GetScalarComponentAsDouble(mSlicers[mSelectedSlicer]->GetInput(), x_index, y_index, z_index); //Value in selected Slicer (not 0): bug #2848\r
     this->GetLandmarks()->AddLandmark(x,y,z,t,value);\r
   }\r
 #else\r
@@ -1756,7 +1756,7 @@ void vvSlicerManager::AddLandmarkProfile(float x,float y,float z,float t)
       y_index <= extentImageReslice[3]+0.5 &&\r
       z_index >= extentImageReslice[4]-0.5 &&\r
       z_index <= extentImageReslice[5]+0.5) {\r
-    double value = this->GetScalarComponentAsDouble(mImage->GetVTKImages()[mSlicers[0]->GetTSlice()], x_index, y_index, z_index);\r
+    double value = this->GetScalarComponentAsDouble(mSlicers[mSelectedSlicer]->GetInput(), x_index, y_index, z_index); //Value in selected Slicer (not 0): bug #2848\r
     this->GetLandmarks()->AddLandmark(x,y,z,t,value);\r
   }\r
 #endif\r