[vtkusers] Point picking on orthogonal planes
Rashed Karim
rashed.karim at gmail.com
Wed Aug 2 00:30:27 EDT 2006
Hi everyone,
I have 3 orthogonal views through a volume, and using the
Medical3.cxxexample to do this. I have 3 vtkImageActors which display
the three
orthogonal x, y and z slices. Here is some code for the z slice:
vtkImageMapToColors *sliceZColors;
sliceZColors = vtkImageMapToColors::New();
sliceZColors->SetInput(gipl_image);
sliceZColors->SetLookupTable(bwLut);
vtkImageActor *zSlice = vtkImageActor::New();
zSlice->SetInput(sliceZColors->GetOutput());
zSlice->SetDisplayExtent(0, maxX-1, 0, maxY-1, zPos, zPos);
Now the problem is when I am trying to pick a point on the slices using a
vtkPointPicker, the GetPointId( ) functions returns a -1 indicating that no
point was picked. The point picker code is the usual stuff, I create a
picker, set its tolerance, create its callback, add the observer and then
set the picker for the window Interactor. The callback gets called fine when
i press 'p', but picker returns a -1 for point id.
Does anyone have any idea why the picker would return a -1 for point id when
points are picked on a vtkImageActor displaying slices through a volume??
Has anyone tried picking a point on such orthogonal slices through a volume?
Any help will be appreciated,
--
Thanks,
Rashed karim
Imperial college London
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20060802/137c70ee/attachment.htm>
More information about the vtkusers
mailing list