X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=src2%2FcreaImageIOTreeAttributeDescriptor.cpp;h=08fd784d9e26960199d35fc69585051121022305;hb=71365e2ce56b1ccf93054818d5d5cf64bcbaafb4;hp=799cb12cc2210b357912d40d78e805234f53f1d9;hpb=5f76a3752cd6e23874e8167f19c9ceb57223b390;p=creaImageIO.git diff --git a/src2/creaImageIOTreeAttributeDescriptor.cpp b/src2/creaImageIOTreeAttributeDescriptor.cpp index 799cb12..08fd784 100644 --- a/src2/creaImageIOTreeAttributeDescriptor.cpp +++ b/src2/creaImageIOTreeAttributeDescriptor.cpp @@ -43,7 +43,6 @@ namespace creaImageIO GimmickDebugMessage(3,"AttributeDescriptor : '"<GetName(); CleanName(mName); - DecodeType(); GimmickDebugMessage(3,"='"<GetDefaultPubDict()->GetEntry(GetGroup(),GetElement()); + if( entry != 0) + { + if( entry->GetVR().str() == "DA" ) + { + btest = true; + } + } + return btest; + } + + //===================================================================== + /// test if the type is a time + bool AttributeDescriptor::isTimeEntry() const + { + + bool btest = false; + // Retrieve the name from gdcm dict + GDCM_NAME_SPACE::DictEntry* entry = GDCM_NAME_SPACE::Global::GetDicts()->GetDefaultPubDict()->GetEntry(GetGroup(),GetElement()); + if( entry != 0) + { + if( entry->GetVR().str() == "TM" ) + { + btest = true; + } + } + return btest; + } + + + //===================================================================== + /// 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()); + if (entry==0) + { + typ = 2; + return; + } std::string type = entry->GetVR().str(); - CleanName(type); GimmickDebugMessage(3,"VR Value is "<