If I have a key Object report or any SR, is there a way to parse out the image references? DSRDocument tree has the gotoNamedNode function, but I didn't think image references had names. I thought about using getNextNode of goToNext, but there is no guarantee that the node would be an image node.
Any suggestions?
Lance
Key Object Reports and accessing image references
Moderator: Moderator Team
Key Object Reports and accessing image references
http://osirixmac.com
-
- ICSMED DICOM Services
- Posts: 2217
- Joined: Fri, 2004-10-29, 21:38
- Location: Oldenburg, Germany
You could e.g. use iterate() and then check the value type using getValueType().
The following code snippet from the dcmsr module shows how this approach basically works:
Also see examples section in the documentation for how to access the content tree of an SR document.
Btw, I guess it could be useful to write a wrapper class for accessing Key Object Selection Documents or to write a new helper function similar to gotoNamedNode() that allows for going to nodes of a particular value type. This shouldn't be too difficult.
The following code snippet from the dcmsr module shows how this approach basically works:
Code: Select all
void DSRDocumentTree::unmarkAllContentItems()
{
DSRTreeNodeCursor cursor(getRoot());
if (cursor.isValid())
{
DSRDocumentTreeNode *node = NULL;
/* iterate over all nodes */
do {
node = OFstatic_cast(DSRDocumentTreeNode *, cursor.getNode());
if (node != NULL)
node->setMark(OFFalse);
} while (cursor.iterate());
}
}
Btw, I guess it could be useful to write a wrapper class for accessing Key Object Selection Documents or to write a new helper function similar to gotoNamedNode() that allows for going to nodes of a particular value type. This shouldn't be too difficult.
Who is online
Users browsing this forum: Ahrefs [Bot] and 1 guest