]> Creatis software - gdcm.git/blob - src/gdcmDicomDirElement.h
Add some commented out lines to prepare future version of 'Full DICOMDIR' stuff
[gdcm.git] / src / gdcmDicomDirElement.h
1 /*=========================================================================
2                                                                                 
3   Program:   gdcm
4   Module:    $RCSfile: gdcmDicomDirElement.h,v $
5   Language:  C++
6   Date:      $Date: 2005/02/07 14:48:34 $
7   Version:   $Revision: 1.27 $
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 //-----------------------------------------------------------------------------
39 /**
40  * \brief   Represents elements contained in a DicomDir class
41  *          for the chained lists from the file 'Dicts/DicomDir.dic'
42  */
43 class GDCM_EXPORT DicomDirElement
44 {
45 public:
46    DicomDirElement();
47    ~DicomDirElement();
48
49   /**
50     * \brief   canonical Printer 
51     */ 
52    void Print(std::ostream &os);
53
54    /**
55     * \brief   returns a reference to the chained List 
56     *          related to the META Elements of a DICOMDIR.
57     */
58    ListDicomDirMetaElem const &GetDicomDirMetaElements() const
59       { return DicomDirMetaList; };
60
61    /**
62     * \brief   returns a reference to the chained List 
63     *          related to the PATIENT Elements of a DICOMDIR.
64     */      
65    ListDicomDirPatientElem const &GetDicomDirPatientElements() const
66       { return DicomDirPatientList; };
67
68    /**
69     * \brief   returns a reference to the chained List 
70     *          related to the STUDY Elements of a DICOMDIR.
71     */      
72    ListDicomDirStudyElem const &GetDicomDirStudyElements() const
73       { return DicomDirStudyList; };
74
75    /**
76     * \brief   returns a reference to the chained List 
77     *          related to the SERIE Elements of a DICOMDIR.
78     */
79    ListDicomDirSerieElem const &GetDicomDirSerieElements() const
80       { return DicomDirSerieList; };
81
82    /**
83     * \brief   returns a reference to the chained List 
84     *          related to the IMAGE Elements of a DICOMDIR.
85     */
86    ListDicomDirImageElem const &GetDicomDirImageElements() const
87       { return DicomDirImageList; };
88
89    // Public method to add an element
90    bool AddEntry(DicomDirType type, Element const &elem);
91
92    // Only one instance of ddElem 
93    void AddDicomDirElement(DicomDirType type,
94                            uint16_t group, uint16_t elem);
95
96 private:
97    /// Elements chained list, related to the MetaElements of DICOMDIR
98    ListDicomDirMetaElem    DicomDirMetaList;
99    /// Elements chained list, related to the PatientElements of DICOMDIR
100    ListDicomDirPatientElem DicomDirPatientList;
101    /// Elements chained list, related to the StudyElements of DICOMDIR
102    ListDicomDirStudyElem   DicomDirStudyList;
103    /// Elements chained list, related to the SerieElements of DICOMDIR
104    ListDicomDirSerieElem   DicomDirSerieList;
105    /// Elements chained list, related to the ImageElements of DICOMDIR
106    ListDicomDirImageElem   DicomDirImageList;
107 };
108 } // end namespace gdcm
109 //-----------------------------------------------------------------------------
110 #endif