GimmickDebugMessage(3,"AttributeDescriptor : '"<<key
<<"' ["<<flags<<"]"<<std::endl);
GimmickDebugMessage(3,"='"<<mName<<"'"<<std::endl);
- DecodeType();
}
//=====================================================================
{
mName = entry->GetName();
CleanName(mName);
- DecodeType();
GimmickDebugMessage(3,"='"<<mName<<"'"<<std::endl);
}
else
<<"Considering it as a user attribute"
<< std::endl);
mName = "UNKNOWN";
- mGroup = mElement = mType = 0;
- DecodeType();
+ mGroup = mElement = 0;
}
}
}
return;
}
+
//=====================================================================
- ///Decodes the type of attribute into the valid groups
- void AttributeDescriptor::DecodeType()
- {
- // Retrieve the name from gdcm dict
+ /// Decodes the type of the attribute
+ void AttributeDescriptor::DecodeType(unsigned int& typ) const
+ {
+
+
+ // Retrieve the name from gdcm dict
GDCM_NAME_SPACE::DictEntry* entry =
GDCM_NAME_SPACE::Global::GetDicts()
- ->GetDefaultPubDict()->GetEntry(mGroup,mElement);
+ ->GetDefaultPubDict()->GetEntry(GetGroup(),GetElement());
std::string type = entry->GetVR().str();
- CleanName(type);
GimmickDebugMessage(3,"VR Value is "<<type<<"!"<<std::endl);
if(type=="AS" ||
type=="DA" ||
type=="US" ||
type=="SH")
{
- mType=1;
+ type="1";
+ sscanf(type.c_str(),"%u",&typ);
}
else
{
- mType=2;
+ type="2";
+ sscanf(type.c_str(),"%u",&typ);
}
-
- }
+
+ }
+ //=====================================================================
} // EO namespace tree