]> Creatis software - gdcm.git/blob - src/gdcmDicomDirSerie.h
4449d20d0008d84de66b3476fa72611eeb5d0ae3
[gdcm.git] / src / gdcmDicomDirSerie.h
1 /*=========================================================================
2                                                                                 
3   Program:   gdcm
4   Module:    $RCSfile: gdcmDicomDirSerie.h,v $
5   Language:  C++
6   Date:      $Date: 2005/01/18 07:53:42 $
7   Version:   $Revision: 1.21 $
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 
25 {
26 class DicomDirImage;
27 //-----------------------------------------------------------------------------
28 typedef std::list<DicomDirImage *> ListDicomDirImage;
29
30 //-----------------------------------------------------------------------------
31 /**
32  * \brief   describes a SERIE  within a within a STUDY
33  * (DicomDirStudy) of a given DICOMDIR (DicomDir)
34  */
35 class GDCM_EXPORT DicomDirSerie : public DicomDirObject 
36 {
37 public:
38    DicomDirSerie(); 
39    ~DicomDirSerie();
40
41    void Print( std::ostream &os = std::cout, std::string const & indent = "" );
42    void WriteContent( std::ofstream *fp, FileType t );
43  
44    /// Returns the IMAGE chained List for this SERIE.
45    ListDicomDirImage const &GetDicomDirImages() const { return Images; };
46
47    // should avoid exposing internal mechanism
48    DicomDirImage *GetFirstEntry();
49    DicomDirImage *GetNextEntry();
50         
51    /// adds the passed IMAGE to the IMAGE chained List for this SERIE.    
52    void AddDicomDirImage(DicomDirImage *obj) { Images.push_back(obj); };
53
54    DicomDirImage *NewImage();
55
56 private:
57
58    ///chained list of DicomDirImages (to be exploited recursively)
59    ListDicomDirImage Images;
60    /// iterator on the DicomDirImages of the current DicomDirSerie
61    ListDicomDirImage::iterator ItDicomDirImage;
62 };
63 } // end namespace gdcm
64 //-----------------------------------------------------------------------------
65 #endif