X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=src%2FgdcmElValSet.h;h=aa5be34e5dfbc44702e26cfba5e8129b3a4c26d4;hb=a26e6f06a76ec85504cf65288e7c47f2cd728641;hp=eccd5584ab8e15cc35cf6bdc8f4b210f2650fdb5;hpb=25efc388a88895fc1ba2b961d5f27488ab3c073c;p=gdcm.git diff --git a/src/gdcmElValSet.h b/src/gdcmElValSet.h index eccd5584..aa5be34e 100644 --- a/src/gdcmElValSet.h +++ b/src/gdcmElValSet.h @@ -1,4 +1,4 @@ -// gdcmElValSet.h +// $Header: /cvs/public/gdcm/src/Attic/gdcmElValSet.h,v 1.14 2003/06/17 17:44:48 jpr Exp $ #ifndef GDCMELVALSET_H #define GDCMELVALSET_H @@ -10,31 +10,42 @@ //////////////////////////////////////////////////////////////////////////// // Container for a set of successfully parsed ElValues. -typedef map TagElValueHT; -typedef map TagElValueNameHT; -class GDCM_EXPORT ElValSet { - TagElValueHT tagHt; // Both accesses with a TagKey or with a - TagElValueNameHT NameHt; // the DictEntry.Name are required. +typedef std::map TagElValueHT; +typedef std::map TagElValueNameHT; + +class GDCM_EXPORT gdcmElValSet { + TagElValueHT tagHt; // Both accesses with a TagKey or with a + TagElValueNameHT NameHt; // the DictEntry.Name are required. + + typedef std::string GroupKey; + typedef std::map GroupHT; public: - void Add(ElValue*); - void Print(ostream &); - void PrintByName(ostream &); - int Write(FILE *fp); - int WriteAcr(FILE *fp); - ElValue* GetElementByNumber(guint32 group, guint32 element); - ElValue* GetElementByName (string); - string GetElValueByNumber(guint32 group, guint32 element); - string GetElValueByName (string); + ~gdcmElValSet(); + void Add(gdcmElValue*); + + void Print(std::ostream &); + void PrintByName(std::ostream &); + int Write(FILE *fp, FileType type); + + gdcmElValue* GetElementByNumber(guint16 group, guint16 element); + gdcmElValue* GetElementByName (std::string); + std::string GetElValueByNumber(guint16 group, guint16 element); + std::string GetElValueByName (std::string); - TagElValueHT & GetTagHt(void); + TagElValueHT & GetTagHt(void); - int SetElValueByNumber(string content, guint32 group, guint32 element); - int SetElValueByName (string content, string TagName); + int SetElValueByNumber(std::string content, guint16 group, guint16 element); + int SetElValueByName (std::string content, std::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, std::string TagName); + guint32 GenerateFreeTagKeyInGroup(guint16 group); + +private: + void UpdateGroupLength(bool SkipSequence = false, FileType type = ImplicitVR); + void WriteElements(FileType type, FILE *); }; #endif