[Insight-developers] New file types added to Code/IO

Luis Ibanez luis.ibanez@kitware.com
Wed, 12 Mar 2003 23:01:12 -0500


Hi Hans,


I would say that the reader should throw an exception
in this case.  The application should then catch the
exception and probably display an error message in its
GUI....

We have defined a class-hierarchy of exceptions,
among them there is an IO exception for which we
could create sub-classes.

Otherwise, just the itkExceptionMacro() will do it
by returning an appropriate message.



Luis




--------------

Hans Johnson wrote:
> 
> Another question about the CanRead functionality that I was concerned 
> with.  What should the itk::PNGImageIO::CanRead() function return if the 
> filename is "test.png", but the file does not even exist?  or if it exists 
> but the user does not have read permission?
> 
>