1 // $Header: /cvs/public/gdcm/src/Attic/gdcmElValSet.h,v 1.20 2004/01/12 13:12:28 regrain Exp $
6 #include "gdcmCommon.h"
7 #include "gdcmElValue.h"
11 #include <list> // for linking together *all* the Dicom Elements
14 * Container for a set of successfully parsed ElValues.
16 typedef std::map<TagKey, gdcmElValue*> TagElValueHT;
17 typedef std::map<std::string, gdcmElValue*> TagElValueNameHT;
19 typedef std::string GroupKey;
20 typedef std::map<GroupKey, int> GroupHT;
22 typedef std::list<gdcmElValue*> ListTag; // for linking together the Elements
24 class GDCM_EXPORT gdcmElValSet {
25 TagElValueHT tagHt; // Both accesses with a TagKey or with a
26 TagElValueNameHT NameHt; // the DictEntry.Name are required.
31 void Add(gdcmElValue*);
33 void Print(std::ostream &);
34 void PrintByName(std::ostream &);
35 int Write(FILE *fp, FileType type);
37 gdcmElValue* GetElementByNumber(guint16 group, guint16 element);
38 gdcmElValue* GetElementByName (std::string);
39 std::string GetElValueByNumber(guint16 group, guint16 element);
40 std::string GetElValueByName (std::string);
42 TagElValueHT & GetTagHt(void) {return tagHt;};
43 ListTag & GetListElem(void) {return listElem;};
45 int SetElValueByNumber(std::string content, guint16 group, guint16 element);
46 int SetElValueByName (std::string content, std::string TagName);
48 int SetElValueLengthByNumber(guint32 l, guint16 group, guint16 element);
49 int SetElValueLengthByName (guint32 l, std::string TagName);
51 int SetVoidAreaByNumber(void *a, guint16 Group, guint16 Elem );
53 guint32 GenerateFreeTagKeyInGroup(guint16 group);
54 int CheckIfExistByNumber(guint16 Group, guint16 Elem );
57 void UpdateGroupLength(bool SkipSequence = false, FileType type = ImplicitVR);
58 void WriteElements(FileType type, FILE *);