]> Creatis software - gdcm.git/blobdiff - Testing/TestDicomDir.cxx
Propagate GDCM_DATA_ROOT into other tests
[gdcm.git] / Testing / TestDicomDir.cxx
index 9b6855b701d89420ce598f5ac0fee3bf50ac3d29..4de300aa36b426b777dd8d4ff08d144f1fc13393 100644 (file)
@@ -2,6 +2,7 @@
 #include "gdcm.h"
 #include "gdcmHeaderEntry.h"
 #include "gdcmDicomDir.h"
+#include "gdcmConfigure.h"
 
 #include <fstream>
 #ifdef GDCM_NO_ANSI_STRING_STREAM
@@ -31,9 +32,11 @@ int testDicomDir(int argc, char* argv[])
    std::string file; 
    if (argc > 1) 
       file = argv[1];    
-   else        
-      file = "../gdcmData/DICOMDIR";
-      
+   else {
+      file += GDCM_DATA_ROOT;
+      file += "/DICOMDIR";
+    }
+
    e1 = new gdcmDicomDir(file.c_str());
        if (argc > 2) {
           int level = atoi(argv[2]);