LDicomDS::AnnDelete

#include "ltdic.h"

L_UINT16 LDicomDS::AnnDelete (nIndex, nPage)

L_INT nIndex;

/* index of an annotation file */

L_INT nPage;

/* page to delete */

Deletes a page from an annotation file, deletes the entire annotation file, or deletes all annotation files stored in a DICOM data set. This function is available in the Medical Imaging Toolkits.

Parameter

Description

nIndex

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. Pass 1 to delete ALL annotation files and the private creator data element.

nPage

Number of the page to delete. The page number is 1-based. Therefore, the first page is page 1, the second page is page 2, etc. Pass 1 to delete the entire file specified by the nIndex parameter.

Returns

0

SUCCESS.

> 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. LDicomDS::AnnDelete can delete a page from an annotation file, delete the entire annotation file, or delete all annotation files in a DICOM data set.

To delete the third page of the annotation file at index 1:

LDicomDS DicomDS;
DicomDS.LoadDS("d:\\work\\images\\a.dic", 0);
DicomDS.AnnDelete(1, 3);

To delete the annotation file at index 1

LDicomDS DicomDS;
DicomDS.LoadDS ("d:\\work\\images\\a.dic", 0);
DicomDS.AnnDelete(1, -1);

To delete all annotation files and the private creator data element

LDicomDS DicomDS;
DicomDS.LoadDS ("d:\\work\\images\\a.dic", 0);
DicomDS.AnnDelete(-1, 0);

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 LSettings::UnlockSupport.

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

See Also

Functions:

LDicomDS::AnnLoad, LDicomDS::AnnSave, LDicomDS::AnnCount

Topics:

Working with DICOM Annotations

 

How to Disable the Automatic Loading of the default DICOM IOD Table

Example

For an example, refer to LDicomDS::AnnCount.