[vtkusers] intersection between the polydata and volume

Jothybasu Selvaraj jothybasu at gmail.com
Thu Apr 5 05:24:41 EDT 2012


I would suggest a different approach (much faster than the one you use now).

Use vtkPolydataToImageStencil to create a ImageStencil of your vtkPolydata
,then set it'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).

Jothy

On Thu, Apr 5, 2012 at 10:13 AM, qwcbeyond <340181048 at qq.com> wrote:

> Hi,Bill. Thanks for your response. I tried your method to determine whether
> the voxels in the polydata, but the only problem is  it's too  slow. I use
> the  volume data(512*512*2)  to test this method, it takes several minutes.
> If I use the 512*512*365 volume data,it will take me a long time.
>
> --
> View this message in context:
> http://vtk.1045678.n5.nabble.com/intersection-between-the-polydata-and-volume-tp5602792p5619885.html
> Sent from the VTK - Users mailing list archive at Nabble.com.
> _______________________________________________
> 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
>



-- 
Jothy
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20120405/bfce7bbc/attachment.htm>


More information about the vtkusers mailing list