[Insight-developers] ImageConstIterator complaining about non-sensical region boundary violation?

Williams, Norman K norman-k-williams at uiowa.edu
Thu Sep 22 11:56:11 EDT 2011


Since no one had anything to offer on this question.

There is a problem as near as I can figure out in the
itk::NeighborhoodAlgorithm::ImageBoundaryFacesCalculator.


The specific case comes into play in the context of the ITK TestKernel --
if you request that the test driver compare a baseline image to an output
image from your test it does so by attempting to read the images in as
itk::Image<double,6>.

The goal is to try and be as general as possible. As it happens, my tests
are comparing itk::Image<Double,3>.  So when read into
itk::Image<Double,6> you end up with an image whose size is [x, y, z, 1,
1, 1].

The itk::NeighborhoodAlgorithm::ImageBoundaryFacesCalculator is used by
itk::Testing::ComparisonImageFilter to deal with regions around each
voxel.  The ImageBoundaryFacesCalculator, however, kicks out a list of
regions, where the start index of the region has an offset of 1 in a
dimension whose size is 1, which is an illegal index.

I'm trying to decode ImageBoundaryFacesCalculator::operator() to figure
out how NOT to put regions in the face list with illegal indices.  But I'm
thoroughly mystified as to why no one else sees this problem.


On 9/21/11 4:14 PM, "Kent WIlliams" <norman-k-williams at uiowa.edu> wrote:

>Having a problem with the itkTestDriver infrastructure.  We are using
>ITK4 at the Beta 01 tag.
>
>
>After our test successfully completes, the Test Driver tries to check two
>files, but itk::Testing::ComparisonImageFilter is throwing an exception
>with this message:
>
>
>BRAINSFitTestDriver:
>.../ITKv4/Modules/Core/Common/include/itkImageConstIterator.h:177:
>itk::ImageConstIterator<TImage>::ImageConstIterator(const TImage*, const
>typename TImage::RegionType&) [with TImage = itk::Image<double, 6u>]:
>Assertion `Region ImageRegion (0x7fffffffc150)
>  Dimension: 6
>  Index: [1, 1, 1, 1, 0, 0]
>  Size: [115, 107, 101, 1, 1, 1]
> is outside of buffered region ImageRegion (0x208d298)
>  Dimension: 6
>  Index: [0, 0, 0, 0, 0, 0]
>  Size: [117, 109, 103, 1, 1, 1]
>' failed.
>
>
>
>That's wrong.  If I look at the code in itkImageConstIterator.h:
>
>
>
>175: const RegionType & bufferedRegion = m_Image->GetBufferedRegion();
>176: itkAssertOrThrowMacro( ( bufferedRegion.IsInside(m_Region) ),
>177: "Region " << m_Region << " is outside of buffered region " <<
>bufferedRegion );
>
>
>
>
>Something just aint right.
>



________________________________
Notice: This UI Health Care e-mail (including attachments) is covered by the Electronic Communications Privacy Act, 18 U.S.C. 2510-2521, is confidential and may be legally privileged.  If you are not the intended recipient, you are hereby notified that any retention, dissemination, distribution, or copying of this communication is strictly prohibited.  Please reply to the sender that you have received the message in error, then delete it.  Thank you.
________________________________


More information about the Insight-developers mailing list