]> Creatis software - gdcm.git/blobdiff - Testing/TestAllReadCompareDicom.cxx
* src/TestAllReadCompareDicom.cxx : test the existence of the directory
[gdcm.git] / Testing / TestAllReadCompareDicom.cxx
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):