dealing with CT Radiation Dose SR (http://dicom.nema.org/medical/dicom/cur ... lates.html), I see the INCLUDE statement is required by the standard for example to include "Language of Content Item and Descendants" TID1204.
In fact I cannot obtain the requested structure by using the DSRDocument's APIs; below a snippet of my code (it's pretty the only code combination that get something correct even if not compatible with the standard):
Code: Select all
DSRDocument *doc = new DSRDocument();
doc->createNewDocument(DSRTypes::DT_XRayRadiationDoseSR);
// Many calls to ...set methods
// Report Title
size_t rootContainerID = doc->getTree().addContentItem(DSRTypes::RT_isRoot, DSRTypes::VT_Container);
doc->getTree().getCurrentContentItem().setConceptName(DSRCodedEntryValue("113701", "DCM", "X-Ray Radiation Dose Report"));
doc->getTree().getCurrentContentItem().setTemplateIdentification("10011","DCMR");
// Language
doc->getTree().addContentItem(DSRTypes::RT_hasConceptMod, DSRTypes::VT_Code, DSRTypes::AM_belowCurrent);
doc->getTree().getCurrentContentItem().setConceptName(DSRCodedEntryValue("121049", "DCM", "Language of Content Item and Descendants"));
doc->getTree().getCurrentContentItem().setCodeValue(DSRCodedEntryValue("eng","ISO639_2","English"));
doc->getTree().addContentItem(DSRTypes::RT_hasConceptMod, DSRTypes::VT_Code, DSRTypes::AM_afterCurrent);
doc->getTree().getCurrentContentItem().setConceptName(DSRCodedEntryValue("121046", "DCM", "Country of Language"));
doc->getTree().getCurrentContentItem().setCodeValue(DSRCodedEntryValue("US","ISO3166_1","UNITED STATES"));
// Other stuff
doc->completeDocument();
DcmFileFormat *fileformat = new DcmFileFormat();
DcmDataset *dataset = nullptr;
if (fileformat != nullptr)
dataset = fileformat->getDataset();
if (dataset != nullptr)
{
OFFilename fileName(path.toLatin1().data());
OFCondition condRes = doc->write(*dataset);
if (condRes.good())
fileformat->saveFile(fileName, EXS_LittleEndianExplicit);
}
delete fileformat;
[img] file:///Users/ilaria/Pictures/dsrdump.jpg [/img]
I only realized nodes with code as VT and "HAS CONCEPT MOD" as relationship with parent
Please, do you have some hint?
Best regards
Ilaria