<div dir="ltr">I would suggest a different approach (much faster than the one you use now).<br><br>Use vtkPolydataToImageStencil to create a ImageStencil of your vtkPolydata ,then set it&#39;s output to vtkImageStencil. In vtkImageStencil ReverseStencilOff/On depending on what you want (inside of polydat or outside) then Setbackground to 0. Now you have a binarized volume.  Now using pointers you could rapidly find out whether a given point/ voxel is inside or outside. (bool values different for in or out on ReverseStencilOff/ON).<br>
<br>Jothy<br><br><div class="gmail_quote">On Thu, Apr 5, 2012 at 10:13 AM, qwcbeyond <span dir="ltr">&lt;<a href="mailto:340181048@qq.com">340181048@qq.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi,Bill. Thanks for your response. I tried your method to determine whether<br>
the voxels in the polydata, but the only problem is  it&#39;s too  slow. I use<br>
the  volume data(512*512*2)  to test this method, it takes several minutes.<br>
If I use the 512*512*365 volume data,it will take me a long time.<br>
<br>
--<br>
View this message in context: <a href="http://vtk.1045678.n5.nabble.com/intersection-between-the-polydata-and-volume-tp5602792p5619885.html" target="_blank">http://vtk.1045678.n5.nabble.com/intersection-between-the-polydata-and-volume-tp5602792p5619885.html</a><br>

Sent from the VTK - Users mailing list archive at Nabble.com.<br>
_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <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: <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>
</blockquote></div><br><br clear="all"><br>-- <br><div dir="ltr">Jothy<br></div><br>
</div>