#include "gdcmDicomDir.h"
#include <fstream>
-#ifdef GDCM_NO_ANSI_STRING_STREAM
-# include <strstream>
-# define ostringstream ostrstream
-# else
-# include <sstream>
-#endif
-#include <string>
-#include <iostream>
-
-#define ostringstream ostrstream
-//extern "C"
-using namespace std;
-
-int main(int argc, char* argv[])
+int TestDicomDir(int argc, char* argv[])
{
gdcmDicomDir *e1;
ListTag::iterator deb , fin;
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]);
- e1->SetPrintLevel(level);
- }
+ if (argc > 2) {
+ int level = atoi(argv[2]);
+ e1->SetPrintLevel(level);
+ }
if(e1->GetDicomDirPatients().begin() == e1->GetDicomDirPatients().end() )
{
return(1);
}
-// Exemples exploitation de la structure
+// Simple examples of structure exploitation
// DON'T REMOVE neither the folowing code, nor the commented out lines
/*
}
*/
- cout << std::endl << std::endl
+ std::cout << std::endl << std::endl
<< " = Liste des PATIENT/STUDY/SERIE =========================================="
<< std::endl<< std::endl;
}
*/
- cout << std::endl << std::endl
+ std::cout << std::endl << std::endl
<< " = Contenu Complet du DICOMDIR =========================================="
<< std::endl<< std::endl;
e1->Print();