]> Creatis software - gdcm.git/blob - src/gdcmSerieHeader.h
ENH: Since HandleOutOfGroup0002 need access to the transfer syntax move the method...
[gdcm.git] / src / gdcmSerieHeader.h
1 /*=========================================================================
2                                                                                 
3   Program:   gdcm
4   Module:    $RCSfile: gdcmSerieHeader.h,v $
5   Language:  C++
6   Date:      $Date: 2005/01/11 15:15:38 $
7   Version:   $Revision: 1.4 $
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 GDCMSERIEHEADER_H
20 #define GDCMSERIEHEADER_H
21
22 #include "gdcmCommon.h"
23 #include <list>
24
25 namespace gdcm 
26 {
27 class Header;
28 //-----------------------------------------------------------------------------
29 /**
30  * \ingroup SerieHeader
31  * \brief  
32  * - This class should be used for a stack of 2D dicom images.
33  * - For a multiframe dicom image better use directly SerieHeader
34 */
35 class GDCM_EXPORT SerieHeader 
36 {
37 public:
38     SerieHeader();
39     ~SerieHeader();
40
41    /// \todo should return bool or throw error ?
42    void AddFileName(std::string const &filename);
43    void AddGdcmFile(Header *file);
44    void SetDirectory(std::string const &dir);
45    void OrderGdcmFileList();
46    
47    /// \warning Assumes all elements in the list have the same global infos.
48    ///          Assumes the list is not empty.
49    Header *GetGdcmHeader() { return CoherentGdcmFileList.front(); }
50
51    typedef std::list<Header* > GdcmHeaderList;
52
53    /// \brief Gets the *coherent* File List
54    /// @return the *coherent* File List
55    const GdcmHeaderList &GetGdcmFileList() { return CoherentGdcmFileList; }
56
57 private:
58    bool ImagePositionPatientOrdering();
59    bool ImageNumberOrdering();
60    bool FileNameOrdering();
61    
62    GdcmHeaderList CoherentGdcmFileList;
63 };
64
65 } // end namespace gdcm
66
67 //-----------------------------------------------------------------------------
68 #endif