X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;ds=inline;f=src%2FcreaImageIOTreeDescriptor.cpp;h=6b176c90af68ec6e746551a166500dcec76774c4;hb=bf3660569b1baa8be10fc708f595efc66afe3334;hp=852479456716b6cd3e4d1ea266c1499d6b034712;hpb=effdfb42412ad29eb0e9bc5619b2264bb2e282ef;p=creaImageIO.git diff --git a/src/creaImageIOTreeDescriptor.cpp b/src/creaImageIOTreeDescriptor.cpp index 8524794..6b176c9 100644 --- a/src/creaImageIOTreeDescriptor.cpp +++ b/src/creaImageIOTreeDescriptor.cpp @@ -272,5 +272,28 @@ namespace creaImageIO } } } + + + //================================================================== + // test if an attribute is present in DescriptionList + // return level's name + const std::string Descriptor::isExist(const std::string i_attr) + { + std::string name = ""; + LevelDescriptorListType::const_iterator l = GetLevelDescriptorList().begin(); + for (; l!= GetLevelDescriptorList().end(); ++l) + { + LevelDescriptor::AttributeDescriptorListType::const_iterator a = l->GetAttributeDescriptorList().begin(); + for(;a!= l->GetAttributeDescriptorList().end(); ++a) + { + if (a->GetKey() == i_attr) + { + name = l->GetName(); + break; + } + } + } + return name.c_str(); + } } }