<div class="gmail_quote">On Wed, Apr 18, 2012 at 12:17 PM, Claudia Ferreira <span dir="ltr"><<a href="mailto:claudiasmf@gmail.com">claudiasmf@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi all,<br><br>I created a triangle mesh using ITK (itk::BinaryMask3DMeshSource) and then converted it to a vtkPolyData since I needed to use ModifiedBSPTree for Line-Mesh intersection. Now, I need to check if several random points are inside or outside this closed mesh. Is there any method implemented in VTK to do this?<br>
This mesh can be very irregular, so I'm not confident that using IntersectWithLine for this purpose, being the first point the one I want to check and the second a very distant point, will be a good solution or a fast one (huge number of points to check).<br>
<br>Any ideas? Shall I try to use ITK for this purpose?<br><br>Thanks,<br>Claudia</blockquote><div><br></div><div>If I understand your problem correctly, you should be able to use this directly:</div><div><br></div><div>
<a href="http://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/PointInsideObject">http://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/PointInsideObject</a></div><div><br></div><div>David </div></div>