[vtkusers] Rewirte vtkImageData
Yi-Yu Chou
chouyiyu at hotmail.com
Wed Aug 13 16:56:00 EDT 2003
Hi all,
I tried to rewrite the transformed image back into the original
vtkImageData, but
nothing happened after transform. ( the image was unchanged)
My code :
img_transform = vtkTransform()
img_transform.RotateX(-10)
img_reslice = vtkImageReslice()
img_reslice.SetInput(self.image)
img_reslice.SetOutputSpacing(img_reslice.GetInput().GetSpacing())
img_reslice.SetOutputOrigin(img_reslice.GetInput().GetOrigin())
img_reslice.SetOutputExtent(img_reslice.GetInput().GetWholeExtent())
img_reslice.SetResliceTransform(img_transform)
img_reslice.SetInterpolationModeToCubic()
img_reslice.Update()
# self.image = img_reslice.GetOutput() # doesn't work either
self.image.DeepCopy(img_reslice.GetOutput())
self.Update_Display() # update the scene
Any suggestions ?????
Thanks !!!!
YY
_________________________________________________________________
加入 MSN 社群:擁抱群眾、分享經驗、發現生活的樂趣
http://groups.msn.com?pgmarket=zh-tw
More information about the vtkusers
mailing list