[ITK] [ITK-users] ShapeLabelMap Roundness/Perimeter Calculation Issue
ebasafa
ehsan.basafa at gmail.com
Fri May 13 15:12:13 EDT 2016
Thank you! The IJ article is really helpful.
However, the issue still remains that debug and release give different
answers. I do not know what specifics I need to provide. Basically, I have a
pipeline that loads a volume from file, thresholds the image into a binary
image, and then passes it to BinaryImageToShapeLabelMapFilter to process all
the objects found after thresholding. The exact same pipeline, run over the
same image volume, prints out different values for perimeter and roundness
of the same objects. I should have mentioned that I am working in 3D, and
also the values I get for other shape parameters, e.g. flatness, elongation,
equivalent ellipsoid radii, volume, etc. are the same for debug and release.
My very naive guess is that, possibly, there is some uninitialized parameter
being used somewhere in the filter, which results in debug and release
initializing it to two different values.
Lowekamp, Bradley (NIH/NLM/LHC) [C] wrote
> Hello,
>
> You can find additional information about how this parameter is defined in
> the following insight journal:
> http://www.insight-journal.org/browse/publication/852
>
> This method is generalizable to N-D, so it may not be the most accurate in
> 2D. The method can produce roundness numbers that are >1. However is
> should be consistent in debug and release modes. Getting consistent
> numeric computation with C++ and vectorizable operations can be
> challenging with different architectures.
>
> You did not provide any specifics for the difference in computation
> between release and debug modes.
>
> HTH,
> Brad
>
>> On May 13, 2016, at 11:26 AM, ebasafa <
> ehsan.basafa@
> > wrote:
>>
>> Hi everyone,
>>
>> Recently I noticed that BinaryImageToShapeLabelMapFilter does not
>> calculate
>> roundness of objects correctly, and I traced it back to perimeter
>> calculation. More curiously, the results I get from the GetRoundness()
>> and
>> GetPerimeter() methods differ between debug and release builds! And to
>> make
>> it even more confusing, it's a machine-dependent problem, i.e. on some
>> machines debug and release give the same (correct?) numbers and on some
>> machines they don't. I suspect that release results are erroneous, since
>> some roundness numbers turn out to be >1.0 in release but are always <1.0
>> in
>> debug mode. I am working in a Windows 8.1 64-bit environment and am using
>> the latest release of ITK (4.9.1) on all different machines.
>>
>> I have tried several searches to see if this is a resolved issue, but the
>> latest post I found was from 2011 (link below) and has been unanswered.
>>
>> http://itk-users.7.n7.nabble.com/Perimeter-Calculation-via-LabelImageToShapeLabelMapFilter-td14917.html
>>
>> Seems like there was a bug report filed that time
>> (https://itk.org/Bug/view.php?id=11934) whose status still says
>> "assigned".
>> I appreciate any help.
>>
>> Thanks,
>> Ehsan
>>
>>
>>
>>
>> --
>> View this message in context:
>> http://itk-insight-users.2283740.n2.nabble.com/ShapeLabelMap-Roundness-Perimeter-Calculation-Issue-tp7588837.html
>> Sent from the ITK Insight Users mailing list archive at Nabble.com.
>> _____________________________________
>> Powered by 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.php
>>
>> 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://public.kitware.com/mailman/listinfo/insight-users
>> _______________________________________________
>> Community mailing list
>>
> Community@
>> http://public.kitware.com/mailman/listinfo/community
>
> _____________________________________
> Powered by 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.php
>
> 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://public.kitware.com/mailman/listinfo/insight-users
Lowekamp, Bradley (NIH/NLM/LHC) [C] wrote
> Hello,
>
> You can find additional information about how this parameter is defined in
> the following insight journal:
> http://www.insight-journal.org/browse/publication/852
>
> This method is generalizable to N-D, so it may not be the most accurate in
> 2D. The method can produce roundness numbers that are >1. However is
> should be consistent in debug and release modes. Getting consistent
> numeric computation with C++ and vectorizable operations can be
> challenging with different architectures.
>
> You did not provide any specifics for the difference in computation
> between release and debug modes.
>
> HTH,
> Brad
>
>> On May 13, 2016, at 11:26 AM, ebasafa <
> ehsan.basafa@
> > wrote:
>>
>> Hi everyone,
>>
>> Recently I noticed that BinaryImageToShapeLabelMapFilter does not
>> calculate
>> roundness of objects correctly, and I traced it back to perimeter
>> calculation. More curiously, the results I get from the GetRoundness()
>> and
>> GetPerimeter() methods differ between debug and release builds! And to
>> make
>> it even more confusing, it's a machine-dependent problem, i.e. on some
>> machines debug and release give the same (correct?) numbers and on some
>> machines they don't. I suspect that release results are erroneous, since
>> some roundness numbers turn out to be >1.0 in release but are always <1.0
>> in
>> debug mode. I am working in a Windows 8.1 64-bit environment and am using
>> the latest release of ITK (4.9.1) on all different machines.
>>
>> I have tried several searches to see if this is a resolved issue, but the
>> latest post I found was from 2011 (link below) and has been unanswered.
>>
>> http://itk-users.7.n7.nabble.com/Perimeter-Calculation-via-LabelImageToShapeLabelMapFilter-td14917.html
>>
>> Seems like there was a bug report filed that time
>> (https://itk.org/Bug/view.php?id=11934) whose status still says
>> "assigned".
>> I appreciate any help.
>>
>> Thanks,
>> Ehsan
>>
>>
>>
>>
>> --
>> View this message in context:
>> http://itk-insight-users.2283740.n2.nabble.com/ShapeLabelMap-Roundness-Perimeter-Calculation-Issue-tp7588837.html
>> Sent from the ITK Insight Users mailing list archive at Nabble.com.
>> _____________________________________
>> Powered by 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.php
>>
>> 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://public.kitware.com/mailman/listinfo/insight-users
>> _______________________________________________
>> Community mailing list
>>
> Community@
>> http://public.kitware.com/mailman/listinfo/community
>
> _____________________________________
> Powered by 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.php
>
> 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://public.kitware.com/mailman/listinfo/insight-users
--
View this message in context: http://itk-insight-users.2283740.n2.nabble.com/ShapeLabelMap-Roundness-Perimeter-Calculation-Issue-tp7588837p7588839.html
Sent from the ITK Insight Users mailing list archive at Nabble.com.
_____________________________________
Powered by 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.php
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://public.kitware.com/mailman/listinfo/insight-users
More information about the Community
mailing list