[ITK] Question about ShapeLabelObject attribute

Bradley Lowekamp blowekamp at mail.nih.gov
Wed Dec 10 09:43:03 EST 2014


Hello,

There are many ways to measure the maximum length of an object.

Principal moments of share are an important shape description that is common an I suggest further reading to be done on. You may be able to start on the wikipedia [1]. For some case I prefer to use second principle moments to measure the size of an object over length as it is a more robust statistics. It similar to using the standard deviation as opposed to the range to describe a set of samples. So the second principle moments in the shape label object are similar to the LabelGeometryFilter's axis measurements.

I have an external module which computes an oriented bounding box based on the second principle moments and provide access to this value you are looking for [2]. The computation done there should be much more efficient that what's done in the LabelGeometryImageFilter. If you want a simular interface to the LabelGeometryImageFilter that the LabelShapeStatisticsImageFilter should be the interface you are looking for[3][4]. 

Hope that helps,
Brad



[1] http://en.wikipedia.org/wiki/Second_moment_of_area
[2] https://github.com/blowekamp/itkOBBLabelMap
[3] https://github.com/blowekamp/itkOBBLabelMap/blob/master/include/itkLabelShapeStatisticsImageFilter.h
[4] https://github.com/blowekamp/itkOBBLabelMap/blob/master/test/itkLabelShapeStatisticsImageFilterTest.cxx

On Dec 10, 2014, at 7:17 AM, Zein Salah <zeinsalah at gmail.com> wrote:

> Hi,
> 
> i need to compute the maximum length of objects in a a LabelMap, i.e.
> something like LabelGeometryImageFilter::GetMajorAxisLength.
> Does any of the attributes of ShapeLabelObject stores this? Is there a
> way to compute this from the existing attribute, preferably without
> the need to compute perimeters?
> 
> One more question: what do binary principal moments of an object
> practically mean?
> 
> thanks.
> z.
> _______________________________________________
> Community mailing list
> Community at itk.org
> http://public.kitware.com/mailman/listinfo/community



More information about the Community mailing list