]> Creatis software - gdcm.git/blob - src/gdcmDicomDirElement.h
Typo, comments, doxygenation
[gdcm.git] / src / gdcmDicomDirElement.h
1 /*=========================================================================
2                                                                                 
3   Program:   gdcm
4   Module:    $RCSfile: gdcmDicomDirElement.h,v $
5   Language:  C++
6   Date:      $Date: 2005/02/11 15:22:18 $
7   Version:   $Revision: 1.28 $
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 namespace gdcm 
27 {
28
29 //-----------------------------------------------------------------------------
30
31 typedef std::list<Element> ListDicomDirElem;
32 typedef std::list<Element> ListDicomDirMetaElem;
33 typedef std::list<Element> ListDicomDirPatientElem;
34 typedef std::list<Element> ListDicomDirStudyElem;
35 typedef std::list<Element> ListDicomDirSerieElem;
36 typedef std::list<Element> ListDicomDirImageElem;
37
38 // For future use (Full DICOMDIR)
39 /*
40 typedef std::list<Element> ListDicomDirVisit;
41 typedef std::list<Element> ListDicomDirResult;
42 typedef std::list<Element> ListDicomDirStudyComponent;
43
44 typedef std::list<Element> ListDicomDirOverlay;
45 typedef std::list<Element> ListDicomDirModalityLut;
46 typedef std::list<Element> ListDicomDirModalityLut;
47 typedef std::list<Element> ListDicomDirCurve;
48 typedef std::list<Element> ListDicomDirStoredPrint;
49 typedef std::list<Element> ListDicomDirRtDose;
50 typedef std::list<Element> ListDicomDirRtStructureSet;
51 typedef std::list<Element> ListDicomDirRtPlan;
52 typedef std::list<Element> ListDicomDirRtTreatRecord;
53 typedef std::list<Element> ListDicomDirPresentation;
54 typedef std::list<Element> ListDicomDirSrDocument;
55 typedef std::list<Element> ListDicomDirKeyObjectDoc;
56 typedef std::list<Element> ListDicomDirSpectroscopy;
57 typedef std::list<Element> ListDicomDirRawData;
58 typedef std::list<Element> ListDicomDirRegistration;
59 typedef std::list<Element> ListDicomDirFiducial;
60 */
61
62 //-----------------------------------------------------------------------------
63 /**
64  * \brief   Represents elements contained in a DicomDir class
65  *          for the chained lists from the file 'Dicts/DicomDir.dic'
66  */
67 class GDCM_EXPORT DicomDirElement
68 {
69 public:
70    DicomDirElement();
71    ~DicomDirElement();
72
73   /**
74     * \brief   canonical Printer 
75     */ 
76    void Print(std::ostream &os);
77
78    /**
79     * \brief   returns a reference to the chained List 
80     *          related to the META Elements of a DICOMDIR.
81     */
82    ListDicomDirMetaElem const &GetDicomDirMetaElements() const
83       { return DicomDirMetaList; };
84
85    /**
86     * \brief   returns a reference to the chained List 
87     *          related to the PATIENT Elements of a DICOMDIR.
88     */      
89    ListDicomDirPatientElem const &GetDicomDirPatientElements() const
90       { return DicomDirPatientList; };
91
92    /**
93     * \brief   returns a reference to the chained List 
94     *          related to the STUDY Elements of a DICOMDIR.
95     */      
96    ListDicomDirStudyElem const &GetDicomDirStudyElements() const
97       { return DicomDirStudyList; };
98
99    /**
100     * \brief   returns a reference to the chained List 
101     *          related to the SERIE Elements of a DICOMDIR.
102     */
103    ListDicomDirSerieElem const &GetDicomDirSerieElements() const
104       { return DicomDirSerieList; };
105
106    /**
107     * \brief   returns a reference to the chained List 
108     *          related to the IMAGE Elements of a DICOMDIR.
109     */
110    ListDicomDirImageElem const &GetDicomDirImageElements() const
111       { return DicomDirImageList; };
112
113    // Public method to add an element
114    bool AddEntry(DicomDirType type, Element const &elem);
115
116    // Only one instance of ddElem 
117    void AddDicomDirElement(DicomDirType type,
118                            uint16_t group, uint16_t elem);
119
120 private:
121    /// Elements chained list, related to the MetaElements of DICOMDIR
122    ListDicomDirMetaElem    DicomDirMetaList;
123    /// Elements chained list, related to the PatientElements of DICOMDIR
124    ListDicomDirPatientElem DicomDirPatientList;
125    /// Elements chained list, related to the StudyElements of DICOMDIR
126    ListDicomDirStudyElem   DicomDirStudyList;
127    /// Elements chained list, related to the SerieElements of DICOMDIR
128    ListDicomDirSerieElem   DicomDirSerieList;
129    /// Elements chained list, related to the ImageElements of DICOMDIR
130    ListDicomDirImageElem   DicomDirImageList;
131 };
132 } // end namespace gdcm
133 //-----------------------------------------------------------------------------
134 #endif