[Insight-developers] Bug in ImageFileWriter?

Joshua Cates cates@sci.utah.edu
Tue, 21 May 2002 12:47:18 -0600 (MDT)


Hello,

During some debugging, I noticed that ImageFileWriter uses the
LargestPossibleRegion of its input for image size, then passes the buffer
pointer to the ImageIO class for writing.  This is only valid when
BufferedRegion is equivalent to LargestPossibleRegion, which is not
guaranteed.

This brings up other issues: which region is the appropriate region to
write?  Given that filters in the pipeline process only their
RequestedRegions, shouldn't the writers write the RequestedRegion and not
the BufferedRegion?  If the file writer is supposed to handle streaming,
then I agree the LargestPossibleRegion is the correct region, although I
think streaming is currently handled in the writer.

Josh.

______________________________
 Josh Cates
 School of Computer Science
 University of Utah
 Email: cates@sci.utah.edu
 Phone: (801) 587-7697
 URL:   www.cs.utk.edu/~cates