1 /*=========================================================================
4 Module: $RCSfile: gdcmElementSet.h,v $
6 Date: $Date: 2005/10/18 09:17:08 $
7 Version: $Revision: 1.47 $
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 GDCMELEMENTSET_H
20 #define GDCMELEMENTSET_H
22 #include "gdcmDocEntrySet.h"
32 typedef std::map<TagKey, DocEntry *> TagDocEntryHT;
34 //-----------------------------------------------------------------------------
37 * \ref ElementSet is based on the STL map<> container
38 * (see \ref ElementSet::TagHT), as opposed to \ref SQItem
39 * which is based on an STL list container (see \ref ListDocEntry).
40 * It contains the 'zero-level- DocEntry (out of any Dicom Sequence)
42 class GDCM_EXPORT ElementSet : public DocEntrySet
48 virtual void Print(std::ostream &os = std::cout,
49 std::string const &indent = "" );
51 void WriteContent(std::ofstream *fp, FileType filetype);
53 bool AddEntry(DocEntry *Entry);
54 bool RemoveEntry(DocEntry *EntryToRemove);
55 bool RemoveEntryNoDestroy(DocEntry *EntryToRemove);
58 DocEntry *GetFirstEntry();
59 DocEntry *GetNextEntry();
60 DocEntry *GetDocEntry(uint16_t group, uint16_t elem);
61 /// Tells us if the ElementSet contains no entry
62 bool IsEmpty() { return TagHT.empty(); }
68 /// Hash Table (map), to provide fast access
70 /// iterator, used to visit the TagHT variable
71 TagDocEntryHT::iterator ItTagHT;
73 } // end namespace gdcm
74 //-----------------------------------------------------------------------------