3 #include "gdcmDocEntry.h"
4 #include "gdcmDicomDir.h"
5 #include "gdcmDicomDirPatient.h"
6 #include "gdcmDirList.h"
9 void StartMethod(void *toto) {
11 std::cout<<"Start parsing"<<std::endl;
14 void EndMethod(void *toto) {
16 std::cout<<"End parsing"<<std::endl;
22 * \brief Explores recursively the given directory (or GDCM_DATA_ROOT by default)
23 * orders the gdcm-readable found Files
24 * according their Patient/Study/Serie/Image characteristics
25 * makes the gdcmDicomDir
26 * and writes a file named NewDICOMDIR..
29 int main(int argc, char* argv[]) {
30 gdcm::DicomDir *dcmdir;
36 dirName = GDCM_DATA_ROOT;
38 dcmdir = new gdcm::DicomDir(dirName, true); // we ask for Directory parsing
40 dcmdir->SetStartMethod(StartMethod, (void *) NULL);
41 dcmdir->SetEndMethod(EndMethod);
43 gdcm::ListDicomDirPatient lp = dcmdir->GetDicomDirPatients();
46 std::cout << "makeDicomDir: no patient list present. Exiting."
51 dcmdir->WriteDicomDir("NewDICOMDIR");
52 std::cout<<std::flush;