[vtkusers] slicing ploydata with plane
Edoardo Pasca
edo.paskino at gmail.com
Fri Oct 12 06:25:51 EDT 2018
dear all,
I am displaying a volume with an interactor style vtkInteractorStyleImage
. That means I'm looking at slices.
I'm overlaying a group of points in space as a polydata. The expected
behaviour would be to be able to see the points which are in the current
slice. The slice is updated by a MouseWheelForwardEvent and
MouseWheelBackwardEvent.
I attach a small drawing to clarify.
1) the drawing depicts a side view (say XZ). The camera is looking from the
top on the XY plane
2) the points I am talking about are the circles connected with line.
3) the slice I'm showing is 1 voxel thick, is colored in red and is at
Z_slice
4) in red are also the points I expect to see
If I display the polydata as is, I will see every point whose Z >= Z_slice,
as the one below the slice will be hidden by it. Therefore:
1) I use a vtkClipPolyData with a plane implicit function.
2) I added an observer to update the plane position on mouse wheel
back/forward events.
3) I attached the observers to the same callback.
4) the callback puts the plane at Z_slice
While the MouseWheelBackwardEvent works fine, the MouseWheelForwardEvent
does what I expect only if I shift the plane of +2 voxels in Z.
Do you have any explanation on why should I add that +2 voxel shift?
Thanks
Edo
--
Edo
I know you think you understand what you thought I said, but I'm not sure
you realize that what you heard is not what I meant (prob. Alan Greenspan)
:wq
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://public.kitware.com/pipermail/vtkusers/attachments/20181012/029e8018/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: slice.jpg
Type: image/jpeg
Size: 65335 bytes
Desc: not available
URL: <https://public.kitware.com/pipermail/vtkusers/attachments/20181012/029e8018/attachment.jpg>
More information about the vtkusers
mailing list