<br>Hi Christian,<br><br>Thanks for pointing this out and for offering to help with<br>improving the documentation.<br><br>One of the best forms of documentation is to add examples<br>on the use of the classes. So, once we have figured out the<br>
answers to the API questions that you posted here, the most<br>useful thing you could do is to craft several (basic) examples<br>and send them our way, so that we can add them to the<br>source code repository.<br><br>--<br>
<br>Regarding the API questions, Gaetan certainly will be the <br>best person to answer, but here is my guess:<br><br>1) The StatisticsLabelObject is intended to manage information<br> about the intensity values of pixels covered by every label.<br>
<br>2) The ShapeLabelObject is intended to manage information<br> about geometrical characteristics of the regions of pixels<br> that have the same label.<br><br>Regarding the difference between<br><br>StatisticsLabelObject::SetElongation()<br>
<br>and <br><br>ShapeLabelObject::SetBinaryElongation()<br><br><br>well... "Glimpsing at the Source leaves no doubt" :-)<br><br>if you open the file<br><br>Insight/Code/Review/itkStatisticsLabelMapFilter.txx<br>
<br>you will find in lines 263 and 299 that the elongation<br>is computed as<br><br> elongation = <br>vcl_sqrt(principalMoments[ImageDimension-1] / <br> principalMoments[ImageDimension-2]);<br><br>where the principalMoments were computed from<br>
the moments of pixel values that belong to the object.<br><br><br>While,<br>if you open <br><br>Insight/Code/Review/itkShapeLabelMapFilter.txx<br><br>you will find in lines 336 and 381 that the elongation<br>is computed as<br>
<br> elongation = <br>vcl_sqrt(<br> principalMoments[ImageDimension-1] / <br> principalMoments[ImageDimension-2]);<br><br>where the principalMoments were computed from<br>the moments of pixel positions. That is, withoutt<br>
taking into account the intensity values of the pixels.<br>In other words, all the pixels of the object are <br>contributing the same weight to the computation of<br>moments.<br><br><br> The power of Open Source, includes the Joy<br>
of understanding how the code works, just by<br> reading it and studying it. :-)<br><br><br>Please let us know if this answer your questions<br>about the differences in API between these two<br>classes.<br><br>
<br> Regards,<br><br><br> Luis<br><br><br>-------------------------------------------------------------------<br><div class="gmail_quote">On Wed, Apr 14, 2010 at 5:06 PM, Christian Werner <span dir="ltr"><<a href="mailto:christian.werner@rwth-aachen.de">christian.werner@rwth-aachen.de</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;">Hello!<br>
<br>
I am wondering why the StatisticsLabelObject has the exact same and additional information as the ShapeLabelObject. Doesn't this make the itkShapeLabelObject obsolete? Or maybe having both can speed up your software if you're interested only in the shape attributes.<br>
<br>
Well this is not so important, there is something else that's not clear to me. In the StatisticLabelObject I find such pairs of functions:<br>
<br>
GetBinaryElongation() and GetElongation(),<br>
GetBinaryFlatness() and GetFlatness(), ...<br>
<br>
How do they differ? Also, I find the paper explaining the handling of these libraries ("Label Object Representation and Manipulation in ITK") a bit outdated. Is there a newer version? If there is a demand I'd be happy to invest some time updating some sections, especially the example section where I am missing some typical applications (at least for what I am doing).<br>
<br>
Also, the doxygen documentation presents the StatisticsLabelMapFilter like this:<br>
itk::BinaryImageToStatisticsLabelMapFilter< TInputImage, TFeatureImage, TOutputImage > Class Template Reference<br>
<br>
Hmm... 2 Inputs. One of them a has features.(?) It is hard to understand which input has which purpose at first glance. The documentation shows an example that uses a mask as the TInputImage so maybe it would be a good idea to call it TMaskImage.<br>
<br>
Anyway, I have these classes implemented nicely into my software and I can't stress enough how glad I am that these ITK classes exist. I just wanted to point out that the documentation could use an update.<br>
<br>
<br>
Best regards,<br>
Christian<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>
</blockquote></div><br>