How to create Identical Documents Sequence (0040,A525)

All other questions regarding DCMTK

Moderator: Moderator Team

Post Reply
Message
Author
bwiklak
Posts: 11
Joined: Fri, 2009-03-13, 13:43

How to create Identical Documents Sequence (0040,A525)

#1 Post by bwiklak »

Hi,
Is there a convenient way to add to Identical Documents Sequence into a DSRDocument? There is a getIdenticalDocuments () method that creates DSRSOPInstanceReferenceList but how to create and add one?

bwiklak
Posts: 11
Joined: Fri, 2009-03-13, 13:43

#2 Post by bwiklak »

Ok, I did it.
I just created DSRSOPInstanceReferenceList :

Code: Select all

DSRSOPInstanceReferenceList identDocSeq( DCM_IdenticalDocumentsSequence );
and then, before saving file and after writing sr to it's dataset:

Code: Select all

DcmFileFormat *newfileformat = new DcmFileFormat();
	OFCondition status = doc.write(*newfileformat->getDataset());
i did something like that:

Code: Select all

DSRSOPInstanceReferenceList identDocSeq( DCM_IdenticalDocumentsSequence );
identDocSeq.addItem( studyUID,seriesUID,sopClassUID,instanceUID);

identDocSeq.write( *newfileformat->getDataset(), NULL );
It works! :)

Post Reply

Who is online

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