DCMTK Setting and reading the AE Source Tag

119 Views Asked by At

When exporting a DICOM file, I set these two tags in exactly the same way:

putAndInsertString(metaInfo, DCM_ImplementationVersionName, pDD->Imp_Version_Name);    
putAndInsertString(metaInfo, DCM_SourceApplicationEntityTitle, pDD->Source_AE_Title); 

When receiving at the other end, I pull them out in the same way:

if (metaInfo->findAndGetOFString(DCM_ImplementationVersionName, tmpStr).good())      
{
    pDD->Imp_Version_Name = tmpStr.c_str();
}
else AddToLog("No Imp_Version_Name in metaInfo");
    
if (metaInfo->findAndGetOFString(DCM_SourceApplicationEntityTitle, tmpStr).good())      
{
    pDD->Source_AE_Title = tmpStr.c_str();
}
else AddToLog("No Source AE Title in metaInfo");

The Imp_Version_Name tag is recieved fine, but the AE Title tag is not. The returned error info is: theStatus = error, theCode = 2, and theText = Tag not found

So, the only difference is that the AE Title VR type is AE instead of some string type? Should I use something other than 'findAndGetOFString' to pull it out? But DCMTK doc says this should work for AE type...

I have also tried, and had exact same results when I instead use the tag DCM_SendingApplicationEntityTitle

What is going on?

0

There are 0 best solutions below