[Insight-developers] IO : itkLoad, and CanReadFile()
Luis Ibanez
ibanez@choroid.cs.unc.edu
Sat, 20 Oct 2001 21:32:02 -0400 (EDT)
It sees that there are a couple of
inconsistencies in the way factories
are used in IO. I just checked in the
classes:
itkMetaImageIOFactory and
itkMetaImageIO
but run in the following problems:
1) there is a global function itkLoad()
in itkPNGImageIOFactory, it returns
a pointer to a PNG IO factory casted
as a ImageIOFactoryBase.
Is that function supposed to be a member
method ?
How can other IO factories use it ?
2) the method "CanReadFile()" calls
"ReadHeader()" and depending on the
status returned by "ReadHeader()" it
returns a boolean.
Should we, then, when writing IOs
avoid to print error messages when
inconsistencies are found in the headers ?
and just return false in that case.
for example , in the test for MetaImage,
error messages appears comming from VOL
saying that it is not able to read the
header. Should we maybe separate this
task and have a method that only test
the file for belonging to the right
class ?
Thanks
Luis