Hi
I Get World Position With vtkWorldPointPicker Its Work When Have not Rotate image Data but When I Rotate VtkImageData its wrong working its my code Rotate And Method To Get Mouse position
Method I get world position
int[] eventPos = Renderer.GetRenderWindow().GetInteractor().GetEventPosition();
vtkWorldPointPicker cellPicker =
vtkWorldPointPicker.New();
cellPicker.Pick(eventPos[0] , eventPos[1] , 0 , Renderer);
double[] worldPosition = cellPicker.GetPickPosition();
Method I Rotate image Data
vtkImageSlice imageSlice = new();
double[] c = reader.GetCenter();
imageSlice.SetPosition(c[0], c[1], c[2]);
imageSlice.RotateZ(angle);
imageSlice.ComputeMatrix();
imageSlice.Update();
vtkMatrix4x4 matrix = imageSlice.GetMatrix();
vtkImageReslice reslice = new();
reslice.SetInputData(reader);
reslice.SetResliceAxes(matrix);
reslice.SetInterpolationModeToCubic();
reslice.Update();
return reslice;
pixel position of
image Without Chagne Rotate
Image With Rotate
Also When I rotate Image Data Position That Changing
Thank you if you help me