]> Creatis software - gdcm.git/commitdiff
* src/TestAllReadCompareDicom.cxx : test the existence of the directory
authorregrain <regrain>
Tue, 9 Nov 2004 16:14:20 +0000 (16:14 +0000)
committerregrain <regrain>
Tue, 9 Nov 2004 16:14:20 +0000 (16:14 +0000)
    using an 'ifstream' other than a 'FILE *'. The previous solution ('FILE *')
    break under windows (with msvc6 compilation).
  -- BeNours

ChangeLog
Testing/TestAllReadCompareDicom.cxx

index 957079550d5af8c4c8289667af243720ac0ed9db..659f043315dd523ec0106b784d0f01564fc6eb29 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2004-11-09 Benoit Regrain <Benoit.Regrain@creatis.insa-lyon.fr>
-  * src/gdcmDicomDir.h : bug fix for the last Boix's commit (problem when 
+  * src/TestAllReadCompareDicom.cxx : test the existence of the directory
+    using an 'ifstream' other than a 'FILE *'. The previous solution ('FILE *')
+    break under windows (with msvc6 compilation).
+
+2004-11-09 Benoit Regrain <Benoit.Regrain@creatis.insa-lyon.fr>
+  * src/gdcmDicomDir.h : bug fix for the last Boix's commit (problem when
     compiling with MSVC6)
 
 2004-11-09 Benoit Regrain <Benoit.Regrain@creatis.insa-lyon.fr>
index 2fefb6bd6acd978c5f725a9fc28eaac1085d3db3..a61581d756f8feae867a6d9d1b4a2b1da607b85c 100644 (file)
@@ -157,7 +157,22 @@ int TestAllReadCompareDicom(int argc, char* argv[])
       std::string baseLineDir = GDCM_DATA_ROOT;
       baseLineDir += "/BaselineDicom/";
 
-      FILE* testFILE = fopen( baseLineDir.c_str(), "r" );
+      std::ifstream* testDIR = new std::ifstream(baseLineDir.c_str(), std::ios::in | std::ios::binary);
+      if (!testDIR )
+      {
+         std::cerr << "   The reference baseline directory " << std::endl
+                   << "      "
+                   << baseLineDir << std::endl
+                   << "   couldn't be opened."
+                   << std::endl;
+         return 1;
+      }
+      else
+      {
+         testDIR->close();
+      }
+
+/*      FILE* testFILE = fopen( baseLineDir.c_str(), "r" );
       if (!testFILE )
       {
          std::cerr << "   The reference baseline directory " << std::endl
@@ -170,7 +185,7 @@ int TestAllReadCompareDicom(int argc, char* argv[])
       else
       {
          fclose( testFILE );
-      }
+      }*/
 
       ////// Step 1 (see above description):