[Insight-developers] ImageConstIterator complaining about non-sensical region boundary violation?
Williams, Norman K
norman-k-williams at uiowa.edu
Thu Sep 22 14:59:17 EDT 2011
Apparently if I do actually use the 4.0b1 tag, the problem goes away.
Sorry to get you involved in this.
On 9/22/11 1:47 PM, "Bill Lorensen" <bill.lorensen at gmail.com> wrote:
>Can you make a small test somewhere in ITKv4 that exhibits this
>failure and send it to me along with the images?
>
>On Thu, Sep 22, 2011 at 12:49 PM, Williams, Norman K
><norman-k-williams at uiowa.edu> wrote:
>> I don't know why this is happening; but the facts I have are these:
>>
>>
>> 1. If I use the nifti_tool utility to compare the 2 NIfTI files:
>>
>> nifti_tools -diff_hdr -infiles baseline.nii.gz test.nii.gz
>>
>> the output is empty, meaning that the two files have the same size,
>> spacing, orientation, voxel type etc.
>>
>> 2. I get consistent exceptions based on the indices of the regions being
>> out of range, across multiple machines both Linux and OS X
>>
>> 3. I'm working with the 4.0b1 ITK
>>
>> 4. Valgrind reports no errors.
>>
>> On 9/22/11 11:02 AM, "Bill Lorensen" <bill.lorensen at gmail.com> wrote:
>>
>>>Kent,
>>>
>>>Something strange is going on. I doubt that the problem is with the
>>>faces calculator.
>>>
>>>Are both images exactly the same size? I have seen strange errors when
>>>the baseline and test images have different sizes.
>>>
>>>On Thu, Sep 22, 2011 at 11:56 AM, Williams, Norman K
>>><norman-k-williams at uiowa.edu> wrote:
>>>> 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.
>>>> ________________________________
>>>> _______________________________________________
>>>> 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://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-developers
>>>>
>>
>>
>>
>> ________________________________
>> 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.
>> ________________________________
>>
________________________________
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