+//----------------------------------------------------------------------------\r
+void vvSlicerManager::AddLandmarkProfile(float x,float y,float z,float t)\r
+{ \r
+ double x_index = (x - mSlicers[0]->GetInput()->GetOrigin()[0])/mSlicers[0]->GetInput()->GetSpacing()[0];\r
+ double y_index = (y - mSlicers[0]->GetInput()->GetOrigin()[1])/mSlicers[0]->GetInput()->GetSpacing()[1];\r
+ double z_index = (z - mSlicers[0]->GetInput()->GetOrigin()[2])/mSlicers[0]->GetInput()->GetSpacing()[2];\r
+#if VTK_MAJOR_VERSION <= 5\r
+ if (x_index >= mSlicers[0]->GetInput()->GetWholeExtent()[0]-0.5 &&\r
+ x_index <= mSlicers[0]->GetInput()->GetWholeExtent()[1]+0.5 &&\r
+ y_index >= mSlicers[0]->GetInput()->GetWholeExtent()[2]-0.5 &&\r
+ 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
+#else\r
+ int extentImageReslice[6];\r
+ mSlicers[0]->GetRegisterExtent(extentImageReslice);\r
+ if (x_index >= extentImageReslice[0]-0.5 &&\r
+ x_index <= extentImageReslice[1]+0.5 &&\r
+ y_index >= extentImageReslice[2]-0.5 &&\r
+ y_index <= extentImageReslice[3]+0.5 &&\r
+ z_index >= extentImageReslice[4]-0.5 &&\r
+ z_index <= extentImageReslice[5]+0.5)\r
+#endif\r
+ {\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
+}\r
+//----------------------------------------------------------------------------\r
+\r