[vtkusers] Converting a point on a vtkActor to an Image coordinate
Shaan Malik
shaanmalikother at gmail.com
Fri Dec 2 10:52:33 EST 2011
I've produced an actor from vtkMarchingCubes, which takes a vtkImageData
as input.
I want to be able to select the actor in a view and convert the selected
point on the actor to the corresponding point on the original image.
In order to get an actor position, I'm using a vtkPicker, but sometimes
clicking not on the actor, the picker returns what it thinks is a valid
point on the actor. At first I thought this was because the bounding box
the Picker uses wasn't a tight fit, but actually the points it returns
can fall outside the bounding box of the actor. This makes me assume
vtkPicker can't be used to reliably check if a position falls on the
actor or not?
The second stage would be to convert the actor position to a position on
the original image, but I'm not sure how to go about doing this.
I'm trying to implement a similar feature to what occurs in ITKSNAP,
where clicking on a segmentation changes the positions of the orthogonal
views.
Hope someone can help,
Thanks,
Shaan
More information about the vtkusers
mailing list