DCMTK
Version 3.6.6
OFFIS DICOM Toolkit
|
This module contains classes to read, write, create, modify, access, print and render DICOM Structured Reporting (SR) documents. The list of supported SOP classes is provided in DSRTypes::E_DocumentType.
The main interface classes are:
Here are some further classes that are useful when implementing SR templates:
Currently, the following SR templates are implemented (see notes for details):
Tools
This module contains the following command line tools:
Examples
The following example shows how to load a DICOM Structured Report and render its content in HTML format:
{
{
cerr <<
"Error: cannot render SR document (" << status.
text() <<
")" << endl;
} else
cerr <<
"Error: cannot read SR document (" << status.
text() <<
")" << endl;
} else
cerr <<
"Error: cannot load DICOM file (" << status.
text() <<
")" << endl;
The following example shows how to create a DICOM Structured Report and save it to a file (further details can be found in the mkreport source file):
{
cerr <<
"Error: cannot save DICOM file (" << status.
text() <<
")" << endl;
} else
cerr <<
"Error: cannot write SR document (" << status.
text() <<
")" << endl;
Alternatively, many properties of the document tree can be accessed and modified directly as the following example shows:
if (codePtr != NULL)
codePtr->
setCode(
"113000",
"DCM",
"Of Interest");
if (imagePtr != NULL)
{
}
In addition, there are specific DSRDocumentTree::addContentItem() and DSRDocumentTree::addChildContentItem() methods that expect a pointer to a newly created DSRDocumentTreeNode instance.
Iterating over a document tree and searching for content items that meet certain criteria can be achieved in various ways. Here are two of them:
The final example shows how to deal with SR templates, e.g. when creating a DICOM Structured Report that is based on TID 1500 (Measurement Report):
report.getObservationContext().addPersonObserver("Doe^Jane", "Some Organization");
else
cerr << "Error: cannot set template content as document tree" << endl;
@ VT_Code
DICOM Value Type: CODE.
Definition: dsrtypes.h:589
@ English
(eng,RFC5646,"English")
Definition: cid5000.h:44
virtual DSRContentItem & getCurrentContentItem()
get reference to current content item.
@ Volume
(118565006,SCT,"Volume"), included from CID 7472
Definition: cid7469.h:406
Class managing the SR document tree.
Definition: dsrdoctr.h:45
@ VT_Image
DICOM Value Type: IMAGE.
Definition: dsrtypes.h:611
Implementation of the DCMR Template: TID 1419 - ROI Measurements (only the "Measurement" content item...
Definition: tid1419m.h:54
OFBool bad() const
check if the status is not OK, i.e. error or failure.
Definition: ofcond.h:305
virtual OFCondition read(DcmItem &dataset, const size_t flags=0)
read SR document from DICOM dataset.
OFCondition setPresentationState(const DSRCompositeReferenceValue &pstateValue, const OFBool check=OFTrue)
set reference to presentation state object.
Class for composite reference values.
Definition: dsrcomvl.h:39
virtual OFCondition print(STD_NAMESPACE ostream &stream, const size_t flags=0)
print current SR document to specified output stream.
virtual DSRDocumentTreeNode * getNode() const
get pointer to current node.
Base class for content items.
Definition: dsrdoctn.h:48
E_ValueType getValueType() const
get value type of the current content item
Definition: dsrdoctn.h:322
@ DT_KeyObjectSelectionDocument
DICOM IOD: Key Object Selection Document.
Definition: dsrtypes.h:513
@ StandardDeviation
(386136009,SCT,"Standard Deviation")
Definition: cid7464.h:50
DSRImageReferenceValue * getImageReferencePtr()
get pointer to image reference.
Class for handling coded entry values, i.e. unambiguous machine-readable codes.
Definition: dsrcodvl.h:113
@ EXS_LittleEndianExplicit
Explicit VR Little Endian.
Definition: dcxfer.h:45
virtual size_t gotoNamedNode(const DSRCodedEntryValue &conceptName, const OFBool startFromRoot=OFTrue, const OFBool searchIntoSub=OFTrue)
set internal cursor to a named node.
Interface class for 'dcmsr' (DICOM Structured Reporting Documents).
Definition: dsrdoc.h:59
@ CubicMillimeter
(mm3,UCUM,"cubic millimeter"), included from CID 7462
Definition: cid7181.h:76
@ VT_Container
DICOM Value Type: CONTAINER.
Definition: dsrtypes.h:615
virtual OFCondition setPatientName(const OFString &value, const OFBool check=OFTrue)
set patient's name
virtual OFCondition renderHTML(STD_NAMESPACE ostream &stream, const size_t flags=0, const char *styleSheet=NULL)
render current SR document in HTML/XHTML format.
void addItem(const T &item)
add item to the list
Definition: dsrtlist.h:242
@ RT_hasObsContext
DICOM Relationship Type: HAS OBS CONTEXT.
Definition: dsrtypes.h:565
DSRDocumentTree & getTree()
get document tree
Definition: dsrdoc.h:215
@ RT_isRoot
internal type used for the document root
Definition: dsrtypes.h:561
virtual size_t gotoNextNamedNode(const DSRCodedEntryValue &conceptName, const OFBool searchIntoSub=OFTrue)
set internal cursor to the next named node.
Class implementing a document tree node filter that checks for a given relationship type.
Definition: dsrdnflt.h:326
DSRCodedEntryValue * getConceptNamePtr()
get pointer to concept name.
OFCondition addFilter(DSRDocumentTreeNodeFilter *filter)
add a document tree node filter to the list
OFCondition setDerivation(const T_Derivation &derivation, const OFBool check=OFTrue)
set the value of the 'Derivation' content item (TID 1419 - Row 8).
OFCondition createNewMeasurement(const T_Measurement &conceptName, const MeasurementValue &numericValue, const OFBool check=OFTrue)
create a new measurement.
Class for SR numeric values and measurements (extended version with additional support of the DICOM C...
Definition: srnumvlu.h:39
OFCondition setCodeValue(const DSRCodedEntryValue &codeValue, const OFBool check=OFTrue)
set code value.
OFCondition setActivitySession(const OFString &session, const OFBool check=OFTrue)
set the value of the 'Activity Session' content item (TID 1411 - Row 1b).
OFCondition setValue(const DSRImageReferenceValue &referenceValue, const OFBool check=OFTrue)
set image reference value.
OFCondition setConceptName(const DSRCodedEntryValue &conceptName, const OFBool check=OFTrue)
set concept name.
Implementation of DCMR Template: TID 1411 - Volumetric ROI Measurements (and included templates 1502 ...
Definition: tid1411.h:57
General purpose class for condition codes.
Definition: ofcond.h:167
virtual OFCondition write(DcmItem &dataset, DcmStack *markedItems=NULL)
write current SR document to DICOM dataset.
OFBool good() const
check if the status is OK.
Definition: ofcond.h:296
@ RT_hasConceptMod
DICOM Relationship Type: HAS CONCEPT MOD.
Definition: dsrtypes.h:569
const char * text() const
get a human readable text representation of this error code.
Definition: ofcond.h:280
virtual OFCondition addChildContentItem(const E_RelationshipType relationshipType, const E_ValueType valueType, const DSRCodedEntryValue &conceptName, const OFBool check=OFTrue)
add specified content item below the current one.
@ ImagingMeasurementReport
(126000,DCM,"Imaging Measurement Report")
Definition: cid7021.h:44
Class implementing a document tree node filter that checks for a given value type.
Definition: dsrdnflt.h:294
virtual OFCondition setTreeFromRootTemplate(DSRRootTemplate &rootTemplate, const OFBool expandTree=OFTrue)
set document tree from root template.
@ RT_contains
DICOM Relationship Type: CONTAINS.
Definition: dsrtypes.h:563
Class for image reference values.
Definition: dsrimgvl.h:50
virtual size_t addContentItem(const E_RelationshipType relationshipType, const E_ValueType valueType, const E_AddMode addMode=AM_afterCurrent)
add specified content item to the current one.
OFCondition setTrackingIdentifier(const OFString &trackingID, const OFBool check=OFTrue)
set the value of the 'Tracking Identifier' content item (TID 1411 - Row 2).
Class implementing a list of document tree node filters that are combined with AND (conjunction)
Definition: dsrdnflt.h:120
DSRImageFrameList & getFrameList()
get reference to list of referenced frame numbers.
Definition: dsrimgvl.h:362
TID1419_Measurement & getMeasurement() const
get current measurement value of this measurement group as defined by TID 1419 (ROI Measurements),...
Definition: tid1411.h:148
Class implementing a document tree node filter that checks for the presence (or absence) of child nod...
Definition: dsrdnflt.h:162
static const size_t PF_printTemplateIdentification
print template identification (TID and mapping resource)
Definition: dsrtypes.h:429
Implementation of DCMR Template: TID 1500 - Measurement Report (and included templates 1204,...
Definition: tid1500.h:74
OFCondition setCode(const DSRBasicCodedEntry &basicCodedEntry, const OFBool check=OFFalse)
set code.
virtual size_t gotoMatchingNode(const DSRDocumentTreeNodeFilter &filter, const OFBool startFromRoot=OFTrue, const OFBool searchIntoSub=OFTrue)
set internal cursor to a matching node.
Generated on Thu Jan 14 2021 for DCMTK Version 3.6.6 by Doxygen 1.8.18