Structured Reporting
The Merge DICOM Toolkit provides high-level functionality to handle DICOM Structured Report (SR) Documents. This functionality provides a simple way for encoding and decoding SR Document content by manipulating content items and their attributes instead of tags and values.
SR Class Diagram
As you can see on the figure above, there are two top level classes:
- MCstructuredReport.This class is encapsulating the Structured Report Content Module and has utility functions for reading and writing content tree from DICOM datasets.
- MCcontentItem. This is a base class for all content item classes and encapsulates common functionality for all of them.
Each Content Item type is implemented as a separate class with the specific data exposed as public properties. All Content Item classes are implementing the MCserializableToDataSet interface that is used by the Toolkit to read and write individual Content Items.
The Merge DICOM Toolkit allows you to extend existing Content Item classes by providing your own derived classes from existing types. For example, if you want to store the Content Item data in your own format or save extra DICOM attributes that are not covered by the Toolkit classes. Once you created your own extended class, you need to register it with the class factory that is responsible for creating classes during reading data from DICOM datasets. By default, Toolkit will create a known class per each Content Item Type according to the Table 21. The class factory is implemented in the MCstructuredReport class and can be updated by calling the following method:
updateItemFactory( MCcontentItemType itemType, Class<? extends MCcontentItem> classType ).
Encoding SR Documents
The creation of the SR document involves following steps:
- Creating a new MCstructuredReport object
- Adding Content Items (nodes) to the tree based on the templates definition.
- Creating a new attribute set.
- Saving SR Content to the attribute set.
- Adding Patient/Study/Series and other attributes required by the IOD definition,
- Saving the result attribute set object to a file.
Reading SR Documents
Reading SR Documents is done in a similar way as encoding, but in reverse sequence:
- Reading a File or receiving a message object.
- Reading root level attributes.
- Creating a new MCstructuredReport object.
- Reading SR Content from the attribute set.
- Traversing SR content tree and accessing Content Node attributes.
Sample Application
The structured report sample uses one template secected from P16 to demonstrate how to create an MCstructuredReport object according to the template definition, write it to an attribute set and read it back.