[vtkusers] Get IDs within vtkImageStencilData
David Gobbi
david.gobbi at gmail.com
Tue Jan 19 17:09:49 EST 2016
Hi Rich,
The quick answer is no, there are no classes in VTK to do this.
However, I have a class of my own called vtkImageExtractVoxels that
almost does what you need: it creates a vtkDataArray that contains the
the values of all of the voxels in the stencil. It would be trivial to
modify
this class so it so that it gives all the IDs.
Coincidentally, just 5 minutes before I saw your email, I started editing
this class because I need it to give the (x,y,z) of all in-stencil voxels.
So I'll get it to produce the IDs as well, and then put it on gitlab if you
want to try it out.
- David
On Tue, Jan 19, 2016 at 2:59 PM, mbcx9rb9 <richard.j.brown at live.co.uk>
wrote:
> Hi all,
>
> Is there any way to get a list containing the IDs of all voxels within a
> vtkImageStencilData?
>
> My method at the moment for getting all the voxels in the stencil is to
> create a vtkOBBTree and check if the centre of each voxel is inside the
> vtkPolyData related to the stencil, but this is very slow.
>
> Thanks in advance for any pointers,
> Rich
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20160119/15a19b8e/attachment.html>
More information about the vtkusers
mailing list