- double value = this->GetScalarComponentAsDouble(this->GetInput(), X, Y, Z, ix, iy, iz);
-
- std::stringstream pixel1;
- std::stringstream pixel2;
- std::stringstream pixel3;
- std::stringstream temps;
- pixel1 << ix;
- pixel2 << iy;
- pixel3 << iz;
- temps << mCurrentTSlice;
-
- std::stringstream val;
- val << value;
- worldPos += "data value : " + val.str();
- worldPos += "\n mm : " + world1.str() + " " + world2.str() + " " +
- world3.str() + " " + temps.str();
- worldPos += "\n pixel : " + pixel1.str() + " " + pixel2.str() + " " +
- pixel3.str() + " " + temps.str();
+ double value = this->GetScalarComponentAsDouble(mImage->GetVTKImages()[mCurrentTSlice], X, Y, Z, ix, iy, iz);
+
+ if(ImageActor->GetVisibility())
+ worldPos << "data value : " << value << std::endl;
+
+ worldPos << "mm : " << lrint(mCurrentBeforeSlicingTransform[0]) << ' '
+ << lrint(mCurrentBeforeSlicingTransform[1]) << ' '
+ << lrint(mCurrentBeforeSlicingTransform[2]) << ' '
+ << mCurrentTSlice
+ << std::endl;
+ worldPos << "pixel : " << ix << ' '
+ << iy << ' '
+ << iz << ' '
+ << mCurrentTSlice
+ << std::endl;
+ }
+#else
+ if (X >= mImage->GetVTKImages()[mCurrentTSlice]->GetInformation()->Get(vtkDataObject::DATA_EXTENT())[0]-0.5 &&
+ X <= mImage->GetVTKImages()[mCurrentTSlice]->GetInformation()->Get(vtkDataObject::DATA_EXTENT())[1]+0.5 &&
+ Y >= mImage->GetVTKImages()[mCurrentTSlice]->GetInformation()->Get(vtkDataObject::DATA_EXTENT())[2]-0.5 &&
+ Y <= mImage->GetVTKImages()[mCurrentTSlice]->GetInformation()->Get(vtkDataObject::DATA_EXTENT())[3]+0.5 &&
+ Z >= mImage->GetVTKImages()[mCurrentTSlice]->GetInformation()->Get(vtkDataObject::DATA_EXTENT())[4]-0.5 &&
+ Z <= mImage->GetVTKImages()[mCurrentTSlice]->GetInformation()->Get(vtkDataObject::DATA_EXTENT())[5]+0.5) {
+
+ int ix, iy, iz;
+ double value = this->GetScalarComponentAsDouble(mImage->GetVTKImages()[mCurrentTSlice], X, Y, Z, ix, iy, iz);
+
+ if(ImageActor->GetVisibility())
+ worldPos << "data value : " << value << std::endl;
+
+ worldPos << "mm : " << lrint(mCurrentBeforeSlicingTransform[0]) << ' '
+ << lrint(mCurrentBeforeSlicingTransform[1]) << ' '
+ << lrint(mCurrentBeforeSlicingTransform[2]) << ' '
+ << mCurrentTSlice
+ << std::endl;
+ worldPos << "pixel : " << ix << ' '
+ << iy << ' '
+ << iz << ' '
+ << mCurrentTSlice
+ << std::endl;
+