1 #ifndef __creaImageIOTreeLevelDescriptor_h_INCLUDED__
2 #define __creaImageIOTreeLevelDescriptor_h_INCLUDED__
4 #include <creaImageIOTreeAttributeDescriptor.h>
15 //=====================================================================
16 /// Descriptor of a level of a Tree (name, attributes, ...)
21 LevelDescriptor(const std::string& name) : mName(name) {}
25 /// Returns the name of the level
26 const std::string& GetName() const { return mName; }
28 /// Returns the number of attributes of the level
29 unsigned int GetNumberOfAttributes() const
30 { return mAttributeDescriptorList.size(); }
32 /// Adds the AttributeDescriptor to the list
33 void Add(const AttributeDescriptor&);
35 /// The type of attribute container
36 typedef std::vector<AttributeDescriptor> AttributeDescriptorListType;
38 /// Returns the list of AttributeDescriptor (const)
39 /// type = 0 all attributes
40 /// type = 1 without ID and PATIENT_ID
41 const AttributeDescriptorListType& GetAttributeDescriptorList(int type = 0) const
43 return mAttributeDescriptorList;
45 return mAttributeDescriptorListWID;
48 /// Copy the original list of attributes
49 void CopyAttributeDescriptorList();
51 /// \return The list of attributes with flag IDENTIFIER set
52 const std::vector<std::string>& GetIdentifierList() const
53 { return mIdentifierList; }
54 /// \return The list of attributes with flag LABEL set
55 const std::vector<std::string>& GetLabelList() const
56 { return mLabelList; }
60 // Attributes List for this level
61 AttributeDescriptorListType mAttributeDescriptorList;
62 // Attributes List for this level without ID and PARENT_ID attributes
63 AttributeDescriptorListType mAttributeDescriptorListWID;
64 /// The list of attributes with flag IDENTIFIER set
65 std::vector<std::string> mIdentifierList;
66 /// The list of attributes with flag LABEL set
67 std::vector<std::string> mLabelList;
70 // EO class LevelDescriptor
71 //=====================================================================
75 } // EO namespace creaImageIO