[Insight-developers] BillsBasement Nightly Failing Test
Bradley Lowekamp
blowekamp at mail.nih.gov
Wed Feb 25 08:20:06 EST 2009
>>
>> BTW: Do you think that the registration failing tests in
>> mini3.nlm may be related in any way to these IO changes ?
>
> I mucked with the configuration on Friday and turned on some
> options. For tomorrow, I turned off the optimized registration. If
> you have any recommendation for the cmake options let me know. I
> think one of this options I enable has some kind of issue.
>
> Brad
I moved those options to mini1's nightly and getting the same results:
http://www.cdash.org/CDash/viewTest.php?onlyfailed&buildid=279246
the continuous mini3 is now green. So the optimized registration
option is the cause here.
>
>
>
>> Bradley Lowekamp wrote:
>>> Hello,
>>>
>>> Should I finish up this or are you taking care of it all?
>>>
>>> This is what I came up with for this section of code,
>>> incorporating your
>>> RegionIO safety:
>>>
>>> // this is a check to see if we are actually streaming
>>> ImageIORegion largestRegion(nDims);
>>> for(unsigned int i=0; i<nDims; i++)
>>> {
>>> largestRegion.SetIndex(i, 0);
>>> largestRegion.SetSize(i, this->GetDimensions(i));
>>> }
>>>
>>> // since largestRegion and m_IORegion may not be the same
>>> dimensions
>>> // we must be very careful in comparision and asignment to
>>> // indexMin/indexMax
>>> if(largestRegion.IsEqualWithRegionDimension(m_IORegion))
>>> {
>>> int* indexMin = new int[nDims];
>>> int* indexMax = new int[nDims];
>>> for(unsigned int i=0;i<nDims;i++)
>>> {
>>> if ( i < m_IORegion.GetImageDimension() )
>>> {
>>> indexMin[i] = static_cast<int>(m_IORegion.GetIndex(i));
>>> indexMax[i] = static_cast<int>(indexMin[i] +
>>> m_IORegion.GetSize(i) - 1);
>>> }
>>> else
>>> {
>>> indexMin[i] = 0;
>>> // this is zero since this is a (size - 1)
>>> indexMax[i] = 0;
>>> }
>>> }
>>>
>>> I also did a similar things in the write method too.
>>>
>>> On Feb 24, 2009, at 9:55 AM, Lowekamp, Bradley (NIH/NLM/LHC) [C]
>>> wrote:
>>>
>>>> Luis,
>>>>
>>>> I agree we should add more tests. I thought I added enough IO
>>>> tests :)
>>>> Should this just be for meta or test it with a bunch of types? I
>>>> can't
>>>> think of a way to validate this except valgrind and std lib debug.
>>>>
>>>>
>>>> Based on this methods:
>>>>
>>>> /** Dimension of the region to be written. This differs from the
>>>> * the image dimension and is calculated at run-time by examining
>>>> * the size of the image in each coordinate direction. */
>>>> unsigned int ImageIORegion::GetRegionDimension() const
>>>>
>>>> I think we should add:
>>>>
>>>> /* Performs element by element comparison up to the
>>>> GetRegionDimension()
>>>> * This is equivalent to removing any trailing ones, then doing a
>>>> operator==
>>>> */
>>>> bool ImageIORegion::IsEqualWithRegionDimension(const Self &) const
>>>>
>>>>
>>>> There are clear use cases for this for reading. But there is
>>>> also similar code for writing, is this need? In itkImageFileWriter
>>>> there is a check to make sure the paste region is inside the
>>>> largest.
>>>> This is enforce the IORegions are the same image dimension. So it
>>>> may
>>>> not be, but if we have IsEqualWithRegionDimension is east todo.
>>>>
>>>> minIndex and maxIndex need to be padded with 1 up to nDims. This is
>>>> because metaIO has been initialized with nDims and is expecting
>>>> things
>>>> to be of that size!
>>>>
>>>> Brad
>>>>
>>>>
>>>> On Feb 24, 2009, at 8:16 AM, Luis Ibanez wrote:
>>>>
>>>>>
>>>>> Brad,
>>>>>
>>>>> mm,...
>>>>> I don't see how...,
>>>>>
>>>>> minIndex and maxIndex are populated with values taken from
>>>>>
>>>>> m_IORegion.GetIndex()[i];
>>>>>
>>>>> so, there is no way to use more elements that the ones
>>>>> contained in m_IORegion...
>>>>>
>>>>>
>>>>> I think we should add a formal test to IO for
>>>>>
>>>>> * Reading a 2D image file into a 3D image type
>>>>> * Reading a 3D image file into a 2D image type
>>>>>
>>>>> This will illustrate both cases, and then we can verify if
>>>>> the behavior is correct.
>>>>>
>>>>> Luis
>>>>>
>>>>>
>>>>> ----------------------------------------------------------------------------------
>>>>> On Mon, Feb 23, 2009 at 11:19 PM, Bradley Lowekamp
>>>>> <blowekamp at mail.nih.gov <mailto:blowekamp at mail.nih.gov>> wrote:
>>>>>
>>>>> I think that indexMin and indexMax still need to be nDims
>>>>> size.?
>>>>>
>>>>> I agree that it make since to make this type of comparison part
>>>>> of the ImageIORegion API. As that is the only reason for this
>>>>> issue it to remove padded 1's at the end.
>>>>>
>>>>>
>>>>> On Feb 23, 2009, at 11:10 PM, Luis Ibanez wrote:
>>>>>
>
> Bradley Lowekamp
> Lockheed Martin Contractor for
> Office of High Performance Computing and Communications
> National Library of Medicine
> blowekamp at mail.nih.gov
>
>
> <ATT00001.txt>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/mailman/private/insight-developers/attachments/20090225/57751342/attachment-0001.htm>
More information about the Insight-developers
mailing list