]> Creatis software - gdcm.git/blob - src/gdcmElValSet.h
Update for writting DCM files
[gdcm.git] / src / gdcmElValSet.h
1 // $Header: /cvs/public/gdcm/src/Attic/gdcmElValSet.h,v 1.6 2003/04/01 14:07:40 jpr Exp $
2
3 #ifndef GDCMELVALSET_H
4 #define GDCMELVALSET_H
5
6 #include <stdio.h>    // FIXME For FILE on GCC only
7 #include <map>
8 #include "gdcmCommon.h"
9 #include "gdcmElValue.h"
10
11 ////////////////////////////////////////////////////////////////////////////
12 // Container for a set of successfully parsed ElValues.
13 typedef map<TagKey, gdcmElValue*> TagElValueHT;
14 typedef map<string, gdcmElValue*> TagElValueNameHT;
15
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 public: 
20         void Add(gdcmElValue*); 
21         // TODO
22         //void ReplaceOrCreate(gdcmElValue*);           
23         void Print(ostream &);
24         void PrintByName(ostream &);
25         int  Write(FILE *fp);
26         int  WriteAcr(FILE *fp);
27         int  WriteExplVR(FILE *fp);
28
29         gdcmElValue* GetElementByNumber(guint32 group, guint32 element);
30         gdcmElValue* GetElementByName  (string);
31         string   GetElValueByNumber(guint32 group, guint32 element);
32         string   GetElValueByName  (string);
33         
34         TagElValueHT & GetTagHt(void);  
35         
36         int SetElValueByNumber(string content, guint32 group, guint32 element);
37         int SetElValueByName  (string content, string TagName);
38         
39         int SetElValueLengthByNumber(guint32 l, guint32 group, guint32 element);
40         int SetElValueLengthByName  (guint32 l, string TagName);
41         
42    guint32 GenerateFreeTagKeyInGroup(guint32 group);
43
44 };
45
46 #endif