]> Creatis software - gdcm.git/blob - src/gdcmDicomDirElement.h
Doxygenation
[gdcm.git] / src / gdcmDicomDirElement.h
1 /*=========================================================================
2                                                                                 
3   Program:   gdcm
4   Module:    $RCSfile: gdcmDicomDirElement.h,v $
5   Language:  C++
6   Date:      $Date: 2005/11/21 09:46:25 $
7   Version:   $Revision: 1.35 $
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 "gdcmRefCounter.h"
23
24 #include <list>
25
26 namespace gdcm 
27 {
28
29 //-----------------------------------------------------------------------------
30
31 typedef std::list<DicomElement> ListDicomDirElem;
32 typedef std::list<DicomElement> ListDicomDirMetaElem;
33 typedef std::list<DicomElement> ListDicomDirPatientElem;
34 typedef std::list<DicomElement> ListDicomDirStudyElem;
35 typedef std::list<DicomElement> ListDicomDirVisitElem;
36 typedef std::list<DicomElement> ListDicomDirSerieElem;
37 typedef std::list<DicomElement> ListDicomDirImageElem;
38
39 // For future use (Full DICOMDIR)
40
41 /*
42 typedef std::list<DicomElement> ListDicomDirResultElem;
43 typedef std::list<DicomElement> ListDicomDirStudyComponentElem;
44
45 typedef std::list<DicomElement> ListDicomDirOverlayElem;
46 typedef std::list<DicomElement> ListDicomDirModalityLutElem;
47 typedef std::list<DicomElement> ListDicomDirModalityLutElem;
48 typedef std::list<DicomElement> ListDicomDirCurveElem;
49 typedef std::list<DicomElement> ListDicomDirStoredPrintElem;
50 typedef std::list<DicomElement> ListDicomDirRtDoseElem;
51 typedef std::list<DicomElement> ListDicomDirRtStructureSetElem;
52 typedef std::list<DicomElement> ListDicomDirRtPlanElem;
53 typedef std::list<DicomElement> ListDicomDirRtTreatRecordElem;
54 typedef std::list<DicomElement> ListDicomDirPresentationElem;
55 typedef std::list<DicomElement> ListDicomDirSrDocumentElem;
56 typedef std::list<DicomElement> ListDicomDirKeyObjectDocElem;
57 typedef std::list<DicomElement> ListDicomDirSpectroscopyElem;
58 typedef std::list<DicomElement> ListDicomDirRawDataElem;
59 typedef std::list<DicomElement> ListDicomDirRegistrationElem;
60 typedef std::list<DicomElement> ListDicomDirFiducialElem;
61 */
62
63 //-----------------------------------------------------------------------------
64 /**
65  * \brief   Represents elements contained in a DicomDir class
66  *          for the chained lists from the file 'Dicts/DicomDir.dic'
67  */
68 class GDCM_EXPORT DicomDirElement : public RefCounter
69 {
70    gdcmTypeMacro(DicomDirElement);
71
72 public:
73 /// \brief Contructs a DicomDirElement with a RefCounter
74    static DicomDirElement *New() {return new DicomDirElement();}
75
76    /**
77     * \brief   canonical Printer 
78     */ 
79    virtual void Print(std::ostream &os = std::cout, 
80                       std::string const &indent = "" );
81
82    /**
83     * \brief   returns a reference to the chained List 
84     *          related to the META Elements of a DICOMDIR.
85     */
86    ListDicomDirMetaElem const &GetDicomDirMetaElements() const
87       { return DicomDirMetaList; }
88
89    /**
90     * \brief   returns a reference to the chained List 
91     *          related to the PATIENT Elements of a DICOMDIR.
92     */      
93    ListDicomDirPatientElem const &GetDicomDirPatientElements() const
94       { return DicomDirPatientList; }
95
96    /**
97     * \brief   returns a reference to the chained List 
98     *          related to the STUDY Elements of a DICOMDIR.
99     */      
100    ListDicomDirStudyElem const &GetDicomDirStudyElements() const
101       { return DicomDirStudyList; }
102
103    /**
104     * \brief   returns a reference to the chained List 
105     *          related to the VISIT Elements of a DICOMDIR.
106     */      
107    ListDicomDirVisitElem const &GetDicomDirVisitElements() const
108       { return DicomDirVisitList; }
109    /**
110     * \brief   returns a reference to the chained List 
111     *          related to the SERIE Elements of a DICOMDIR.
112     */
113    ListDicomDirSerieElem const &GetDicomDirSerieElements() const
114       { return DicomDirSerieList; }
115
116    /**
117     * \brief   returns a reference to the chained List 
118     *          related to the IMAGE Elements of a DICOMDIR.
119     */
120    ListDicomDirImageElem const &GetDicomDirImageElements() const
121       { return DicomDirImageList; }
122
123    // Public method to add an element
124    bool AddEntry(DicomDirType type, DicomElement const &elem);
125
126    // Only one instance of ddElem 
127    void AddDicomDirElement(DicomDirType type,
128                            uint16_t group, uint16_t elem);
129
130 protected:
131    DicomDirElement();
132    ~DicomDirElement();
133
134 private:
135    /// Elements chained list, related to the MetaElements of DICOMDIR
136    ListDicomDirMetaElem    DicomDirMetaList;
137    /// Elements chained list, related to the PatientElements of DICOMDIR
138    ListDicomDirPatientElem DicomDirPatientList;
139    /// Elements chained list, related to the StudyElements of DICOMDIR
140    ListDicomDirStudyElem   DicomDirStudyList;
141    /// Elements chained list, related to the VisitElements of DICOMDIR
142    ListDicomDirVisitElem   DicomDirVisitList;
143    /// Elements chained list, related to the SerieElements of DICOMDIR
144    ListDicomDirSerieElem   DicomDirSerieList;
145    /// Elements chained list, related to the ImageElements of DICOMDIR
146    ListDicomDirImageElem   DicomDirImageList;
147 };
148 } // end namespace gdcm
149 //-----------------------------------------------------------------------------
150 #endif