]> Creatis software - gdcm.git/blob - src/gdcmDicomDir.h
to allow Python wrapping
[gdcm.git] / src / gdcmDicomDir.h
1 // gdcmDICOMDIR.h
2 //-----------------------------------------------------------------------------
3 #ifndef GDCMDICOMDIR_H
4 #define GDCMDICOMDIR_H
5
6 #include "gdcmHeader.h"
7 #include "gdcmCommon.h"
8 #include "gdcmPatient.h"
9
10 //-----------------------------------------------------------------------------
11 typedef std::list<gdcmPatient *> ListPatient;
12
13 //-----------------------------------------------------------------------------
14 /*
15  * \defgroup gdcmDicomDir
16  * \brief    gdcmDicomDir defines an object representing a DICOMDIR in memory.
17  *
18  */
19 class GDCM_EXPORT gdcmDicomDir: public gdcmParser 
20 {
21 public:
22    gdcmDicomDir(std::string &FileName,bool exception_on_error = false );
23    ~gdcmDicomDir(void);
24
25    void SetPrintLevel(int level) { printLevel = level; };
26    virtual void Print(std::ostream &os = std::cout);
27
28    inline ListPatient &GetPatients() {return patients;};
29
30    typedef enum
31    {
32       GDCM_NONE,
33       GDCM_PATIENT,
34       GDCM_STUDY,
35       GDCM_SERIE,
36       GDCM_IMAGE,
37    } gdcmDicomDirType;
38    
39 private:
40    void CreateDicomDir(void);
41    void AddObjectToEnd(gdcmDicomDirType type,ListTag::iterator begin,ListTag::iterator end);
42    void AddPatientToEnd(ListTag::iterator begin,ListTag::iterator end);
43    void AddStudyToEnd(ListTag::iterator begin,ListTag::iterator end);
44    void AddSerieToEnd(ListTag::iterator begin,ListTag::iterator end);
45    void AddImageToEnd(ListTag::iterator begin,ListTag::iterator end);
46
47    ListPatient patients;
48 };
49
50 //-----------------------------------------------------------------------------
51 #endif