[vtkusers] Get IDs within vtkImageStencilData

Richard Brown richard.j.brown at live.co.uk
Wed Jan 20 11:10:09 EST 2016


Great thanks David.

Silly question, but where is gitlab?

Regards,
Richard

> On 19 Jan 2016, at 23:09, David Gobbi <david.gobbi at gmail.com> wrote:
> 
> 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 <mailto: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/20160120/b04ada92/attachment.html>


More information about the vtkusers mailing list