1 #include <creaImageIOTreeAttributeDescriptor.h>
3 #include <gdcmGlobal.h>
4 #include <gdcmDictSet.h>
13 // Ctor with name and flags
14 // If the name is of the form "1056|8948" (a pipe at 5th position)
15 // it is interpreted as a Dicom Tag
16 // The user name is retreived from dicom dictionnary
17 // and the group and elem are filled
18 AttributeDescriptor::AttributeDescriptor(const std::string& key,
20 : mKey(key), mGroup(0), mElement(0), mFlags(flags)
22 // Is the key a Dicom tag ?
23 if ((key.size()==9)&&(key[4]=='|'))
25 // Decode group & elem
26 sscanf(key.c_str(),"%04x|%04x",&mGroup,&mElement);
27 // Retrieve the name from gdcm dict
28 GDCM_NAME_SPACE::DictEntry* entry =
29 GDCM_NAME_SPACE::Global::GetDicts()
30 ->GetDefaultPubDict()->GetEntry(mGroup,mElement);
31 mName = entry->GetName();
41 } // EO namespace tree
43 } // EO namespace creaImageIO