]> Creatis software - gdcm.git/blob - src/gdcmDicomDirElement.h
* FIX now file names and directory name are written properly in the
[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   /**
40     * \ingroup gdcmParser
41     * \brief   canonical Printer 
42     * \sa    SetPrintLevel
43   */ 
44    void Print(std::ostream &os);
45
46
47 /**
48  * \ingroup gdcmDicomDirElement
49  * \brief   returns a reference to the chained List 
50  *          related to the META Elements of a DICOMDIR.
51  */
52    ListDicomDirMetaElem    &GetDicomDirMetaElements(void)    
53       {return(DicomDirMetaList);};
54 /**
55  * \ingroup gdcmDicomDirElement
56  * \brief   returns a reference to the chained List 
57  *          related to the PATIENT Elements of a DICOMDIR.
58  */      
59    ListDicomDirPatientElem &GetDicomDirPatientElements(void) 
60       {return(DicomDirPatientList);};
61 /**
62  * \ingroup gdcmDicomDirElement
63  * \brief   returns a reference to the chained List 
64  *          related to the STUDY Elements of a DICOMDIR.
65  */      
66    ListDicomDirStudyElem   &GetDicomDirStudyElements(void)   
67       {return(DicomDirStudyList);};
68 /**
69  * \ingroup gdcmDicomDirElement
70  * \brief   returns a reference to the chained List 
71  *          related to the SERIE Elements of a DICOMDIR.
72  */
73    ListDicomDirSerieElem   &GetDicomDirSerieElements(void)   
74       {return(DicomDirSerieList);};
75 /**
76  * \ingroup gdcmDicomDirElement
77  * \brief   returns a reference to the chained List 
78  *          related to the IMAGE Elements of a DICOMDIR.
79  */
80    ListDicomDirImageElem   &GetDicomDirImageElements(void)   
81       {return(DicomDirImageList);};
82
83 private:
84    ListDicomDirMetaElem    DicomDirMetaList;
85    ListDicomDirPatientElem DicomDirPatientList;
86    ListDicomDirStudyElem   DicomDirStudyList;
87    ListDicomDirSerieElem   DicomDirSerieList;
88    ListDicomDirImageElem   DicomDirImageList;
89 };
90
91 //-----------------------------------------------------------------------------
92 #endif