Send comments on this topic. | Back to Introduction - All Topics | Help Version 15.12.21
Working with DICOM Annotations

LEADTOOLS DICOM Class Library provides advanced annotation support for users who want to work with the "Graphic Annotation Module" and the "Grayscale Softcopy Presentation State" IOD, which let you display and manipulate graphic and text annotations.

The DICOM standard defines the "Graphic Annotation Module" which describes the attributes of vector graphics and text annotations that shall be made available by a display device to be applied to an image. LEADTOOLS offers a number of methods to manipulate DICOM graphic and text annotations and the related attributes which are part of the "Grayscale Softcopy Presentation State" IOD.

DicomDataSet.GetPresentationStateInformation and DicomDataSet.SetPresentationStateInformation can be used to retrieve and update the values of the elements that describe the "Presentation State Module" respectively. The following methods can be used to manage the set of referenced images under the "Referenced Series Sequence" (0008,1115) in the "Presentation State Module":

DicomDataSet.AddPresentationStateImageReference

DicomDataSet.RemovePresentationStateImageReference

DicomDataSet.RemoveAllPresentationStateImageReferences

DicomDataSet.GetPresentationStateImageReference

DicomDataSet.GetPresentationStateImageReferenceCount

DicomDataSet.FindFirstPresentationStateReferencedSeriesItem

DicomDataSet.FindNextPresentationStateReferencedSeriesItem

DicomDataSet.GetPresentationStateImageReferenceSOPInstance

LEADTOOLS also offers an extensive set of methods to manipulate the "Graphic Layer Module". This Module defines the characteristics of the layers in which graphic annotations, text annotations, curves and overlays can be rendered. A new layer can be created by calling DicomDataSet.CreateLayer, and named by calling DicomDataSet.SetLayerName. Once a layer has been created, you can call DicomDataSet.GetLayerInformation and DicomDataSet.SetLayerInformation to retrieve and update the values of the elements that describe the layer attributes respectively. A layer can be removed by calling either DicomDataSet.RemoveLayerByIndex or DicomDataSet.RemoveLayerByName. DicomDataSet.RemoveAllLayers will remove all layers in the Data Set. Some of the other class members which can be used to maintain layers are:

DicomDataSet.LayerCount

DicomDataSet.GetLayerIndex

DicomDataSet.GetLayerGraphicObjectCount

DicomDataSet.RemoveLayerGraphicObjects

DicomDataSet.GetLayerTextObjectCount

DicomDataSet.RemoveLayerTextObjects

DicomDataSet.GetLayerElementByIndex

DicomDataSet.GetLayerElementByName

A new graphic annotation object can be created by calling DicomDataSet.CreateGraphicObject. Once a graphic object has been created, you can call DicomDataSet.GetGraphicObjectInformation and DicomDataSet.SetGraphicObjectInformation to retrieve and update the values of the elements that describe the object attributes respectively. Some of the other methods which can be used to manipulate graphic objects are:

DicomDataSet.GetGraphicObjectCount

DicomDataSet.RemoveAllGraphicObjects

DicomDataSet.RemoveGraphicObject

DicomDataSet.GetGraphicObjPointCount

DicomDataSet.GetGraphicObjElement

A new text annotation object can be created by calling DicomDataSet.CreateTextObject. Once a text object has been created, you can call DicomDataSet.GetTextObjectInformation and DicomDataSet.SetTextObjectInformation to retrieve and update the values of the elements that describe the object attributes respectively. Some of the other methods which can be used to manipulate text objects are:

DicomDataSet.RemoveTextObject

DicomDataSet.GetTextObjectCount

DicomDataSet.RemoveAllTextObjects

DicomDataSet.GetTextObjElement

The "Referenced Image Sequence" (0008,1140) under the "Graphic Annotation Module" is used to define the set of images (SOP instances) to which a group of graphic and text annotations applies. LEADTOOLS offers the following methods to manipulate the items under that sequence:

DicomDataSet.AddLayerImageReference

DicomDataSet.GetLayerImageReferenceCount

DicomDataSet.GetLayerImageReferenceSOPInstance

DicomDataSet.RemoveImageReferenceFromLayer

DicomDataSet.RemoveAllImageReferencesFromLayer

DicomDataSet.RemoveAllImageReferences

DicomDataSet.GetLayerImageReferenceElement

The items in the "Graphic Annotation Sequence" (0070,0001) under the "Graphic Annotation Module" can be manipulated with the following methods:

DicomDataSet.CreateGraphicAnnSQItem

DicomDataSet.FindFirstGraphicAnnSQItem

DicomDataSet.FindNextGraphicAnnSQItem

DicomDataSet.GetLayerName

DicomDataSet.SetLayerName