1 /*=========================================================================
4 Module: $RCSfile: gdcmSerieHeader.h,v $
6 Date: $Date: 2005/01/30 17:22:55 $
7 Version: $Revision: 1.9 $
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.
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.
17 =========================================================================*/
19 #ifndef GDCMSERIEHEADER_H
20 #define GDCMSERIEHEADER_H
22 #include "gdcmCommon.h"
29 //-----------------------------------------------------------------------------
32 * - This class should be used for a stack of 2D dicom images.
33 * It allows to explore (recursively or not) a directory and
34 * makes a set of 'Coherent Files' list (coherent : same Serie UID)
35 * It allows to sort any of the Coherent File list on the image postion
37 class GDCM_EXPORT SerieHeader
40 typedef std::list<File* > GdcmFileList;
41 typedef std::map<std::string, GdcmFileList *> CoherentFileListmap;
47 /// \todo should return bool or throw error ?
48 void AddFileName(std::string const &filename);
49 void SetDirectory(std::string const &dir, bool recursive=false);
50 void OrderGdcmFileList(GdcmFileList *CoherentGdcmFileList);
52 /// \brief Gets the FIRST *coherent* File List.
53 /// Deprecated; kept not to break the API
54 /// \note Caller must call OrderGdcmFileList first
55 /// @return the (first) *coherent* File List
56 const GdcmFileList &GetGdcmFileList() { return
57 *CoherentGdcmFileListHT.begin()->second; }
59 GdcmFileList *GetFirstCoherentFileList();
60 GdcmFileList *GetNextCoherentFileList();
61 GdcmFileList *GetCoherentFileList(std::string SerieUID);
64 bool ImagePositionPatientOrdering(GdcmFileList *CoherentGdcmFileList);
65 bool ImageNumberOrdering(GdcmFileList *CoherentGdcmFileList);
66 bool FileNameOrdering(GdcmFileList *CoherentGdcmFileList);
68 CoherentFileListmap CoherentGdcmFileListHT;
69 CoherentFileListmap::iterator ItListHt;
72 } // end namespace gdcm
74 //-----------------------------------------------------------------------------