L_DicomAnnLoad

#include "ltdic.h"

L_LTDIC_API L_UINT16 L_DicomAnnLoad(hDS, phAnnContainer, nIndex, pLoadOptions)

HDICOMDS hDS;

a DICOM handle

pHANNOBJECT phAnnContainer;

address of the variable to be updated

L_INT nIndex;

index of an annotation file

pLOADFILEOPTION pLoadOptions;

pointer to optional extended load options

Loads the specified annotation file from a DICOM data set.

Parameter

Description

hDS

A DICOM handle.

phAnnContainer

Address of the variable to be updated with the handle to the container object of the loaded annotations.

nIndex

Index of the annotation file to load. This is an index into an array of annotation files stored in the DICOM data set. Each DICOM data set can store up to 256 annotation files. This is a zero-based index. Valid values are between 0 and 255.

pLoadOptions

Pointer to optional extended load options. Pass NULL to use the default load options.

Returns

DICOM_SUCCESS

The function was successful.

>0

An error occurred. Refer to Return Codes.

Comments

LEAD Annotation files can be saved as private data in a DICOM data set (LEAD native format or binary encoded format). There can be up to 256 private data tags for LEAD annotation files. Specify one of the 256 possible files by setting the nIndex parameter to be a value from 0 to 255.

Before calling this function, you must declare a variable of data type HANNOBJECT. Then, pass the address of the variable in the phAnnContainer parameter. This function will update the variable with the handle of the container object of the loaded annotations.

The 256 annotation files can hold one or more pages. To load the first page of an annotation file, pass NULL for the pLoadOptions argument. To load any page of an annotation file, use the LOADFILEOPTION structure. For example, to load the 3rd page of an annotation file number 2, do the following:

HDICOMDS hDS;   
HANNOBJECT hAnnContainer;   
LOADFILEOPTION LoadOption;   
memset(&LoadOption, 0, sizeof(LOADFILEOPTION));   
LoadOption.PageNumber = 3;   
hDS = L_DicomCreateDS(NULL);   
L_DicomLoadDS(hDS, "d:\\work\\images\\a.dic", 0);    
L_DicomAnnLoad (hDS, &hAnnContainer, 2, &LoadOption);   
L_DicomFreeDS(hDS); 

To delete a page from an annotation multi-page file, or to delete the entire annotation file, call L_DicomAnnDelete.

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

Required DLLs and Libraries

LTDIC

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application

Platforms

Win32, x64, Linux.

See Also

Functions:

L_DicomAnnSave, L_DicomAnnCount, L_DicomAnnDelete

Topics:

Working with DICOM Annotations

Example

For an example, refer to L_DicomAnnCount.

Help Version 19.0.2017.10.27
Products | Support | Contact Us | Copyright Notices
© 1991-2017 LEAD Technologies, Inc. All Rights Reserved.
LEADTOOLS DICOM C API Help