[Insight-developers] endianness and MetaImageIO
Joshua Cates
cates@sci.utah.edu
Tue, 4 Feb 2003 11:58:07 -0700 (MST)
Hi,
I have a test itkVectorGradientMagnitudeImageFilterTest1 which does an
image diff with a .mha image. On big endian systems the test is failing
because the baseline image is not being read properly.
See, for example:
http://www.itk.org/Testing/Sites/caleb.crd/SunOS-5.7-c++/20030204-0500-Nightly/Results/__Testing_Code_BasicFilters_itkVectorGradientMagnitudeImageFilterTest1.html
The second number looks like the result of bytes not being swapped?
The code I use to read the image is essentially this:
typedef itk::ImageFileReader<itk::Image<float, 2> > ScalarReaderType;
ScalarReaderType::Pointer baseline = ScalarReaderType::New();
baseline->SetFileName(foo.mha);
baseline->Update();
Josh.
______________________________
Josh Cates
School of Computer Science
University of Utah
Email: cates@sci.utah.edu
Phone: (801) 587-7697
URL: http://www.sci.utah.edu/~cates