Products | Support | Send comments on this topic. | Email a link to this topic. | Back to Getting Started | Help Version 18.0.10.23
LEADTOOLS DICOM C DLL Help

Working with DICOM Annotations

Show in webframe

LEADTOOLS DICOM C DLL provides basic annotation support for users who just want to load, count, obtain information about and save annotation files. In addition, LEADTOOLS provides more advanced 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.

Please note that the MEDICAL capabilities must be unlocked in order to work with DICOM annotations. For more information on unlocking these capabilities, refer to L_SetLicenseFile.

Basic

The toolkit gives the user the ability to store LEADTOOLS annotation files as private data elements inside a DICOM dataset. You can store up to 256 single page or multi-page annotation files, either in the LEAD native format or a binary encoded format.

For working with the annotation files, LEAD provides the following:

Advanced

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 functions to manipulate DICOM graphic and text annotations and the related attributes which are part of the "Grayscale Softcopy Presentation State" IOD.

L_DicomGetPresStateInfo and L_DicomSetPresStateInfo can be used to retrieve and update the values of the elements that describe the "Presentation State Module" respectively. The following functions can be used to mange the set of referenced images under the "Referenced Series Sequence" (0008,1115) in the "Presentation State Module":

L_DicomAddPresStateImageRefByFileName

L_DicomAddPresStateImageRefByDS

L_DicomRemovePresStateImageRefBySOPInstance

L_DicomRemoveAllPresStateImageRefs

L_DicomGetPresStateImageRefSOPInstance

L_DicomGetPresStateImageRefCount

L_DicomFindFirstPresStateRefSeriesItem

L_DicomFindNextPresStateRefSeriesItem

L_DicomGetPresStateImageRefBySOPInstance

LEADTOOLS also offers an extensive set of functions 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 L_DicomCreateLayer. Once a layer has been created, you can call L_DicomGetLayerInfo and L_DicomSetLayerInfo to retrieve and update the values of the elements that describe the layer attributes respectively. A layer can be removed by calling either L_DicomRemoveLayerByIndex or L_DicomRemoveLayerByName, L_DicomRemoveAllLayers will remove all layers in the dataset. Some of the other functions which can be used to maintain layers are:

L_DicomGetLayerCount

L_DicomGetLayerIndex

L_DicomGetLayerGraphicObjectCount

L_DicomGetLayerName

L_DicomRemoveLayerGraphicObjects

L_DicomGetLayerTextObjectCount

L_DicomRemoveLayerTextObjects

L_DicomGetLayerElementByIndex

L_DicomGetLayerElementByName

L_DicomSetLayerName

A new graphic annotation object can be created by calling L_DicomCreateGraphicObject. Once a graphic object has been created, you can call L_DicomGetGraphicObjectInfo and L_DicomSetGraphicObjectInfo to retrieve and update the values of the elements that describe the object attributes respectively.

The L_DicomCreateGraphicAnnSQItem function adds a new item under the "Graphic Annotation Sequence" (0070,0001) in the "Graphic Annotation Module".

The L_DicomFindFirstGraphicAnnSQItem function retrieves the first item under the "Graphic Annotation Sequence" (0070,0001) in the "Graphic Annotation Module".

The L_DicomFindNextGraphicAnnSQItem function returns a pointer to the next item under the "Graphic Annotation Sequence" (0070,0001) in the "Graphic Annotation Module".

Some of the other functions which can be used to manipulate graphic objects are:

L_DicomGetGraphicObjectCount

L_DicomGetGraphicObjElement

L_DicomGetGraphicObjPointCount

L_DicomRemoveAllGraphicObjects

L_DicomRemoveGraphicObject

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

L_DicomRemoveTextObject

L_DicomGetTextObjectCount

L_DicomRemoveAllTextObjects

L_DicomGetTextObjElement

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 functions to manipulate the items under that sequence:

L_DicomAddLayerImageRef

L_DicomGetLayerImageRefCount

L_DicomRemoveImageRefFromLayer

L_DicomRemoveAllImageRefsFromLayer

L_DicomRemoveAllImageRefFromAllLayers

L_DicomGetLayerImageRefElement

To bring the DICOM annotation world into the LEADTOOLS annotation world, the toolkit offers a number of functions to convert from DICOM annotations into LEADTOOLS annotations and vise versa. L_DicomConvertLEADAnnObjToDicomAnnObjs can be used to convert a LEADTOOLS annotation object into one or more DICOM annotation objects, and (optionally) add the new DICOM annotation object(s) into the dataset. For each resulting DICOM annotation object the CONVERTLEADANNOBJTODICOMANNPROC callback function will be called by the toolkit.

To convert from DICOM graphic or text annotations into LEADTOOLS annotations use L_DicomConvertDicomAnnObjToLEADAnnObj.

Products | Support | Contact Us | Copyright Notices
© 2006-2014 All Rights Reserved. LEAD Technologies, Inc.