{ \r
// int view = mSlicers[slicer]->GetSliceOrientation();\r
// int slice = mSlicers[slicer]->GetSlice();\r
- double x = mSlicers[slicer]->GetCursorPosition()[0];\r
- double y = mSlicers[slicer]->GetCursorPosition()[1];\r
- double z = mSlicers[slicer]->GetCursorPosition()[2];\r
- double X = (x - mSlicers[slicer]->GetInput()->GetOrigin()[0])/\r
- mSlicers[slicer]->GetInput()->GetSpacing()[0];\r
- double Y = (y - mSlicers[slicer]->GetInput()->GetOrigin()[1])/\r
- mSlicers[slicer]->GetInput()->GetSpacing()[1];\r
- double Z = (z - mSlicers[slicer]->GetInput()->GetOrigin()[2])/\r
- mSlicers[slicer]->GetInput()->GetSpacing()[2];\r
+ double x = mSlicers[slicer]->GetCurrentPosition()[0];\r
+ double y = mSlicers[slicer]->GetCurrentPosition()[1];\r
+ double z = mSlicers[slicer]->GetCurrentPosition()[2];\r
double xyz[3], xyzTransform[3];\r
xyz[0] = x;\r
xyz[1] = y;\r
xyz[2] = z;\r
mSlicers[slicer]->GetSlicingTransform()->GetInverse()->TransformPoint(xyz, xyzTransform);\r
- double XTransform = (xyzTransform[0] - mSlicers[slicer]->GetInput()->GetOrigin()[0])/mSlicers[slicer]->GetInput()->GetSpacing()[0];\r
- double YTransform = (xyzTransform[1] - mSlicers[slicer]->GetInput()->GetOrigin()[1])/mSlicers[slicer]->GetInput()->GetSpacing()[1];\r
- double ZTransform = (xyzTransform[2] - mSlicers[slicer]->GetInput()->GetOrigin()[2])/mSlicers[slicer]->GetInput()->GetSpacing()[2];\r
+ double X = (xyzTransform[0] - mSlicers[slicer]->GetInput()->GetOrigin()[0])/mSlicers[slicer]->GetInput()->GetSpacing()[0];\r
+ double Y = (xyzTransform[1] - mSlicers[slicer]->GetInput()->GetOrigin()[1])/mSlicers[slicer]->GetInput()->GetSpacing()[1];\r
+ double Z = (xyzTransform[2] - mSlicers[slicer]->GetInput()->GetOrigin()[2])/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 (XTransform >= mSlicers[slicer]->GetInput()->GetWholeExtent()[0] -0.5 &&\r
- XTransform <= mSlicers[slicer]->GetInput()->GetWholeExtent()[1] +0.5 &&\r
- YTransform >= mSlicers[slicer]->GetInput()->GetWholeExtent()[2] -0.5 &&\r
- YTransform <= mSlicers[slicer]->GetInput()->GetWholeExtent()[3] +0.5 &&\r
- ZTransform >= mSlicers[slicer]->GetInput()->GetWholeExtent()[4] -0.5 &&\r
- ZTransform <= mSlicers[slicer]->GetInput()->GetWholeExtent()[5] +0.5)\r
+ if (X >= mSlicers[slicer]->GetInput()->GetWholeExtent()[0] -0.5 &&\r
+ X <= mSlicers[slicer]->GetInput()->GetWholeExtent()[1] +0.5 &&\r
+ Y >= mSlicers[slicer]->GetInput()->GetWholeExtent()[2] -0.5 &&\r
+ Y <= mSlicers[slicer]->GetInput()->GetWholeExtent()[3] +0.5 &&\r
+ Z >= mSlicers[slicer]->GetInput()->GetWholeExtent()[4] -0.5 &&\r
+ Z <= mSlicers[slicer]->GetInput()->GetWholeExtent()[5] +0.5)\r
#else\r
int extentImageReslice[6];\r
mSlicers[slicer]->GetRegisterExtent(extentImageReslice);\r
- if (XTransform >= extentImageReslice[0] -0.5 &&\r
- XTransform <= extentImageReslice[1] +0.5 &&\r
- YTransform >= extentImageReslice[2] -0.5 &&\r
- YTransform <= extentImageReslice[3] +0.5 &&\r
- ZTransform >= extentImageReslice[4] -0.5 &&\r
- ZTransform <= extentImageReslice[5] +0.5)\r
+ if (X >= extentImageReslice[0] -0.5 &&\r
+ X <= extentImageReslice[1] +0.5 &&\r
+ Y >= extentImageReslice[2] -0.5 &&\r
+ Y <= extentImageReslice[3] +0.5 &&\r
+ Z >= extentImageReslice[4] -0.5 &&\r
+ Z <= extentImageReslice[5] +0.5)\r
#endif\r
{\r
value = this->GetScalarComponentAsDouble(mSlicers[slicer]->GetInput(), X, Y, Z);\r
}\r
\r
emit UpdatePosition(mSlicers[slicer]->GetCursorVisibility(),\r
- x,y,z,XTransform,YTransform,ZTransform,value);\r
+ x,y,z,X,Y,Z,value);\r
emit UpdateVector(displayVec,xVec, yVec, zVec, valueVec);\r
emit UpdateOverlay(displayOver,valueOver,value);\r
emit UpdateFusion(displayFus,valueFus);\r