]> Creatis software - gdcm.git/blob - src/gdcmDicomDirPatient.h
* Remove memory leaks on the DicomDir
[gdcm.git] / src / gdcmDicomDirPatient.h
1 /*=========================================================================
2                                                                                 
3   Program:   gdcm
4   Module:    $RCSfile: gdcmDicomDirPatient.h,v $
5   Language:  C++
6   Date:      $Date: 2004/12/03 17:13:18 $
7   Version:   $Revision: 1.14 $
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 GDCMPATIENT_H
20 #define GDCMPATIENT_H
21
22 #include "gdcmDicomDirObject.h"
23 #include "gdcmDicomDirStudy.h"
24 #include "gdcmSQItem.h"
25
26 namespace gdcm 
27 {
28
29 //-----------------------------------------------------------------------------
30 typedef std::list<DicomDirStudy*> ListDicomDirStudy;
31
32 //-----------------------------------------------------------------------------
33 class GDCM_EXPORT DicomDirPatient : public DicomDirObject 
34 {
35 public:
36    DicomDirPatient(); 
37    ~DicomDirPatient();
38
39    void Print(std::ostream &os = std::cout);
40    void WriteContent(std::ofstream *fp, FileType t);
41
42    /// Returns the STUDY chained List for this PATIENT.
43    ListDicomDirStudy const & GetDicomDirStudies() const { return Studies; };
44
45    /// adds the passed STUDY to the STUDY chained List for this PATIENT.
46    void AddDicomDirStudy (DicomDirStudy *obj) { Studies.push_back(obj); };
47
48    ///  TODO
49    DicomDirStudy* NewStudy(); 
50          
51 private:
52
53    /// chained list of DicomDirStudy
54    ListDicomDirStudy Studies;
55 };
56 } // end namespace gdcm
57
58 //-----------------------------------------------------------------------------
59 #endif