1 // $Header: /cvs/public/gdcm/src/Attic/gdcmElValSet.h,v 1.7 2003/04/07 15:04:40 frog Exp $
6 #include <stdio.h> // FIXME For FILE on GCC only
8 #include "gdcmCommon.h"
9 #include "gdcmElValue.h"
11 ////////////////////////////////////////////////////////////////////////////
12 // Container for a set of successfully parsed ElValues.
13 typedef map<TagKey, gdcmElValue*> TagElValueHT;
14 typedef map<string, gdcmElValue*> TagElValueNameHT;
16 class GDCM_EXPORT gdcmElValSet {
17 TagElValueHT tagHt; // Both accesses with a TagKey or with a
18 TagElValueNameHT NameHt; // the DictEntry.Name are required.
19 //FIXME This is redundant with gdcmHeader::FileType enum. That sux !
25 void Add(gdcmElValue*);
27 //void ReplaceOrCreate(gdcmElValue*);
28 void Print(ostream &);
29 void PrintByName(ostream &);
31 int WriteAcr(FILE *fp);
32 int WriteExplVR(FILE *fp);
34 gdcmElValue* GetElementByNumber(guint16 group, guint16 element);
35 gdcmElValue* GetElementByName (string);
36 string GetElValueByNumber(guint16 group, guint16 element);
37 string GetElValueByName (string);
39 TagElValueHT & GetTagHt(void);
41 int SetElValueByNumber(string content, guint16 group, guint16 element);
42 int SetElValueByName (string content, string TagName);
44 int SetElValueLengthByNumber(guint32 l, guint16 group, guint16 element);
45 int SetElValueLengthByName (guint32 l, string TagName);
47 guint32 GenerateFreeTagKeyInGroup(guint16 group);
50 void UpdateGroupLength(bool SkipSequence = false);
51 void WriteElements(FileType type, FILE *);