1 /*=========================================================================
4 Module: $RCSfile: gdcmElementSet.h,v $
6 Date: $Date: 2006/01/31 11:39:47 $
7 Version: $Revision: 1.54 $
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"
30 typedef std::map<TagKey, DocEntry *> TagDocEntryHT;
32 //-----------------------------------------------------------------------------
35 * \ref ElementSet is based on the STL map<> container
36 * (see \ref ElementSet::TagHT), as opposed to \ref SQItem
37 * which is based on an STL list container (see \ref ListDocEntry).
38 * It contains the 'zero-level- DocEntry (out of any Dicom Sequence)
40 class GDCM_EXPORT ElementSet : public DocEntrySet
42 gdcmTypeMacro(ElementSet);
45 virtual void Print(std::ostream &os = std::cout,
46 std::string const &indent = "" );
48 void WriteContent(std::ofstream *fp, FileType filetype);
50 bool AddEntry(DocEntry *Entry);
51 bool RemoveEntry(DocEntry *EntryToRemove);
54 DocEntry *GetFirstEntry();
55 DocEntry *GetNextEntry();
56 DocEntry *GetDocEntry(uint16_t group, uint16_t elem);
57 /// Tells us if the ElementSet contains no entry
58 bool IsEmpty() { return TagHT.empty(); }
60 int IsVRCoherent(uint16_t group);
62 virtual void Copy(DocEntrySet *set);
67 /// \brief Some group are illegal withing some Dicom Documents
68 /// Only the Document knows it.
69 bool MayIWrite(uint16_t )
73 /// Hash Table (map), to provide fast access
75 /// iterator, used to visit the TagHT variable
76 TagDocEntryHT::iterator ItTagHT;
78 } // end namespace gdcm
79 //-----------------------------------------------------------------------------