[vtkusers] Plane polydata intersection

Laurent Chauvin lchauvin at bwh.harvard.edu
Sun Jun 23 12:41:39 EDT 2013


Hi Cory,

Thank you very much for your reply.
However, I'm not sure to understand what you mean.
Should I create a new polydata with all points at the same z coordinates ?

Does this work with some oblique planes ( not parallel to x,y, or z axis ) ?

Thank you.
-Laurent


On Sun, Jun 23, 2013 at 12:31 PM, Cory Quammen <cquammen at cs.unc.edu> wrote:

> 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
>



-- 
Laurent Chauvin, MS
Surgical Navigation and Robotics Laboratory, Radiology
Brigham And Women's Hospital, Harvard Medical School
http://wiki.ncigt.org/index.php/User:Lchauvin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20130623/42b4458e/attachment.htm>


More information about the vtkusers mailing list