]> Creatis software - gdcm.git/blob - src/gdcmHeaderHelper.h
fix compilation warnings for the gdcm::Document::TransferSyntaxStrings
[gdcm.git] / src / gdcmHeaderHelper.h
1 /*=========================================================================
2                                                                                 
3   Program:   gdcm
4   Module:    $RCSfile: gdcmHeaderHelper.h,v $
5   Language:  C++
6   Date:      $Date: 2004/10/12 04:35:46 $
7   Version:   $Revision: 1.22 $
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 GDCMHEADERHELPER_H
20 #define GDCMHEADERHELPER_H
21
22 #include "gdcmHeader.h"
23
24 namespace gdcm 
25 {
26
27 //-----------------------------------------------------------------------------
28 /*
29  * \defgroup SerieHeader
30  * \brief  
31  *
32  * - This class should be used for a stack of 2D dicom images.
33  * - For a multiframe dicom image better use directly HeaderHelper
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