X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;ds=sidebyside;f=src2%2FcreaImageIOTreeAttributeDescriptor.h;h=ad4d7bfe601fe38922f3fb3b10fae6e97b482cb4;hb=b3ff178d3759a8dbe3d02bcc178d8e22996f98b5;hp=9a2f082c6dc403bf43dbe581c9c2689971bd2739;hpb=f7c6131e319e426656a0b3b066b96236ee66bb3c;p=creaImageIO.git diff --git a/src2/creaImageIOTreeAttributeDescriptor.h b/src2/creaImageIOTreeAttributeDescriptor.h index 9a2f082..ad4d7bf 100644 --- a/src2/creaImageIOTreeAttributeDescriptor.h +++ b/src2/creaImageIOTreeAttributeDescriptor.h @@ -10,7 +10,7 @@ namespace creaImageIO namespace tree { /** - * \ingroup Model + * \ingroup Tree */ //===================================================================== /// Descriptor of an attribute of a node of a Tree (name, dicom group/element) @@ -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 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() : mKey(""), mName(""), mGroup(0), mElement(0), mFlags(0) @@ -61,7 +69,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 +78,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;