Hi!
Here is the piece of code:
***************
DcmDataset *pDataset = m_pDcmFileFormat->getDataset();
OFString strTagValue;
pDataset->findAndGetOFStringArray(TagKey1, strTagValue);
cout << strTagValue.c_str(); // the value is correct, for example "bla-bla-bla"
pDataset->findAndGetOFStringArray(TagKey2, strTagValue);
// returns "good", but the attribute value is not set, it has a zero length
cout << strTagValue.c_str();// the value remains the same, "bla-bla-bla"
***********************
So one has to add strTagValue.clear() before the second call
of findAndGetOFStringArray();
If it is "as designed", I think it has to be documented somewhere, because it may cause "bugs" in the application.
Or I missed something?
Best Regards,
Alexander.
findAndGetOFStringArray - the string is not cleared
Moderator: Moderator Team
-
- Posts: 53
- Joined: Thu, 2005-04-14, 15:07
- Location: St. Petersburg, Russia
-
- ICSMED DICOM Services
- Posts: 2217
- Joined: Fri, 2004-10-29, 21:38
- Location: Oldenburg, Germany
Who is online
Users browsing this forum: Bing [Bot] and 1 guest