In addition to what Nicholas said, label manipulation in ITK is explained in this insight journal article:<div><br></div><div><a href="http://www.insight-journal.org/browse/publication/176">http://www.insight-journal.org/browse/publication/176</a></div>
<div><br></div><div><a href="http://www.insight-journal.org/browse/publication/176"></a>(those filters are now part of the standard ITK package)</div><div><br></div><div>regards</div><div><br><div class="gmail_quote">On Wed, Dec 8, 2010 at 8:41 PM, Nicholas Tustison <span dir="ltr"><<a href="mailto:ntustison@gmail.com">ntustison@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Hi Neal,<br>
<br>
Would this help?<br>
<br>
<a href="http://www.insight-journal.org/browse/publication/707" target="_blank">http://www.insight-journal.org/browse/publication/707</a><br>
<br>
Nick<br>
<div><div></div><div class="h5"><br>
On Dec 8, 2010, at 2:22 PM, Neal R. Harvey wrote:<br>
<br>
> I am trying to write some code with which I can efficiently compare segmentation results with<br>
> a known ground truth. There are several papers that describe interesting metrics for doing this.<br>
> A common theme is finding intersection between segments.<br>
> There seems to be most of the functionality within ITK for doing this, but I haven't been able to<br>
> figure out how to do it effectively/efficiently.<br>
> I want to be able to go through each region in a segmented image (i.e. the pixels that have the same<br>
> value "i" in that image) and calculate the number of pixels within that region that intersect with<br>
> each region in a ground truth image (i.e. the pixels that have the same value "j" in that image).<br>
> I don't want to have to go through every pixel in the image and test to see if it is value "i"<br>
> or "j", but want to have some way of limiting my processing to only those pixels that have the<br>
> required values.<br>
> I am sure that this should be possible within ITK, I just haven't been able to figure it out.<br>
> If anyone has any suggestions, it would be very much appreciated.<br>
><br>
> Cheers<br>
><br>
> Harve<br>
><br>
> --<br>
> HARVE (Neal R. Harvey) Email: <a href="mailto:harve@lanl.gov">harve@lanl.gov</a><br>
> ISR-2 Phone: 505 667 9077<br>
> Los Alamos National Laboratory Fax: 505 664 0362<br>
> Los Alamos, NM 87545, USA Mail Stop: D-436<br>
> The generation of random numbers is too important to be left to chance.<br>
><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>
> Kitware offers ITK Training Courses, for more information visit:<br>
> <a href="http://www.kitware.com/products/protraining.html" target="_blank">http://www.kitware.com/products/protraining.html</a><br>
><br>
> Please keep messages on-topic and check the ITK FAQ at:<br>
> <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>
_____________________________________<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>
Kitware offers ITK Training Courses, for more information visit:<br>
<a href="http://www.kitware.com/products/protraining.html" target="_blank">http://www.kitware.com/products/protraining.html</a><br>
<br>
Please keep messages on-topic and check the ITK FAQ at:<br>
<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>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Sergio Vera<br><br> Alma IT Systems<br> C/ Vilana, 4B, 4º 1ª<br> 08022 Barcelona<br> T. (+34) 932 380 592<br> <a href="http://www.alma3d.com">www.alma3d.com</a><br>
</div>