<div dir="ltr">Hi Cory,<div><br></div><div>Thank you very much for your reply.</div><div style>However, I'm not sure to understand what you mean.</div><div style>Should I create a new polydata with all points at the same z coordinates ?</div>
<div style><br></div><div style>Does this work with some oblique planes ( not parallel to x,y, or z axis ) ?</div><div style><br></div><div style>Thank you.</div><div style>-Laurent</div></div><div class="gmail_extra"><br>
<br><div class="gmail_quote">On Sun, Jun 23, 2013 at 12:31 PM, Cory Quammen <span dir="ltr"><<a href="mailto:cquammen@cs.unc.edu" target="_blank">cquammen@cs.unc.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Laurent,<br>
<br>
For this special case of computing the intersection between a polydata<br>
and a plane, you can use a little trick. First, you can compute a new<br>
point data set for your polydata with,say, the z coordinates of each<br>
point in the polydata. Then, to get the intersection with an xy plane,<br>
you then use the vtkContourFilter operating on this coordinate point<br>
data and specify the z value that corresponds to your plane. The<br>
result should be equivalent to the intersection of the polydata with<br>
that plane.<br>
<br>
It should be relatively fast to compute the contour, so you can<br>
probably do this interactively.<br>
<br>
Hope that helps,<br>
Cory<br>
<div><div class="h5"><br>
On Sat, Jun 22, 2013 at 2:46 PM, Laurent Chauvin<br>
<<a href="mailto:lchauvin@bwh.harvard.edu">lchauvin@bwh.harvard.edu</a>> wrote:<br>
> Hello,<br>
><br>
> I'm working on Slicer, and I was trying to find a nice way to display<br>
> intersection between polydata and a plane.<br>
> I read we could use a vtkCutter, but the thing is, I would like to do this<br>
> interactively. I want to be able to move the plane, and update the<br>
> intersection while moving the plane.<br>
> I'm not sure using vtkCutter for this purpose would work. I think vtkCutter<br>
> will take some times to execute, then moving the plane will be slow.<br>
><br>
> I know this question has been asked before, but I would like if there were<br>
> some update since then. New widgets or object that I could use for that ?<br>
><br>
> I was thinking using vtkImageReslice, get polydata of the plane and compute<br>
> the intersection between the 2 polydata, but I think it would also be to<br>
> computing intensive to be able to do it smoothly with an interactive plane.<br>
><br>
> Thank you.<br>
> -Laurent<br>
><br>
><br>
><br>
><br>
</div></div>> _______________________________________________<br>
> Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
><br>
> Visit other Kitware open-source projects at<br>
> <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
><br>
> Please keep messages on-topic and check the VTK FAQ at:<br>
> <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
><br>
> Follow this link to subscribe/unsubscribe:<br>
> <a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
><br>
<span class="HOEnZb"><font color="#888888"><br>
<br>
<br>
--<br>
Cory Quammen<br>
Research Associate<br>
Department of Computer Science<br>
The University of North Carolina at Chapel Hill<br>
</font></span></blockquote></div><br><br clear="all"><div><br></div>-- <br><div>Laurent Chauvin, MS</div><div>Surgical Navigation and Robotics Laboratory, Radiology</div><div>Brigham And Women's Hospital, Harvard Medical School<br>
</div><div><a href="http://wiki.ncigt.org/index.php/User:Lchauvin" target="_blank">http://wiki.ncigt.org/index.php/User:Lchauvin</a></div>
</div>