]> Creatis software - gdcm.git/blob - src/gdcmHeaderHelper.h
ENH: const'ify gdcmFile thus remove double signature with const char*
[gdcm.git] / src / gdcmHeaderHelper.h
1 /*=========================================================================
2                                                                                 
3   Program:   gdcm
4   Module:    $RCSfile: gdcmHeaderHelper.h,v $
5   Language:  C++
6   Date:      $Date: 2004/06/21 04:18:26 $
7   Version:   $Revision: 1.17 $
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.htm 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 //-----------------------------------------------------------------------------
25
26 class GDCM_EXPORT gdcmHeaderHelper : public gdcmHeader
27 {
28 };
29
30 /*
31  * \defgroup gdcmSerieHeader
32  * \brief  
33  *
34  * - This class should be used for a stack of 2D dicom images.
35  * - For a multiframe dicom image better use directly gdcmHeaderHelper
36 */
37 class GDCM_EXPORT gdcmSerieHeader {
38 public:
39     gdcmSerieHeader() {};
40     ~gdcmSerieHeader();
41
42    void AddFileName(std::string filename); //should return bool or throw error ?
43    void AddGdcmFile(gdcmHeader *file);
44    void SetDirectory(std::string dir);
45    void OrderGdcmFileList();
46    
47    inline gdcmHeader *GetGdcmHeader()
48    {
49       //Assume all element in the list have the same global infos
50       return CoherentGdcmFileList.front();
51    }
52    
53    std::list<gdcmHeader*>& GetGdcmFileList();
54
55 private:
56    bool ImagePositionPatientOrdering();
57    bool ImageNumberOrdering();
58    bool FileNameOrdering();
59    
60    std::list<gdcmHeader*> CoherentGdcmFileList;
61 };
62
63 //-----------------------------------------------------------------------------
64 #endif