[Insight-developers] More Mac fixes

Brad King brad . king at kitware . com
Thu, 28 Aug 2003 15:31:21 -0400 (EDT)


Hello,

I think I've fixed these tests:

  itkGrayscaleFunctionDilateImageFilterTest
  itkGrayscaleFunctionErodeImageFilterTest

and possibly others.  The MetaIO library is re-using an instance of
std::ifstream to open a new file, but it does not always call clear() to
get rid of eof/fail flags.  This is not a problem on most platforms
because the tests don't read past the end of the file.  On Mac, reading TO
the end of the file (but not past) still sets the eof flag.  This was
causing the GenerateData() to fail to be able to read the file because it
reuses the same std::ifstream as the GenerateOutputInformation().

I've fixed the re-use of the stream in the MetaIO library.  We'll see
tonight how many tests this fixes.

-Brad