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