[vtkusers] Plane polydata intersection
Cory Quammen
cquammen at cs.unc.edu
Sun Jun 23 12:31:56 EDT 2013
Laurent,
For this special case of computing the intersection between a polydata
and a plane, you can use a little trick. First, you can compute a new
point data set for your polydata with,say, the z coordinates of each
point in the polydata. Then, to get the intersection with an xy plane,
you then use the vtkContourFilter operating on this coordinate point
data and specify the z value that corresponds to your plane. The
result should be equivalent to the intersection of the polydata with
that plane.
It should be relatively fast to compute the contour, so you can
probably do this interactively.
Hope that helps,
Cory
On Sat, Jun 22, 2013 at 2:46 PM, Laurent Chauvin
<lchauvin at bwh.harvard.edu> wrote:
> Hello,
>
> I'm working on Slicer, and I was trying to find a nice way to display
> intersection between polydata and a plane.
> I read we could use a vtkCutter, but the thing is, I would like to do this
> interactively. I want to be able to move the plane, and update the
> intersection while moving the plane.
> I'm not sure using vtkCutter for this purpose would work. I think vtkCutter
> will take some times to execute, then moving the plane will be slow.
>
> I know this question has been asked before, but I would like if there were
> some update since then. New widgets or object that I could use for that ?
>
> I was thinking using vtkImageReslice, get polydata of the plane and compute
> the intersection between the 2 polydata, but I think it would also be to
> computing intensive to be able to do it smoothly with an interactive plane.
>
> Thank you.
> -Laurent
>
>
>
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
--
Cory Quammen
Research Associate
Department of Computer Science
The University of North Carolina at Chapel Hill
More information about the vtkusers
mailing list