X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=src%2FgdcmElValSet.h;h=c5b59ed53cb990f1363aaa560ff832910450ac12;hb=595f90023c498f01bba240043841088ba5d45872;hp=c98ac24f40a8e9cd1b9287b72fc229a285915805;hpb=153db29d779f82893684c6aac08b0a565dd84334;p=gdcm.git diff --git a/src/gdcmElValSet.h b/src/gdcmElValSet.h index c98ac24f..c5b59ed5 100644 --- a/src/gdcmElValSet.h +++ b/src/gdcmElValSet.h @@ -1,4 +1,4 @@ -// $Header: /cvs/public/gdcm/src/Attic/gdcmElValSet.h,v 1.5 2003/03/24 13:11:28 frog Exp $ +// $Header: /cvs/public/gdcm/src/Attic/gdcmElValSet.h,v 1.10 2003/04/09 14:04:53 jpr Exp $ #ifndef GDCMELVALSET_H #define GDCMELVALSET_H @@ -14,29 +14,37 @@ typedef map TagElValueHT; typedef map 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 GroupHT; + public: - void Add(gdcmElValue*); - void ReplaceOrCreate(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); + 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); - guint32 GenerateFreeTagKeyInGroup(guint32 group); + 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