[Insight-developers] itkVTKImageIO testing question
Gabe Hart
gabe.hart at kitware.com
Fri Jun 18 16:30:47 EDT 2010
Hi Brad,
As one of my first projects after joining Kitware, I've been working on
importing the tests for itkMRCImageIO and itkVTKImageIO. In doing so,
I've run across an issue that Luis and I are confused on and wanted your
input. Following the format of your original test, my test for
itkVTKImageIO uses a templated class to execute write and read tests for
all supported pixel types (and ensured that IO fails on some of the
unsupported ones).
The test (itkVTKImageIO2Test) executes nicely on my machine (Ubuntu
10.04 x64), but is failing in the continuous builds on BillsLaptop
(Win32 bcc5.5). In particular, it fails to successfully read an image
whose pixel type is itk::Vector<double,3> when reading in binary mode.
I think it would also fail for a pixel type of double too. The failure
seems to be coming from line 452 where an exception is thrown saying
"Unknown component size". When adding a print statement to look at the
size variable for the switch, it seems that indeed size = 8. This would
explain the success on my machine (64-bit) but the failure on
BillsLaptop (32-bit).
The question this then raises is whether this is the correct behavior
for this situation. The switch statement seems to only consider
different sizes of ints and does not seem to handle the options for
floats or doubles. In the present state, it seems to confuse a double
with a 64 bit integer and thus is unable to read it on a 32 bit
machine. Is this something that should be fixed, or is there something
tricky going on behind the scenes?
Thanks for your help,
-Gabe
More information about the Insight-developers
mailing list