Now I am extending the code to also support multi-frame data. I saw in the documentation of DSRImageReferenceValue that is has a frame list, so I tried the code below to add the frame index of the multi-frame slice to its frame list. This all compiles but if I check the exported SR file, then I do not find the frame reference anywhere. I also checked in the code of DSRImageReferenceValue and when exported as XML it would show up as a <frames></frames> block, which I also don't find.
Any suggestion on how to fix this issue?
Code: Select all
size_t id = doc->getTree().addContentItem(DSRTypes::RT_selectedFrom, DSRTypes::VT_Image, DSRTypes::AM_belowCurrent);
DSRImageReferenceValue imageRef = DSRImageReferenceValue( SOPClassUID, SOPInstanceUID );
DSRImageFrameList frames = imageRef.getFrameList();
frames.putString( frameIndex );
status = doc->getTree().getCurrentContentItem().setImageReference( imageRef );