Skip to content

Instantly share code, notes, and snippets.

@JulesGorny
Created September 25, 2014 13:56
Show Gist options
  • Save JulesGorny/094845810f294d48588f to your computer and use it in GitHub Desktop.
Save JulesGorny/094845810f294d48588f to your computer and use it in GitHub Desktop.
//hierarchyRecord being a DcmDirectoryRecord (check DICOMDIR_Open.cpp)
OFCondition status = EC_TagNotFound;
DcmStack stack;
DcmObject *object = NULL;
//Browse the properties of the element
while (hierarchyRecord->nextObject(stack, OFTrue).good())
{
object = stack.top();
DcmTag tag = object->getTag();
DcmTagKey tagKey = DcmTagKey(tag.getGroup(), tag.getElement());
const char* tagName = tag.getTagName();
OFString tagVal;
hierarchyRecord->findAndGetOFString(tagKey, tagVal);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment