<div dir="ltr">Hi,<br><br>I wanted to rotate the vtkImageData and I am using vtkTransform to do that. But how to rotate around the Image centre. I get the Image centre from vtkImagedata.GetCenter() method. But when I view the image it seems to be shifted.Here is the code<br>
<br>xform=vtk.vtkTransform()<br>xform.PostMultiply()<br>#xform.RotateWXYZ(10,218.0732421875, 218.0732421875, 158.75)<br>x,y,z=Image.GetCenter<br>xform.RotateWXYZ(50,x,y,z)# rotate 50 degs <br>res=vtk.vtkImageReslice()<br>
res.SetInput(Image.GetOutput())<br>res.SetInformationInput(Image.GetOutput())<br>res.SetResliceTransform(xform)<br>res.SetInterpolationModeToLinear()<br>res.Update()<br><br>Whats wrong??<br><br>Thanks<br><br>Jothy<br></div>