]> Creatis software - gdcm.git/blob - src/gdcmSerieHeader.h
Stage 2 of names normalization :
[gdcm.git] / src / gdcmSerieHeader.h
1 /*=========================================================================
2                                                                                 
3   Program:   gdcm
4   Module:    $RCSfile: gdcmSerieHeader.h,v $
5   Language:  C++
6   Date:      $Date: 2005/01/21 11:40:56 $
7   Version:   $Revision: 1.7 $
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 File;
28 //-----------------------------------------------------------------------------
29 /**
30  * \brief  
31  * - This class should be used for a stack of 2D dicom images.
32  */
33 class GDCM_EXPORT SerieHeader 
34 {
35 public:
36    typedef std::list<File* > GdcmFileList;
37
38     SerieHeader();
39     ~SerieHeader();
40
41    /// \todo should return bool or throw error ?
42    void AddFileName(std::string const &filename);
43    void SetDirectory(std::string const &dir);
44    void OrderGdcmFileList();
45    
46    /// \brief Gets the *coherent* File List
47    /// @return the *coherent* File List
48    /// Caller must call OrderGdcmFileList first
49    const GdcmFileList &GetGdcmFileList() { return CoherentGdcmFileList; }
50
51 private:
52    bool ImagePositionPatientOrdering();
53    bool ImageNumberOrdering();
54    bool FileNameOrdering();
55    
56    GdcmFileList CoherentGdcmFileList;
57    /// Ref to the current Serie Instance UID to avoid mixing two series
58    /// within the same directory
59    std::string    CurrentSerieUID;
60 };
61
62 } // end namespace gdcm
63
64 //-----------------------------------------------------------------------------
65 #endif