[Insight-developers] LabelOverlapImageFilter Assert issue
Bradley Lowekamp
blowekamp at mail.nih.gov
Sat Mar 8 15:55:27 EST 2014
Nick,
I am trying to add LabelOverlapImageFilter to SimpleITK. It's failing one of my test in SimpleITK. At this is the section:
itk::simple::Image smallImage( 1,1,1,itk::simple::sitkUInt8 );
itk::simple::Image largeImage( 10,10,10,itk::simple::sitkUInt8 );
itk::simple::Image smallShortImage( 1,1,1,itk::simple::sitkUInt16 );
try
{
// Try executing with different size images.
// This will either work or throw an exception, either is OK. So
// this is here just to make sure that the behavior does not cause
// undefined behavior such as segfault, or other errouneos behavior.
filter.Execute ( largeImage, smallImage );
} catch (... )
{ }
http://open.cdash.org/testDetails.php?test=240179118&build=3246420
This is causing a miss-matched region assert to fail in the iterator:
https://github.com/InsightSoftwareConsortium/ITK/blob/master/Modules/Core/Common/include/itkImageConstIterator.h#L208
During the construction of the iterator here:
https://github.com/InsightSoftwareConsortium/ITK/blob/master/Modules/Filtering/ImageStatistics/include/itkLabelOverlapMeasuresImageFilter.hxx#L142
There is also a non-standard GenerateInputRequestedRegion:
https://github.com/InsightSoftwareConsortium/ITK/blob/master/Modules/Filtering/ImageStatistics/include/itkLabelOverlapMeasuresImageFilter.hxx#L39
The normal implementation of this method requests all inputs to have the same ImageRegion. This normally then triggers exceptions with the requested region not able to be generated from the pipeline.
I don't immediately see the reason why the GenerateInputRequestedRegion was overridden, the default should work ok. Do you know why?
Thanks,
Brad
More information about the Insight-developers
mailing list