[Insight-developers] MetaImage Test failing on Mac
Bradley Lowekamp
blowekamp at mail.nih.gov
Mon Jul 6 11:50:26 EDT 2009
Hello,
I remember this test now, it did not work right when I first
encountered it.
1) The itkMetaImageStreamingWriterIOTest2:
# This test is failing to produce correct output
ADD_TEST(itkMetaImageStreamingWriterIOTest2 ${IO_TESTS}
# --compare ${ITK_DATA_ROOT}/Input/mri3D.mhd
# ${ITK_TEST_OUTPUT_DIR}/mri3DWriteStreamed.mha
itkMetaImageStreamingWriterIOTest
${ITK_DATA_ROOT}/Input/mri3D.mhd
${ITK_TEST_OUTPUT_DIR}/mri3DWriteStreamed.mha)
The input mha file references a dcm file. And meta IO does not support
streaming from that format well. Before I made any changes to the
streaming IO, this test was passing, but not producing the correct
output file on all systems.
2) The cause of the segfault is that MetaImage::ElementByteOrderSwap
assumes the size of the buffer is the size of the image, but in the
case of streaming this is not true. This problem could have been
encountered before I made the recent changes to ImageFileReader. I see
two possible solutions, A) add a MetaImage function to take the buffer
size as a parameter, or B) have itkMetaImageIO not call
MetaImage::ElementByteOrderFix, but instead call an itk::ByteSwapper.
I think option B would be easiest.
Brad
On Jul 6, 2009, at 9:02 AM, Lowekamp, Bradley (NIH/NLM/LHC) [C] wrote:
> I am pretty sure that this is my fault. I am going to look into it
> this morning.
>
> Brad
>
> On Jul 6, 2009, at 8:22 AM, Luis Ibanez wrote:
>
>> Brad, Julien,
>>
>> The following test
>>
>> itkMetaImageStreamingWriterIOTest2
>>
>> is failing (seg.faulting) on Macs.
>>
>> For example:
>> http://www.cdash.org/CDash/testDetails.php?test=26512580&build=371914
>>
>>
>> May this be related to the recent changes to the
>> IO classes ?
>>
>> or to the recent changes to the MetaImage library ?
>>
>>
>> Thanks for any hints,
>>
>>
>> Luis
>>
>>
>
> ========================================================
> Bradley Lowekamp
> Lockheed Martin Contractor for
> Office of High Performance Computing and Communications
> National Library of Medicine
> blowekamp at mail.nih.gov
>
>
> <ATT00001.txt>
========================================================
Bradley Lowekamp
Lockheed Martin Contractor for
Office of High Performance Computing and Communications
National Library of Medicine
blowekamp at mail.nih.gov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/mailman/private/insight-developers/attachments/20090706/23cdb886/attachment.htm>
More information about the Insight-developers
mailing list