[Insight-developers] More Mac fixes

Lorensen, William E (Research) lorensen at crd . ge . com
Thu, 28 Aug 2003 15:35:21 -0400


Have you tried DerivativeImageFilter and the ImageIteratorWithIndex failures
They both read meta files.


-----Original Message-----
From: Brad King [mailto:brad . king at kitware . com]
Sent: Thursday, August 28, 2003 3:31 PM
To: Insight Developers
Subject: [Insight-developers] More Mac fixes


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

_______________________________________________
Insight-developers mailing list
Insight-developers at itk . org
http://www . itk . org/mailman/listinfo/insight-developers