]> Creatis software - gdcm.git/blob - src/gdcmDicomDirElement.h
* src/*.cxx *.h Reference to License.htm fixed to License.html.
[gdcm.git] / src / gdcmDicomDirElement.h
1 /*=========================================================================
2                                                                                 
3   Program:   gdcm
4   Module:    $RCSfile: gdcmDicomDirElement.h,v $
5   Language:  C++
6   Date:      $Date: 2004/09/27 08:39:06 $
7   Version:   $Revision: 1.10 $
8                                                                                 
9   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
10   l'Image). All rights reserved. See Doc/License.txt or
11   http://www.creatis.insa-lyon.fr/Public/Gdcm/License.html for details.
12                                                                                 
13      This software is distributed WITHOUT ANY WARRANTY; without even
14      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15      PURPOSE.  See the above copyright notices for more information.
16                                                                                 
17 =========================================================================*/
18
19 #ifndef GDCMDICOMDIRELEMENT_H
20 #define GDCMDICOMDIRELEMENT_H
21
22 #include "gdcmCommon.h"
23
24 #include <list>
25
26 //-----------------------------------------------------------------------------
27 typedef struct
28 {
29    /// DicomGroup number
30    unsigned short int group;
31    /// DicomElement number
32    unsigned short int elem;
33    /// value (coded as a std::string) of the Element
34    std::string value;
35 } gdcmElement;
36
37 typedef std::list<gdcmElement> ListDicomDirMetaElem;
38 typedef std::list<gdcmElement> ListDicomDirPatientElem;
39 typedef std::list<gdcmElement> ListDicomDirStudyElem;
40 typedef std::list<gdcmElement> ListDicomDirSerieElem;
41 typedef std::list<gdcmElement> ListDicomDirImageElem;
42
43 //-----------------------------------------------------------------------------
44 /**
45  * \ingroup gdcmDicomDirElement
46  * \brief    gdcmDicomDirElement represents elements contained in a dicom dir
47  *           Class for the chained lists from the file 'Dicts/DicomDir.dic'
48  */
49 class GDCM_EXPORT gdcmDicomDirElement
50 {
51 public:
52    gdcmDicomDirElement();
53    ~gdcmDicomDirElement();
54
55   /**
56     * \brief   canonical Printer 
57     * \sa    SetPrintLevel
58   */ 
59    void Print(std::ostream &os);
60 /**
61  * \ingroup gdcmDicomDirElement
62  * \brief   returns a reference to the chained List 
63  *          related to the META Elements of a DICOMDIR.
64  */
65    ListDicomDirMetaElem    &GetDicomDirMetaElements()
66       { return DicomDirMetaList; };
67 /**
68  * \ingroup gdcmDicomDirElement
69  * \brief   returns a reference to the chained List 
70  *          related to the PATIENT Elements of a DICOMDIR.
71  */      
72    ListDicomDirPatientElem &GetDicomDirPatientElements()
73       { return DicomDirPatientList; };
74 /**
75  * \ingroup gdcmDicomDirElement
76  * \brief   returns a reference to the chained List 
77  *          related to the STUDY Elements of a DICOMDIR.
78  */      
79    ListDicomDirStudyElem   &GetDicomDirStudyElements()
80       { return DicomDirStudyList; };
81 /**
82  * \ingroup gdcmDicomDirElement
83  * \brief   returns a reference to the chained List 
84  *          related to the SERIE Elements of a DICOMDIR.
85  */
86    ListDicomDirSerieElem   &GetDicomDirSerieElements()
87       { return DicomDirSerieList; };
88 /**
89  * \ingroup gdcmDicomDirElement
90  * \brief   returns a reference to the chained List 
91  *          related to the IMAGE Elements of a DICOMDIR.
92  */
93    ListDicomDirImageElem   &GetDicomDirImageElements()
94       { return DicomDirImageList; };
95
96 private:
97    /// gdcmElements chained list, related to the MetaElements of DICOMDIR
98    ListDicomDirMetaElem    DicomDirMetaList;
99    /// gdcmElements chained list, related to the PatientElements of DICOMDIR
100    ListDicomDirPatientElem DicomDirPatientList;
101    /// gdcmElements chained list, related to the StudyElements of DICOMDIR
102    ListDicomDirStudyElem   DicomDirStudyList;
103    /// gdcmElements chained list, related to the SerieElements of DICOMDIR
104    ListDicomDirSerieElem   DicomDirSerieList;
105    /// gdcmElements chained list, related to the ImageElements of DICOMDIR
106    
107    ListDicomDirImageElem   DicomDirImageList;
108 };
109
110 //-----------------------------------------------------------------------------
111 #endif