]> Creatis software - gdcm.git/blob - src/gdcmDicomDirElement.h
Allow to create ex nihilo DICOMDIR
[gdcm.git] / src / gdcmDicomDirElement.h
1 // gdcmDicomDirElement.h
2 //-----------------------------------------------------------------------------
3 #ifndef GDCMDICOMDIRELEMENT_H
4 #define GDCMDICOMDIRELEMENT_H
5
6 #include "gdcmCommon.h"
7
8 #include <list>
9
10 //-----------------------------------------------------------------------------
11 typedef struct
12 {
13    /// DicomGroup number
14         unsigned short int group;
15    /// DicomElement number
16         unsigned short int elem;
17    /// value (coded as a std::string) of the Element    
18         std::string value;
19 } gdcmElement;
20
21 typedef std::list<gdcmElement> ListDicomDirMetaElem;
22 typedef std::list<gdcmElement> ListDicomDirPatientElem;
23 typedef std::list<gdcmElement> ListDicomDirStudyElem;
24 typedef std::list<gdcmElement> ListDicomDirSerieElem;
25 typedef std::list<gdcmElement> ListDicomDirImageElem;
26
27 //-----------------------------------------------------------------------------
28 /*
29  * \defgroup gdcmDicomDirElement
30  * \brief    gdcmDicomDirElement represents elements contained in a dicom dir
31  *
32  */
33 class GDCM_EXPORT gdcmDicomDirElement
34 {
35 public:
36    gdcmDicomDirElement(void);
37    ~gdcmDicomDirElement(void);
38
39    void Print(std::ostream &os);
40
41
42 /**
43  * \ingroup gdcmDicomDirElement
44  * \brief   returns a reference to the chained List 
45  *          related to the META Elements of a DICOMDIR.
46  */
47    ListDicomDirMetaElem    &GetDicomDirMetaElements(void)    
48       {return(DicomDirMetaList);};
49 /**
50  * \ingroup gdcmDicomDirElement
51  * \brief   returns a reference to the chained List 
52  *          related to the PATIENT Elements of a DICOMDIR.
53  */      
54    ListDicomDirPatientElem &GetDicomDirPatientElements(void) 
55       {return(DicomDirPatientList);};
56 /**
57  * \ingroup gdcmDicomDirElement
58  * \brief   returns a reference to the chained List 
59  *          related to the STUDY Elements of a DICOMDIR.
60  */      
61    ListDicomDirStudyElem   &GetDicomDirStudyElements(void)   
62       {return(DicomDirStudyList);};
63 /**
64  * \ingroup gdcmDicomDirElement
65  * \brief   returns a reference to the chained List 
66  *          related to the SERIE Elements of a DICOMDIR.
67  */
68    ListDicomDirSerieElem   &GetDicomDirSerieElements(void)   
69       {return(DicomDirSerieList);};
70 /**
71  * \ingroup gdcmDicomDirElement
72  * \brief   returns a reference to the chained List 
73  *          related to the IMAGE Elements of a DICOMDIR.
74  */
75    ListDicomDirImageElem   &GetDicomDirImageElements(void)   
76       {return(DicomDirImageList);};
77
78 private:
79    ListDicomDirMetaElem    DicomDirMetaList;
80    ListDicomDirPatientElem DicomDirPatientList;
81    ListDicomDirStudyElem   DicomDirStudyList;
82    ListDicomDirSerieElem   DicomDirSerieList;
83    ListDicomDirImageElem   DicomDirImageList;
84 };
85
86 //-----------------------------------------------------------------------------
87 #endif