'easy' way to insert references to previous elements?

All other questions regarding DCMTK

Moderator: Moderator Team

Post Reply
Message
Author
Nick
Posts: 6
Joined: Thu, 2013-03-07, 09:30

'easy' way to insert references to previous elements?

#1 Post by Nick »

How can I insert a reference (e.g. 1.2.3.4) to an earlier element, without specifying the whole 'path' to the element? Can I query DcmItem's for their path? Quite error prone to type those myself, heh.

Thanks in advance,

J. Riesmeier
DCMTK Developer
Posts: 2505
Joined: Tue, 2011-05-03, 14:38
Location: Oldenburg, Germany
Contact:

Re: 'easy' way to insert references to previous elements?

#2 Post by J. Riesmeier »

What do you mean by that: "insert a reference (e.g. 1.2.3.4) to an earlier element"? Are you talking about DICOM SR documents?

Nick
Posts: 6
Joined: Thu, 2013-03-07, 09:30

Re: 'easy' way to insert references to previous elements?

#3 Post by Nick »

Aren't they used anywhere else? But yes, it's for SRs :).

J. Riesmeier
DCMTK Developer
Posts: 2505
Joined: Tue, 2011-05-03, 14:38
Location: Oldenburg, Germany
Contact:

Re: 'easy' way to insert references to previous elements?

#4 Post by J. Riesmeier »

No, these kind of "internal references" are only used for the SR document tree, and for these kind of DICOM objects you should definitely use the "dcmsr" module with its higher-level API. Then your question boils down to simply use DSRDocumentTree::addByReferenceRelationship() with the node ID of the referenced content item. The node ID is what addContentItem() and other methods of this class library return :)

Nick
Posts: 6
Joined: Thu, 2013-03-07, 09:30

Re: 'easy' way to insert references to previous elements?

#5 Post by Nick »

Hmm, okay, thanks a bunch. :)

Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 1 guest