[Insight-users] exceptions with metaImage

Marius Staring marius at isi.uu.nl
Thu Jun 23 05:48:01 EDT 2005


Hi all,

we just found out that, when reading in images with MetaImageIO, no 
exception is thrown when data is not read in completely. This is due to 
the fact that the errors from the M_ReadElements-function in 
metaImage-class (in Utilities) are not handled at all in the 
Read-function from this class.

For example in line 658 of metaImage.cxx is says:

       M_ReadElements(m_ReadStream, m_ElementData, m_Quantity);

This function returns a boolean which I think should be checked, like 
for example

       if ( !M_ReadElements(m_ReadStream, m_ElementData, m_Quantity) )
        {
             return false;
        }

There are more occurences of this in this function.

Is it possible to fix this error?

Regards,

Stefan Klein and Marius Staring


More information about the Insight-users mailing list