Hi Mark:<br><br>Yes there is.<br><br>Please see the class itkImageToListGenerator . The class was written for reasons identical to the ones you have.<br><br>Specifically look for the methods <br> * SetMaskImage<br> * SetMaskValue
<br><br>The former method takes any spatial object as input. So you could use the itkImageMaskSpatialObject to create a spatial object out of your mask image and feed it in there.<br><br>Unlike an adaptor, this is a generator, as in, this class does not attempt to avoid replicating the memory, by providing a facade. There is the itk::Image and there is a seperate itk::ListSample. However access is far more efficient.
<br><br>Hope this helps.<br>Regards<br>--<br>karthik<br><br><div><span class="gmail_quote">On 10/30/07, <b class="gmail_sendername">Mark Bouts</b> <<a href="mailto:mark@invivonmr.uu.nl">mark@invivonmr.uu.nl</a>> wrote:
</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hi,<br><br>Is there a way of not including the background pixels in the conversion<br>
from Image to List types. I'm currently using a kD-tree for storing my<br>vector points after I have retrieved them from multiple images. When<br>processing this tree it takes considerable time since the background<br>
pixels are also processed for which there is no need. Is there a way of<br>making use of a mask or something similar when converting to the list?<br><br>Thanks!<br><br>Mark<br>_______________________________________________
<br>Insight-users mailing list<br><a href="mailto:Insight-users@itk.org">Insight-users@itk.org</a><br><a href="http://www.itk.org/mailman/listinfo/insight-users">http://www.itk.org/mailman/listinfo/insight-users</a><br></blockquote>
</div><br><br clear="all"><br>-- <br>Karthik Krishnan<br>R&D Engineer,<br>Kitware Inc.<br>Ph: 518 371 3971 x119<br> 518 698 3045 (cell)<br>Fax: 518 371 3971