[Insight-users] exceptions with metaImage
Stephen R. Aylward
aylward at unc.edu
Wed Jun 29 18:14:48 EDT 2005
Thanks for pointing this out.
We are very happy with the metaImage file format (for images, spatial
objects, scenes, etc.); however, the code we are using to read/write in
that format is quite "outdated."
Thanks for creating the bug report. It is about time we update the C++
implementation for metaIO. We can add exceptions, improve the
programming style and improve the documentation. It may be awhile
before this happens, so in the meantime perhaps we can solve your
problems with the temp solution that you suggested.
Let me see if I can find a volunteer to do this...
Thanks,
Stephen
Marius Staring wrote:
> I am reposting this message, since it seems to be missed ...
>
> I also filed a bug report with number 1978, see
>
> http://www.itk.org/Bug/bug.php?op=show&bugid=1978&pos=4
>
> Cheers,
>
> Marius
>
> Marius Staring wrote:
>
>> 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
>> _______________________________________________
>> Insight-users mailing list
>> Insight-users at itk.org
>> http://www.itk.org/mailman/listinfo/insight-users
>>
>
--
===========================================================
Dr. Stephen R. Aylward
Associate Professor of Radiology
Adjunct Associate Professor of Computer Science and Surgery
http://caddlab.rad.unc.edu
aylward at unc.edu
(919) 966-9695
More information about the Insight-users
mailing list