[Insight-users] StatisticsLabelObject

Christian Werner christian.werner at rwth-aachen.de
Fri Apr 16 04:08:08 EDT 2010


Thank you, Luis. Looking at the source code is a good point! I have done 
this before but this time I somehow didn't take this into consideration 
and sticked to the documentation where some things are actually missing. 
It still might be a good idea to do some updates there. I am pretty sure 
that in the future, many people will at first stick to the documentation 
to get an idea of how to do their image analysis. These classes are so 
powerful and valuable that they deserve a decent, up-to-date, 
documentation. I still have the "outdated" documentation printed out on 
my desk as a reference for now and then (yes, on paper! :)

Best regards,
Christian


Luis Ibanez wrote:
>
> Hi Christian,
>
> Thanks for pointing this out and for offering to help with
> improving the documentation.
>
> One of the best forms of documentation is to add examples
> on the use of the classes. So, once we have figured out the
> answers to the API questions that you posted here, the most
> useful thing you could do is to craft several (basic) examples
> and send them our way, so that we can add them to the
> source code repository.
>
> --
>
> Regarding the API questions, Gaetan certainly will be the
> best person to answer, but here is my guess:
>
> 1) The StatisticsLabelObject is intended to manage information
>      about the intensity values of pixels covered by every label.
>
> 2) The ShapeLabelObject is intended to manage information
>      about geometrical characteristics of the regions of pixels
>      that have the same label.
>
> Regarding the difference between
>
> StatisticsLabelObject::SetElongation()
>
> and
>
> ShapeLabelObject::SetBinaryElongation()
>
>
> well... "Glimpsing at the Source leaves no doubt"   :-)
>
> if you open the file
>
> Insight/Code/Review/itkStatisticsLabelMapFilter.txx
>
> you will find in lines 263 and 299 that the elongation
> is computed as
>
>       elongation =
> vcl_sqrt(principalMoments[ImageDimension-1] /
>               principalMoments[ImageDimension-2]);
>
> where the principalMoments were computed from
> the moments of pixel values that belong to the object.
>
>
> While,
> if you open
>
> Insight/Code/Review/itkShapeLabelMapFilter.txx
>
> you will find in lines 336 and 381 that the elongation
> is computed as
>
>   elongation =
> vcl_sqrt(
>     principalMoments[ImageDimension-1] /
>     principalMoments[ImageDimension-2]);
>
> where the principalMoments were computed from
> the moments of pixel positions. That is, withoutt
> taking into account the intensity values of the pixels.
> In other words, all the pixels of the object are
> contributing the same weight to the computation of
> moments.
>
>
>    The power of Open Source, includes the Joy
>    of understanding how the code works, just by
>     reading it and studying it.      :-)
>
>
> Please let us know if this answer your questions
> about the differences in API between these two
> classes.
>
>
>       Regards,
>
>
>             Luis
>
>
> -------------------------------------------------------------------
> On Wed, Apr 14, 2010 at 5:06 PM, Christian Werner 
> <christian.werner at rwth-aachen.de 
> <mailto:christian.werner at rwth-aachen.de>> wrote:
>
>     Hello!
>
>     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.
>
>     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:
>
>     GetBinaryElongation() and GetElongation(),
>     GetBinaryFlatness() and GetFlatness(), ...
>
>     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).
>
>     Also, the doxygen documentation presents the
>     StatisticsLabelMapFilter like this:
>     itk::BinaryImageToStatisticsLabelMapFilter< TInputImage,
>     TFeatureImage, TOutputImage > Class Template Reference
>
>     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.
>
>     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.
>
>
>     Best regards,
>     Christian
>     _____________________________________
>     Powered by www.kitware.com <http://www.kitware.com>
>
>     Visit other Kitware open-source projects at
>     http://www.kitware.com/opensource/opensource.html
>
>     Kitware offers ITK Training Courses, for more information visit:
>     http://www.kitware.com/products/protraining.html
>
>     Please keep messages on-topic and check the ITK FAQ at:
>     http://www.itk.org/Wiki/ITK_FAQ
>
>     Follow this link to subscribe/unsubscribe:
>     http://www.itk.org/mailman/listinfo/insight-users
>
>



More information about the Insight-users mailing list