- e1->InitTraversal();
- pa = e1->GetNextEntry();
- while ( pa ) { // we process all the PATIENT of this DICOMDIR
- std::cout << pa->GetEntry(0x0010, 0x0010) << std::endl; // Patient's Name
- pa->InitTraversal();
- st = pa->GetNextEntry();
- while ( st ) { // we process all the STUDY of this patient
- std::cout << "--- "<< st->GetEntry(0x0008, 0x1030) << std::endl; // Study Description
- std::cout << " Stud.ID:[" << st->GetEntry(0x0020, 0x0010); // Study ID
- st->InitTraversal();
- se = st->GetNextEntry();
- while ( se ) { // we process all the SERIES of this study
- std::cout << "--- --- "<< se->GetEntry(0x0008, 0x103e) << std::endl; // Serie Description
- std::cout << " Ser.nb:[" << se->GetEntry(0x0020, 0x0011); // Series number
- std::cout << "] Mod.:[" << se->GetEntry(0x0008, 0x0060) << "]"; // Modality
- se->InitTraversal();
- im = se->GetNextEntry();
+ pa = e1->GetFirstPatient();
+ while ( pa )
+ { // we process all the PATIENT of this DICOMDIR
+ std::cout << pa->GetEntryValue(0x0010, 0x0010) << std::endl; // Patient's Name
+
+ st = pa->GetFirstStudy();
+ while ( st )
+ { // we process all the STUDY of this patient
+ std::cout << "--- "<< st->GetEntryValue(0x0008, 0x1030) << std::endl; // Study Description
+ std::cout << " Stud.ID:[" << st->GetEntryValue(0x0020, 0x0010); // Study ID
+
+ se = st->GetFirstSerie();
+ while ( se )
+ { // we process all the SERIES of this study
+ std::cout << "--- --- "<< se->GetEntryValue(0x0008, 0x103e) << std::endl; // Serie Description
+ std::cout << " Ser.nb:[" << se->GetEntryValue(0x0020, 0x0011); // Series number
+ std::cout << "] Mod.:[" << se->GetEntryValue(0x0008, 0x0060) << "]"; // Modality
+
+ im = se->GetFirstImage();