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