<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Great thanks David.<div class=""><br class=""></div><div class="">Silly question, but where is gitlab?</div><div class=""><br class=""></div><div class="">Regards,</div><div class="">Richard</div><div class=""><br class=""><div><blockquote type="cite" class=""><div class="">On 19 Jan 2016, at 23:09, David Gobbi <<a href="mailto:david.gobbi@gmail.com" class="">david.gobbi@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div class="">Hi Rich,</div><div class=""><br class=""></div><div class="">The quick answer is no, there are no classes in VTK to do this.</div><div class=""><br class=""></div><div class="">However, I have a class of my own called vtkImageExtractVoxels that</div><div class="">almost does what you need: it creates a vtkDataArray that contains the</div><div class="">the values of all of the voxels in the stencil.  It would be trivial to modify</div><div class="">this class so it so that it gives all the IDs.</div><div class=""><br class=""></div><div class="">Coincidentally, just 5 minutes before I saw your email, I started editing</div><div class="">this class because I need it to give the (x,y,z) of all in-stencil voxels.</div><div class="">So I'll get it to produce the IDs as well, and then put it on gitlab if you</div><div class="">want to try it out.</div><div class=""><br class=""></div><div class=""> - David</div><div class="gmail_extra"><br class=""><div class="gmail_quote">On Tue, Jan 19, 2016 at 2:59 PM, mbcx9rb9 <span dir="ltr" class=""><<a href="mailto:richard.j.brown@live.co.uk" target="_blank" class="">richard.j.brown@live.co.uk</a>></span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi all,<br class="">
<br class="">
Is there any way to get a list containing the IDs of all voxels within a<br class="">
vtkImageStencilData?<br class="">
<br class="">
My method at the moment for getting all the voxels in the stencil is to<br class="">
create a vtkOBBTree and check if the centre of each voxel is inside the<br class="">
vtkPolyData related to the stencil, but this is very slow.<br class="">
<br class="">
Thanks in advance for any pointers,<br class="">
Rich<br class=""></blockquote></div></div></div>
</div></blockquote></div><br class=""></div></body></html>