X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=src2%2FcreaImageIOTreeAttributeDescriptor.h;fp=src2%2FcreaImageIOTreeAttributeDescriptor.h;h=49c975b4bea28ebcf50bba6ba93b37c8b88d466e;hb=5f76a3752cd6e23874e8167f19c9ceb57223b390;hp=1508868d3e29d26106221fdbd5dfdb5be1e8544c;hpb=b2e15b58dfa9d444764952a94e37164f2cea58c2;p=creaImageIO.git diff --git a/src2/creaImageIOTreeAttributeDescriptor.h b/src2/creaImageIOTreeAttributeDescriptor.h index 1508868..49c975b 100644 --- a/src2/creaImageIOTreeAttributeDescriptor.h +++ b/src2/creaImageIOTreeAttributeDescriptor.h @@ -25,6 +25,14 @@ namespace creaImageIO /// The attribute enters in label constitution (for printing) static const unsigned int LABEL; + /// Types + /// The attribute is of numeric type + static const unsigned int NUMBER=1; + /// The attribute is of string type + static const unsigned int STRING=2; + /// The attribute's type is unknown + static const unsigned int UNKNOWN=0; + /// Default ctor AttributeDescriptor() : mKey(""), mName(""), mGroup(0), mElement(0), mFlags(0) @@ -61,6 +69,8 @@ namespace creaImageIO unsigned short GetElement() const { return mElement; } /// Returns the flags of the attribute unsigned int GetFlags() const { return mFlags; } + /// Returns the type of the attribute + unsigned int GetType() const { return mType; } /// Extracts group and element from a key of the form "Dgroup_elem" static void GetDicomGroupElementFromKey(const std::string& key, @@ -70,12 +80,15 @@ namespace creaImageIO /// Replace simple quote by double quotes /// Cut string at NULL chars void CleanName(std::string& str) const; + ///Decodes the attribute into accepted types + void DecodeType(); private: std::string mKey; std::string mName; unsigned short mGroup; unsigned short mElement; unsigned int mFlags; + unsigned int mType; }; // EO class AttributeDescriptor //=====================================================================