X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=src2%2FcreaImageIOTreeAttributeDescriptor.h;h=1ae86ddeb89c94381cc240dbf589a31c6d33abf6;hb=ecd7eb9aca5b98c06f3ce9072b3f73fe71f1e4b0;hp=49c975b4bea28ebcf50bba6ba93b37c8b88d466e;hpb=5f76a3752cd6e23874e8167f19c9ceb57223b390;p=creaImageIO.git diff --git a/src2/creaImageIOTreeAttributeDescriptor.h b/src2/creaImageIOTreeAttributeDescriptor.h index 49c975b..1ae86dd 100644 --- a/src2/creaImageIOTreeAttributeDescriptor.h +++ b/src2/creaImageIOTreeAttributeDescriptor.h @@ -24,14 +24,16 @@ namespace creaImageIO static const unsigned int IDENTIFIER; /// The attribute enters in label constitution (for printing) static const unsigned int LABEL; + /// The attribute can be edited + static const unsigned int EDITABLE; /// Types /// The attribute is of numeric type - static const unsigned int NUMBER=1; + static const int NUMBER=1; /// The attribute is of string type - static const unsigned int STRING=2; + static const int STRING=2; /// The attribute's type is unknown - static const unsigned int UNKNOWN=0; + static const int UNKNOWN=0; /// Default ctor AttributeDescriptor() @@ -69,9 +71,7 @@ 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, unsigned short& group, @@ -80,15 +80,21 @@ 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(); + ///Decodes the type of attribute into the existing ones + void DecodeType(unsigned int& type) const; + + /// Determines if Attribute is a date + bool isDateEntry() const; + + /// Determines if Attribute is a time + bool isTimeEntry() const; + private: std::string mKey; std::string mName; unsigned short mGroup; unsigned short mElement; unsigned int mFlags; - unsigned int mType; }; // EO class AttributeDescriptor //=====================================================================