]> Creatis software - gdcm.git/blob - src/gdcmDicomDirSerie.h
In order to allow to use current version (1.3) of gdcm *and* ITK (that includes
[gdcm.git] / src / gdcmDicomDirSerie.h
1 /*=========================================================================
2                                                                                 
3   Program:   gdcm
4   Module:    $RCSfile: gdcmDicomDirSerie.h,v $
5   Language:  C++
6   Date:      $Date: 2007/05/23 14:18:08 $
7   Version:   $Revision: 1.34 $
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 GDCMDICOMDIRSERIE_H
20 #define GDCMDICOMDIRSERIE_H
21
22 #include "gdcmDicomDirObject.h"
23
24 namespace GDCM_NAME_SPACE 
25 {
26 class DicomDirImage;
27 class DicomDirPrivate;
28
29 //-----------------------------------------------------------------------------
30 typedef std::list<DicomDirImage *> ListDicomDirImage;
31 typedef std::list<DicomDirPrivate *> ListDicomDirPrivate;
32 //-----------------------------------------------------------------------------
33 /**
34  * \brief   describes a SERIE  within a within a STUDY
35  * (DicomDirStudy) of a given DICOMDIR (DicomDir)
36  */
37 class GDCM_EXPORT DicomDirSerie : public DicomDirObject 
38 {
39    gdcmTypeMacro(DicomDirSerie);
40
41 public:
42 /// \brief Constructs a DicomDirSerie with a RefCounter
43    static DicomDirSerie *New(bool empty=false) {return new DicomDirSerie(empty);}
44
45    void Print( std::ostream &os = std::cout, std::string const &indent = "" );
46    void WriteContent( std::ofstream *fp, FileType t );
47
48    // 'Image' methods
49    DicomDirImage *NewImage();
50    /// Add a new gdcm::DicomDirImage to the Serie
51    void AddImage(DicomDirImage *obj) { Images.push_back(obj); }
52    void ClearImage();
53
54    DicomDirImage *GetFirstImage();
55    DicomDirImage *GetNextImage();
56
57    // 'Private' methods (For SIEMENS 'CSA non image')
58    DicomDirPrivate *NewPrivate();
59    /// Add a new gdcm::DicomDirPrivate to the Serie
60    void AddPrivate(DicomDirPrivate *obj) { Privates.push_back(obj); }
61    void ClearPrivate();
62
63    DicomDirPrivate *GetFirstPrivate();
64    DicomDirPrivate *GetNextPrivate();   
65    
66    
67    virtual void Copy(DocEntrySet *set);
68
69 protected:
70    DicomDirSerie(bool empty=false); 
71    ~DicomDirSerie();
72
73 private:
74    ///chained list of DicomDirImages (to be exploited recursively)
75    ListDicomDirImage Images;
76    /// iterator on the DicomDirImages of the current DicomDirSerie
77    ListDicomDirImage::iterator ItImage;
78
79    ///chained list of DicomDirPrivates (to be exploited recursively)
80    ListDicomDirPrivate Privates;
81    /// iterator on the DicomDirPrivates of the current DicomDirSerie
82    ListDicomDirPrivate::iterator ItPrivate;
83 /*
84 // for future use  (Full DICOMDIR):
85
86    /// chained list of DicomDirOverlays(single level)
87    ListDicomDirOverlay Overlays;
88    /// iterator on the DicomDirOverlays of the current DicomDirSerie
89    ListDicomDirOverlay::iterator ItOverlay;
90
91    /// chained list of DicomDirModalityLuts(single level)
92    ListDicomDirModalityLut ModalityLuts;
93    /// iterator on the DicomDirModalityLuts of the current DicomDirSerie
94    ListDicomDirModalityLut::iterator ItModalityLuts;
95
96    /// chained list of DicomDirCurves(single level)
97    ListDicomDirCurve Curves;
98    /// iterator on the DicomDirCurves of the current DicomDirSerie
99    ListDicomDirCurve::iterator ItCurves;
100
101    /// chained list of DicomDirStoredPrints(single level)
102    ListDicomDirStoredPrint StoredPrints;
103    /// iterator on the DicomDirStoredPrints of the current DicomDirSerie
104    ListDicomDirStoredPrint::iterator ItStoredPrints;
105
106    /// chained list of DicomDirRtDoses(single level)
107    ListDicomDirRtDose RtDoses;
108    /// iterator on the DicomDirRtDoses of the current DicomDirSerie
109    ListDicomDirRtDose::iterator ItRtDoses;
110
111    /// chained list of DicomDirRtStructureSets(single level)
112    ListDicomDirRtStructureSet RtStructureSets;
113    /// iterator on the DicomDirRtStructureSets of the current DicomDirSerie
114    ListDicomDirRtStructureSet::iterator ItRtStructureSets;
115
116    /// chained list of DicomDirRtPlans(single level)
117    ListDicomDirRtPlan RtPlans;
118    /// iterator on the DicomDirRtPlans of the current DicomDirSerie
119    ListDicomDirPlan::iterator ItRtPlans;
120
121    /// chained list of DicomDirRtTreatRecords(single level)
122    ListDicomDirRtTreatRecord RtTreatRecords;
123    /// iterator on the DicomDirRtTreatRecords of the current DicomDirSerie
124    ListDicomDirRtTreatRecord::iterator ItRtTreatRecords;
125
126    /// chained list of DicomDirPresentations(single level)
127    ListDicomDirPresentation Presentations;
128    /// iterator on the DicomDirPresentations of the current DicomDirSerie
129    ListDicomDirPresentation::iterator ItPresentations;
130
131    /// chained list of DicomDirWaveForms(single level)
132    ListDicomDirWaveForm WaveForms;
133    /// iterator on the DicomDirWaveForms of the current DicomDirSerie
134    ListDicomDirWaveForm::iterator ItWaveForms;
135
136    /// chained list of DicomDirSrDocuments(single level)
137    ListDicomDirSrDocument SrDocuments;
138    /// iterator on the DicomDirSrDocuments of the current DicomDirSerie
139    ListDicomDirSrDocument::iterator ItSrDocuments;
140
141    /// chained list of DicomDirKeyObjectDocs(single level)
142    ListDicomDirKeyObjectDoc KeyObjectDocs;
143    /// iterator on the DicomDirKeyObjectDocs of the current DicomDirSerie
144    ListDicomDirKeyObjectDoc::iterator ItKeyObjectDocs;
145
146    /// chained list of DicomDirSpectroscopys(single level)
147    ListDicomDirSpectroscopy Spectroscopys;
148    /// iterator on the DicomDirSpectroscopys of the current DicomDirSerie
149    ListDicomDirSpectroscopy::iterator ItSpectroscopys;
150
151    /// chained list of DicomDirRawDatas(single level)
152    ListDicomDirRawData RawDatas;
153    /// iterator on the DicomDirRawDatas of the current DicomDirSerie
154    ListDicomDirRawData::iterator ItRawDatas;
155
156    /// chained list of DicomDirRegistrations(single level)
157    ListDicomDirRegistration Registrations;
158    /// iterator on the DicomDirRegistrations of the current DicomDirSerie
159    ListDicomDirRegistration::iterator ItRegistrations;
160
161    /// chained list of DicomDirFiducials(single level)
162    ListDicomDirFiducial Fiducials;
163    /// iterator on the DicomDirFiducials of the current DicomDirSerie
164    ListDicomDirFiducial::iterator ItFiducials;
165 */
166
167 };
168 } // end namespace gdcm
169 //-----------------------------------------------------------------------------
170 #endif