[Insight-developers] IO Factories

Bill Hoffman bill.hoffman@kitware.com
Tue, 23 Oct 2001 12:03:16 -0400


I think the interface should be changed to this:

1. CanReadFile() is just test that determines if the IO object can read the file.

2. Add a new pure virtual function to ImageIOBase called:
ReadImageInformation(), it takes no arguments and assumes that
SetFileName has been called first.   This is more in-line with
the pipe line.

Then itkImageFileReader.txx GenerateData needs be changed to support this.

....
  m_ImageIO = ImageIOFactory::CreateImageIO(m_FileName.c_str());
...
m_ImageIO->SetFileName(m_FileName.c_str());
m_ImageIO->ReadImageInformation();
...

I can fix PNG imageIO to support this and make the changes to itkImageFileReader.txx.

Does this sound OK?


-Bill