When I wrote the article on “DICOM Structured Reporting“, I mentioned that dedicated support for Templates and Context Groups is still missing in the DCMTK. This has changed recently, thanks to the sponsoring from the QIICR project.
In a first step, the DSRDocumentTree class has been revised and a more general base class DSRDocumentSubTree has been introduced, which also supports fragments or extracts of an SR document tree and which does not require that a tree has a single root node. With these subtrees an SR document tree can be composed of individual fragments or let’s call them sub-templates. So, the next logical step was the implementation of the classes DSRSubTemplate and DSRRootTemplate. Since this development was sponsored by QIICR, the first SR templates that I’ve implemented are the following:
- TID 1001 – Observation Context (with included TID 1002 to 1004)
- TID 1204 – Language of Content Item and Descendants
- TID 1411 – Volumetric ROI Measurements (with included TID 1419 and 1502)
- TID 1500 – Measurement Report (with included TID 1001, 1204, 1411 and 1600)
- TID 1600 – Image Library (with included TID 1601 to 1607)
Then, of course, there is also a need for the various Context Groups that are used by the above listed SR templates. Since copying the contained information from DICOM PS.16 (DICOM Content Mapping Resource, DCMR) would be pretty cumbersome, I decided to generate the C++ header and source files directly from the official machine-readable version of the DICOM standard. All of these classes are derived from the common base class DSRContextGroup. For some context group classes, I also provided manually developed, derived classes with additional features, e.g. for CID 29 (Acquisition Modality).
And, finally, it really makes sense to have some if not most of the Code definitions from the DICOM PS 3.16 available in a format that can be directly used by a software developer, e.g. CODE_UCUM_Millimeter instead of the code triplet (“mm”, “UCUM”, “millimeter”). This is a similar approach to what the DCMTK already provides for DICOM attribute tags, e.g. DCM_PatientName instead of (0010,0010). So, I also generated header files with the codes from various coding schemes that are used by the DICOM standard. In addition to the Unified Code for Units of Measure (UCUM), there are also definitions for the DICOM Controlled Terminology (DCM), for the NCI Thesaurus (NCIt), for SNOMED-RT (SRT) and the Unified Medical Language System (UMLS). Further coding schemes might follow.
If you are interested in these recent changes to the “dcmsr” module, please have a look at DCMTK’s public git repository. Of course, all this is still “work in progress” but hopefully a good grounding for future development.