mSlicers[slicer]->GetInput()->GetSpacing()[1];\r
double Z = (z - mSlicers[slicer]->GetInput()->GetOrigin()[2])/\r
mSlicers[slicer]->GetInput()->GetSpacing()[2];\r
+ double xyz[3], xyzTransform[3];\r
+ xyz[0] = x;\r
+ xyz[1] = y;\r
+ xyz[2] = z;\r
+ mSlicers[slicer]->GetConcatenatedTransform()->TransformPoint(xyz, xyzTransform);\r
+ double XTransform = (xyzTransform[0] - mSlicers[slicer]->GetInput()->GetOrigin()[0])/\r
+ mSlicers[slicer]->GetInput()->GetSpacing()[0];\r
+ double YTransform = (xyzTransform[1] - mSlicers[slicer]->GetInput()->GetOrigin()[1])/\r
+ mSlicers[slicer]->GetInput()->GetSpacing()[1];\r
+ double ZTransform = (xyzTransform[2] - mSlicers[slicer]->GetInput()->GetOrigin()[2])/\r
+ mSlicers[slicer]->GetInput()->GetSpacing()[2];\r
double value = -VTK_DOUBLE_MAX;\r
int displayVec = 0;\r
double xVec=0, yVec=0, zVec=0, valueVec=0;\r
int displayFus = 0;\r
double valueOver=0, valueFus=0;\r
#if VTK_MAJOR_VERSION <= 5\r
- if (X >= mSlicers[slicer]->GetInput()->GetWholeExtent()[0] &&\r
- X <= mSlicers[slicer]->GetInput()->GetWholeExtent()[1] &&\r
- Y >= mSlicers[slicer]->GetInput()->GetWholeExtent()[2] &&\r
- Y <= mSlicers[slicer]->GetInput()->GetWholeExtent()[3] &&\r
- Z >= mSlicers[slicer]->GetInput()->GetWholeExtent()[4] &&\r
- Z <= mSlicers[slicer]->GetInput()->GetWholeExtent()[5]) {\r
+ if (XTransform >= mSlicers[slicer]->GetInput()->GetWholeExtent()[0] &&\r
+ XTransform <= mSlicers[slicer]->GetInput()->GetWholeExtent()[1] &&\r
+ YTransform >= mSlicers[slicer]->GetInput()->GetWholeExtent()[2] &&\r
+ YTransform <= mSlicers[slicer]->GetInput()->GetWholeExtent()[3] &&\r
+ ZTransform >= mSlicers[slicer]->GetInput()->GetWholeExtent()[4] &&\r
+ ZTransform <= mSlicers[slicer]->GetInput()->GetWholeExtent()[5]) {\r
\r
value = this->GetScalarComponentAsDouble(mSlicers[slicer]->GetInput(), X, Y, Z);\r
\r
}\r
\r
emit UpdatePosition(mSlicers[slicer]->GetCursorVisibility(),\r
- x,y,z,X,Y,Z,value);\r
+ x,y,z,XTransform,YTransform,ZTransform,value);\r
emit UpdateVector(displayVec,xVec, yVec, zVec, valueVec);\r
emit UpdateOverlay(displayOver,valueOver,value);\r
emit UpdateFusion(displayFus,valueFus);\r
#else\r
int extentImageReslice[6];\r
mSlicers[slicer]->GetRegisterExtent(extentImageReslice);\r
- if (X >= extentImageReslice[0] &&\r
- X <= extentImageReslice[1] &&\r
- Y >= extentImageReslice[2] &&\r
- Y <= extentImageReslice[3] &&\r
- Z >= extentImageReslice[4] &&\r
- Z <= extentImageReslice[5]) {\r
+ if (XTransform >= extentImageReslice[0] &&\r
+ XTransform <= extentImageReslice[1] &&\r
+ YTransform >= extentImageReslice[2] &&\r
+ YTransform <= extentImageReslice[3] &&\r
+ ZTransform >= extentImageReslice[4] &&\r
+ ZTransform <= extentImageReslice[5]) {\r
\r
value = this->GetScalarComponentAsDouble(mSlicers[slicer]->GetInput(), X, Y, Z);\r
\r
}\r
\r
emit UpdatePosition(mSlicers[slicer]->GetCursorVisibility(),\r
- x,y,z,X,Y,Z,value);\r
+ x,y,z,XTransform,YTransform,ZTransform,value);\r
emit UpdateVector(displayVec,xVec, yVec, zVec, valueVec);\r
emit UpdateOverlay(displayOver,valueOver,value);\r
emit UpdateFusion(displayFus,valueFus);\r