[vtkusers] vtkImagePlaneWidget: interpolated cursor position
John Hunter
jdhunter at ace.bsd.uchicago.edu
Thu Jan 8 19:21:19 EST 2004
>>>>> "David" == David Gobbi <dgobbi at imaging.robarts.ca> writes:
David> Hi John, There is a way to do this indirectly by using
David> vtkImageReslice to interpolate a single voxel from the data
David> set:
Hi David -- thanks for the response. Sorry to be dense here, but it's
not clear to me what x, y, z are in your example
reslice = vtkImageReslice()
reslice.SetInput(data)
reslice.SetInterpolationModeToLinear()
reslice.SetOutputOrigin(x,y,z)
reslice.GetOutput().SetUpdateExtent(0,0,0,0,0,0)
reslice.GetOutput().Update()
value = reslice.GetOutput().GetScalarComponentAsFloat()
I have ready access to the x, y display coords of the pointer in the
viewport, and the x,y,z coords of the vtkImagePlaneWidget cursor. But
the latter are voxelated. What in your example above provides the
information to interpolate within the voxel?
Could you elucidate?
Thanks,
John Hunter
More information about the vtkusers
mailing list