[vtkusers] Picking in vtkImagePlaneWidget and getting IJK volume point

fblupi fboli94 at gmail.com
Tue Mar 28 06:58:29 EDT 2017


I'm trying to get the IJK coordinates of a voxel from a volume that I pick
from the slice obtained with a vtkImagePlaneWidget (using GetResliceOutput
method).

I know I can get the coordinates of that slice using a cell Picker:


vtkSmartPointer<vtkCellPicker> picker =
vtkSmartPointer<vtkCellPicker>::New();
picker->SetTolerance(0.0005);

int* pos = this->GetInteractor()->GetEventPosition();
picker->Pick(pos[0], pos[1], pos[2], this->GetDefaultRenderer());

int* ijk = picker->GetPointIJK();


But the IJK point obtained is in the slice coordinates so K is always 0.

I would like to get the IJK coordinates of the point picked in the volume
coordinates as I could make using the vtkVolumePicker in a 3D viewer.

Thanks in advance.



--
View this message in context: http://vtk.1045678.n5.nabble.com/Picking-in-vtkImagePlaneWidget-and-getting-IJK-volume-point-tp5742643.html
Sent from the VTK - Users mailing list archive at Nabble.com.


More information about the vtkusers mailing list