[Insight-developers] ImageFileWriter no longer requires SetImageIO()
Luis Ibanez
luis.ibanez@kitware.com
Fri, 06 Dec 2002 07:41:49 -0500
Hi,
The itk::ImageFileWriter has been modified
to use the same factory mechanism as the
ImageFileReader. It is no longer necessary
to set explicitly the ImageIO object with
the SetImageIO() method.
Now the registered factories are queried
in order to find an ImageIO that can write
the file. The selection is based on the
filename extension passed to the ImageFileWriter.
The following are the defaults:
".png" --> PNG images:
2D, unsigned char
2D, unsigned short
".gipl" --> GIPL format
".mha"
".mhd" --> MetaImage
".vtk" --> VTK image
You can still force the choice of the ImageIO
by calling explicitly SetImageIO() (as is the
case for the reader) but be aware that if the
filename extension passed to the writer is not
recognized by the current ImageIO, another
ImageIO object will be queried from the
factories.
Please let us know if you encounter any
problems.
Thanks
Luis