2 //-----------------------------------------------------------------------------
6 #include "gdcmHeader.h"
7 #include "gdcmCommon.h"
8 #include "gdcmPatient.h"
10 //-----------------------------------------------------------------------------
11 typedef std::list<gdcmPatient *> ListPatient;
12 typedef std::list<gdcmHeader *> ListHeader;
14 //-----------------------------------------------------------------------------
16 * \defgroup gdcmDicomDir
17 * \brief gdcmDicomDir defines an object representing a DICOMDIR in memory.
20 class GDCM_EXPORT gdcmDicomDir: public gdcmParser
23 gdcmDicomDir(ListTag *l, bool exception_on_error = false);
24 gdcmDicomDir(const char *FileName,bool exception_on_error = false);
28 void SetPrintLevel(int level) { printLevel = level; };
29 virtual void Print(std::ostream &os = std::cout);
31 inline ListPatient &GetPatients() {return patients;};
32 bool Write(std::string fileName);
44 void NewDicomDir(std::string path);
47 void CreateDicomDir(void);
48 void AddObjectToEnd(gdcmDicomDirType type,ListTag::iterator begin,ListTag::iterator end);
49 void AddPatientToEnd(ListTag::iterator begin,ListTag::iterator end);
50 void AddStudyToEnd(ListTag::iterator begin,ListTag::iterator end);
51 void AddSerieToEnd(ListTag::iterator begin,ListTag::iterator end);
52 void AddImageToEnd(ListTag::iterator begin,ListTag::iterator end);
54 void SetElements(std::string &path,ListHeader &list);
55 void SetElement(std::string &path,gdcmDicomDirType type,gdcmHeader *header);
60 //-----------------------------------------------------------------------------