]> Creatis software - creaImageIO.git/blobdiff - src/creaImageIOTreeDescriptor.cpp
new Output format and structure for Gimmick. Based on creaImageIO Output document...
[creaImageIO.git] / src / creaImageIOTreeDescriptor.cpp
index 852479456716b6cd3e4d1ea266c1499d6b034712..6b176c90af68ec6e746551a166500dcec76774c4 100644 (file)
@@ -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();
+       }
   }
 }