]> Creatis software - gdcm.git/blobdiff - src/gdcmElValSet.h
gdcmElValSet::SetElValueByNumber and gdcmElValSet::SetElValueByName
[gdcm.git] / src / gdcmElValSet.h
index ba351707f53fd19f218993c2bfe2c658c6029744..ae30bc55f16c45d24d19de16222780b57fa39596 100644 (file)
@@ -1,4 +1,4 @@
-// $Header: /cvs/public/gdcm/src/Attic/gdcmElValSet.h,v 1.3 2003/03/12 21:33:20 frog Exp $
+// $Header: /cvs/public/gdcm/src/Attic/gdcmElValSet.h,v 1.11 2003/04/16 08:03:27 frog Exp $
 
 #ifndef GDCMELVALSET_H
 #define GDCMELVALSET_H
@@ -14,27 +14,38 @@ typedef map<TagKey, gdcmElValue*> TagElValueHT;
 typedef map<string, gdcmElValue*> TagElValueNameHT;
 
 class GDCM_EXPORT gdcmElValSet {
-       TagElValueHT tagHt;             // Both accesses with a TagKey or with a
-       TagElValueNameHT NameHt;        // the DictEntry.Name are required.
+   TagElValueHT tagHt;             // Both accesses with a TagKey or with a
+   TagElValueNameHT NameHt;        // the DictEntry.Name are required.
+   
+   typedef string GroupKey;
+   typedef map<GroupKey, int> GroupHT; 
+   
 public:        
-       void Add(gdcmElValue*);         
-       void Print(ostream &);
-       void PrintByName(ostream &);
-       int  Write(FILE *fp);
-       int  WriteAcr(FILE *fp);
-       gdcmElValue* GetElementByNumber(guint32 group, guint32 element);
-       gdcmElValue* GetElementByName  (string);
-       string   GetElValueByNumber(guint32 group, guint32 element);
-       string   GetElValueByName  (string);
+   ~gdcmElValSet();
+   void Add(gdcmElValue*);
+                       
+   void Print(ostream &);
+   void PrintByName(ostream &);
+   int  Write(FILE *fp, FileType type);
+
+   gdcmElValue* GetElementByNumber(guint16 group, guint16 element);
+   gdcmElValue* GetElementByName  (string);
+   string   GetElValueByNumber(guint16 group, guint16 element);
+   string   GetElValueByName  (string);
        
-       TagElValueHT & GetTagHt(void);  
+   TagElValueHT & GetTagHt(void);      
        
-       int SetElValueByNumber(string content, guint32 group, guint32 element);
-       int SetElValueByName  (string content, string TagName);
+   int SetElValueByNumber(string content, guint16 group, guint16 element);
+   int SetElValueByName  (string content, string TagName);
        
-       int SetElValueLengthByNumber(guint32 l, guint32 group, guint32 element);
-       int SetElValueLengthByName  (guint32 l, string TagName);
+   int SetElValueLengthByNumber(guint32 l, guint16 group, guint16 element);
+   int SetElValueLengthByName  (guint32 l, string TagName);
 
+   guint32 GenerateFreeTagKeyInGroup(guint16 group);
+       
+private:
+   void UpdateGroupLength(bool SkipSequence = false, FileType type = ImplicitVR);
+   void WriteElements(FileType type, FILE *);
 };
 
 #endif