[vtkusers] image coordinate pick update

Mark Wyszomierski markww at gmail.com
Wed Apr 6 12:42:04 EDT 2005


Hello,

I found out how to get the coordinates of a pick in my image window
which works fine with a 1 to 1 magnification ratio. Of course this is
a problem if the user scales the image window.

For example, the user magnifies my image by 3 times. Then they make a
pick at window coordinate (20, 45) - this no longer corresponds with
the actual (20, 45) of the actual image buffer. Is there any pick
class that can return the closest pixel in the view coordinates to
that window space? I see we have vtkPointPicker which gives the
closest point, and vtkCellPicker which returns the closest cell of a
polygon, but how about the closest pixel index?

Right now I have my volume in a raw vtkImageData buffer. Will any of
the existing pixel classes help me if I were to load my volume into a
vtkVoxel volume instead of leaving it raw?

Thanks,
Mark



More information about the vtkusers mailing list