Hi David,<br><br>As we discussed during the tcon, there are (at least) two ways of<br>doing this.<br><br>A) In your filter you can keep a helper image of pixel type unsigned<br> char, of the same size as the output image. Every time that you<br>
accept a pixel in the region growing process you mark this pixel<br> in this helper image, and of course, you avoid adding any pixel<br> that is already marked.<br><br>or<br><br>B) The FloodFilled iterator happens to already do (A) internally.<br>
You could therefore modify this iterator in order to expose<br> the internal mask so that you can copy it, or you could add<br> a boolean to the iterator in order to enable / disable the<br> process of clearing up the mask.<br>
<br> The pointer to this mask image is:<br><br> m_TemporaryPointer<br> <br> and it is declared in <br><br> Insight/Code/Common/<br> itkFloodFilledFunctionConditionalConstIterator.h<br>
<br> The image is cleared up in <br><br>
Insight/Code/Common/<br>
itkFloodFilledFunctionConditionalConstIterator.txx<br>
<br> in the method InitializeIterator() in line 87:<br><br> m_TemporaryPointer->FillBuffer(NumericTraits<ITK_TYPENAME TTempImage::PixelType>::Zero);<br><br><br><br> Regards,<br><br><br> Luis<br><br>
<br>-------------------------------------------<br><div class="gmail_quote">On Wed, Aug 5, 2009 at 11:52 AM, David Doria <span dir="ltr"><<a href="mailto:daviddoria%2Bitk@gmail.com">daviddoria+itk@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">I'm implementing an algorithm that uses region growing to find a connected region of an image and label it, say, Region A. It should then "throw away" Region A so the next iteration (another region growing) cannot grow into the Region A. If the image is though of as a graph, this "throw away" operation would be equivalent to deleting the edges in the graph that connect vertices in Region A. Is this possible in ITK?<br>
<br clear="all">Thanks,<br><font color="#888888"><br>David<br>
</font><br>_____________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at<br>
<a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the ITK FAQ at: <a href="http://www.itk.org/Wiki/ITK_FAQ" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.itk.org/mailman/listinfo/insight-users" target="_blank">http://www.itk.org/mailman/listinfo/insight-users</a><br>
<br></blockquote></div><br>