[vtkusers] Find if a point is inside a mesh
David Doria
daviddoria at gmail.com
Wed Apr 18 12:31:54 EDT 2012
On Wed, Apr 18, 2012 at 12:17 PM, Claudia Ferreira <claudiasmf at gmail.com>wrote:
> Hi all,
>
> 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?
> 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).
>
> Any ideas? Shall I try to use ITK for this purpose?
>
> Thanks,
> Claudia
If I understand your problem correctly, you should be able to use this
directly:
http://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/PointInsideObject
David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20120418/1508ac92/attachment.htm>
More information about the vtkusers
mailing list