X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=src2%2FcreaImageIOTreeAttributeDescriptor.h;h=68f0da965af186c68791c86404a7b812ae6fcf65;hb=599c3e394fcdb35540a801b7a5418a7ed33d79da;hp=3226f5290d88642ac1e85f202f863270c633f13e;hpb=f08880c40f6304be640c7f8702bbbe96f8d50b40;p=creaImageIO.git diff --git a/src2/creaImageIOTreeAttributeDescriptor.h b/src2/creaImageIOTreeAttributeDescriptor.h index 3226f52..68f0da9 100644 --- a/src2/creaImageIOTreeAttributeDescriptor.h +++ b/src2/creaImageIOTreeAttributeDescriptor.h @@ -10,10 +10,10 @@ namespace creaImageIO namespace tree { /** - * \ingroup Model + * \ingroup Tree */ //===================================================================== - /// Descriptor of an attribute of a node of a tree (name, dicom group/element) + /// Descriptor of an attribute of a node of a Tree (name, dicom group/element) class AttributeDescriptor { public: @@ -24,6 +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 int NUMBER=1; + /// The attribute is of string type + static const int STRING=2; + /// The attribute's type is unknown + static const int UNKNOWN=0; /// Default ctor AttributeDescriptor() @@ -61,7 +71,7 @@ namespace creaImageIO unsigned short GetElement() const { return mElement; } /// Returns the flags of the attribute unsigned int GetFlags() const { return mFlags; } - + /// Extracts group and element from a key of the form "Dgroup_elem" static void GetDicomGroupElementFromKey(const std::string& key, unsigned short& group, @@ -70,6 +80,12 @@ namespace creaImageIO /// Replace simple quote by double quotes /// Cut string at NULL chars void CleanName(std::string& str) const; + ///Decodes the type of attribute into the existing ones + void DecodeType(unsigned int& type) const; + + bool isDateEntry() const; + bool isTimeEntry() const; + private: std::string mKey; std::string mName;