X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=src%2FgdcmElValSet.h;h=37283f1334d5fd37b5680e3e5f30dd2d68cdcb2a;hb=9f643008e8a960617fb30ed9dcd454612657e5d2;hp=b2ff14c6c616e470da9105f1dfd1663aad093183;hpb=45c3270f0afbdb22a10da1fa2c993125ca960304;p=gdcm.git diff --git a/src/gdcmElValSet.h b/src/gdcmElValSet.h index b2ff14c6..37283f13 100644 --- a/src/gdcmElValSet.h +++ b/src/gdcmElValSet.h @@ -1,4 +1,4 @@ -// $Header: /cvs/public/gdcm/src/Attic/gdcmElValSet.h,v 1.6 2003/04/01 14:07:40 jpr Exp $ +// $Header: /cvs/public/gdcm/src/Attic/gdcmElValSet.h,v 1.15 2003/06/26 13:07:01 jpr Exp $ #ifndef GDCMELVALSET_H #define GDCMELVALSET_H @@ -10,37 +10,43 @@ //////////////////////////////////////////////////////////////////////////// // Container for a set of successfully parsed ElValues. -typedef map TagElValueHT; -typedef map TagElValueNameHT; + +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. + 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(gdcmElValue*); - // TODO - //void ReplaceOrCreate(gdcmElValue*); - void Print(ostream &); - void PrintByName(ostream &); - int Write(FILE *fp); - int WriteAcr(FILE *fp); - int WriteExplVR(FILE *fp); - - gdcmElValue* GetElementByNumber(guint32 group, guint32 element); - gdcmElValue* GetElementByName (string); - string GetElValueByNumber(guint32 group, guint32 element); - string GetElValueByName (string); - - TagElValueHT & GetTagHt(void); + ~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); - int SetElValueByNumber(string content, guint32 group, guint32 element); - int SetElValueByName (string content, string TagName); + TagElValueHT & GetTagHt(void); - int SetElValueLengthByNumber(guint32 l, guint32 group, guint32 element); - int SetElValueLengthByName (guint32 l, string TagName); + int SetElValueByNumber(std::string content, guint16 group, guint16 element); + int SetElValueByName (std::string content, std::string TagName); - guint32 GenerateFreeTagKeyInGroup(guint32 group); + int SetElValueLengthByNumber(guint32 l, guint16 group, guint16 element); + int SetElValueLengthByName (guint32 l, std::string TagName); + guint32 GenerateFreeTagKeyInGroup(guint16 group); + int CheckIfExistByNumber(guint16 Group, guint16 Elem ); + +private: + void UpdateGroupLength(bool SkipSequence = false, FileType type = ImplicitVR); + void WriteElements(FileType type, FILE *); }; #endif