]> Creatis software - gdcm.git/blob - src/gdcmDicomDirStudy.h
Fix mistypings
[gdcm.git] / src / gdcmDicomDirStudy.h
1 /*=========================================================================
2                                                                                 
3   Program:   gdcm
4   Module:    $RCSfile: gdcmDicomDirStudy.h,v $
5   Language:  C++
6   Date:      $Date: 2007/08/29 15:30:49 $
7   Version:   $Revision: 1.37 $
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 _GDCMDICOMDIRSTUDY_H_
20 #define _GDCMDICOMDIRSTUDY_H_
21
22 #include "gdcmDicomDirObject.h"
23
24 namespace GDCM_NAME_SPACE 
25 {
26 class DicomDirSerie;
27 class DicomDirVisit;
28 //-----------------------------------------------------------------------------
29 typedef std::list<DicomDirSerie *> ListDicomDirSerie;
30
31
32 // For future use (Full DICOMDIR)
33 typedef std::list<DicomDirVisit *> ListDicomDirVisit;
34 /*
35 typedef std::list<DicomDirResult *> ListDicomDirResult;
36 typedef std::list<DicomDirStudyComponent *> ListDicomDirStudyComponent;
37 */
38 //-----------------------------------------------------------------------------
39 /**
40  * \brief   describes a STUDY within a within a PATIENT
41  * (DicomDirPatient) of a given DICOMDIR (DicomDir)
42  */
43 class GDCM_EXPORT DicomDirStudy : public DicomDirObject
44 {
45    gdcmTypeMacro(DicomDirStudy);
46
47 public:
48 /// \brief Constructs a DicomDirStudy with a RefCounter
49    static DicomDirStudy *New(bool empty=false) {return new DicomDirStudy(empty);}
50
51    void Print(std::ostream &os = std::cout, std::string const &indent = "" );
52    void WriteContent(std::ofstream *fp, FileType t, bool insideMetaElements,bool insideSequence );
53
54    // 'Serie' methods
55    DicomDirSerie *NewSerie();
56    /// Adds a gdcm::DicomDirSerie to a gdcm::DicomDirStudy
57    void AddSerie(DicomDirSerie *obj) { Series.push_back(obj); }
58    void ClearSerie();
59    DicomDirSerie *GetFirstSerie();
60    DicomDirSerie *GetNextSerie();
61    DicomDirSerie *GetLastSerie();
62    /// returns the number of Series currently held in the gdcm::DicomDirStudy
63    int            GetNumberOfSeries() { return Series.size();}
64    
65    // 'Visit' methods
66    DicomDirVisit *NewVisit();
67    /// Adds a gdcm::DicomDirVisit to a gdcm::DicomDirStudy
68    void AddVisit(DicomDirVisit *obj) { Visits.push_back(obj); }
69    void ClearVisit();
70    DicomDirVisit *GetFirstVisit();
71    DicomDirVisit *GetNextVisit();
72    DicomDirVisit *GetLastVisit();
73    /// returns the number of Visit currently held in the gdcm::DicomDirStudy
74    int            GetNumberOfVisits() { return Visits.size();}
75       
76    // for future use (Full DICOMDIR)
77 /*
78    DicomDirResult *GetFirstResult();
79    DicomDirResult *GetNextResult();
80    DicomDirResult *GetLastResult();
81
82    DicomDirStudyComponent *GetFirstStudyComponent();
83    DicomDirStudyComponent *GetNextStudyComponent();
84    DicomDirStudyComponent *GetLastStudyComponent();
85 */    
86
87    virtual void Copy(DocEntrySet *set);
88
89 protected:
90    DicomDirStudy(bool empty=false); 
91    ~DicomDirStudy();
92
93 private:
94    /// chained list of DicomDirSeries (to be exploited hierarchicaly)
95    ListDicomDirSerie Series;
96    /// iterator on the DicomDirSeries of the current DicomDirStudy
97    ListDicomDirSerie::iterator ItSerie;
98
99    /// chained list of DicomDirVisits(single level)
100    ListDicomDirVisit Visits;
101    /// iterator on the DicomDirVisits of the current DicomDirStudy
102    ListDicomDirVisit::iterator ItVisit;
103    
104
105    // for future use (Full DICOMDIR)
106 /*
107    /// chained list of DicomDirResults(single level)
108    ListDicomDirResult Results;
109    /// iterator on the DicomDirResults of the current DicomDirStudy
110    ListDicomDirResult::iterator ItResult;
111
112    /// chained list of DicomDirStudyComponents(single level)
113    ListDicomDirStudyComponent StudyComponents;
114    /// iterator on the DicomDirStudyComponents of the current DicomDirStudy
115    ListDicomDirStudyComponent::iterator ItStudyComponents;
116 */
117 };
118 } // end namespace gdcm
119
120 //-----------------------------------------------------------------------------
121 #endif