#include "ltdic.h"
L_UINT16 LDicomDS::AnnSave(hAnnContainer, uFormat, bSelected, pSaveOption, nIndex, pnPrivateCreatorTag)
Saves annotations as private data in a DICOM data set.
Handle to the root annotation object that includes all objects to save in the file. This typically is a container object.
Format for saving annotation data. Possible values are:
Value | Meaning |
---|---|
ANNFMT_NATIVE | This format is no longer supported. |
ANNFMT_ENCODED | This format is no longer supported. |
ANNFMT_XML | [0x0005] Save as an XML text format. This is currently the only supported format. |
Flag that indicates which objects to save. Possible values are:
Value | Meaning |
---|---|
TRUE | Save all objects that have the selected property set to TRUE. For setting the selected property, call the LAnnotation::SetSelected function. |
FALSE | Save only the specified object. |
Pointer to a SAVEFILEOPTION structure that contains optional extended save options. This information is used to add annotation pages or replace annotation pages in a multipage annotation file. Pass NULL to save a one page annotation file.
Index of the annotation file to save. 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.
Pointer to a private creator tag. You can specify a private creator tag, or pass NULL to have the tag automatically created.
Value | Meaning |
---|---|
0 | SUCCESS |
>0 | An error occurred. Refer to Return Codes. |
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.
You can select the private creator tag (and therefore the private tags) or have the private creator tag automatically chosen.
To choose a private creator tag, do the following:
L_UINT32
. For example: L_UINT32 uPrivateCreatorElement
Set the value to the desired tag and element.
(gggg, 0010-00FF)
where gggg
is odduPrivateCreatorElement = 0x00710043
Pass the address of uPrivateCreatorElement as the last argument (pnPrivateCreatorTag)
To choose the group but not the element of a private creator tag, do the following:
L_UINT32
. For example: L_UINT32 uPrivateCreatorElement
uPrivateCreatorElement
as follows: (gggg0000)
where gggg
is odduPrivateCreatorElement
as the last argument (pnPrivateCreatorTag)uPrivateCreatorElement
To have the private creator tag automatically chosen and returned, do the following:
L_UINT32
. For example: L_UINT32 uPrivateCreatorElement
uPrivateCreatorElement = 0
uPrivateCreatorElement
as the last argument (pnPrivateCreatorTag)uPrivateCreatorElement
To have the private creator tag automatically chosen but not returned, do the following:
NULL
as the last argument (pnPrivateCreatorTag)To insert new pages to an annotation multipage file:
SAVEFILEOPTION
.uFlags
field of the SAVEFILEOPTION
structure to ESO_INSERTPAGE
.PageNumber
field of the SAVEFILEOPTION
structure to the location for insertion. The new page will be inserted in front of the page specified in the PageNumber
field.To replace an existing page in an annotation multipage file:
SAVEFILEOPTION
.uFlags
field of the SAVEFILEOPTION
structure to ESO_REPLACEPAGE
.PageNumber
field of the SAVEFILEOPTION
structure to the page to replace.To delete a page from an annotation multipage file, or to delete the entire annotation file, call LDicomDS::AnnDelete.
NOTE: Both DICOM and DOCUMENT capabilities must be unlocked in order to work with DICOM annotations. For more information on unlocking these capabilities, refer to LSettings::SetLicenseFile.
Required DLLs and Libraries
Win32, x64
Help Collections
Raster .NET | C API | C++ Class Library | HTML5 JavaScript
Document .NET | C API | C++ Class Library | HTML5 JavaScript
Medical .NET | C API | C++ Class Library | HTML5 JavaScript
Medical Web Viewer .NET
Multimedia
Direct Show .NET | C API | Filters
Media Foundation .NET | C API | Transforms
Supported Platforms
.NET, Java, Android, and iOS/macOS Assemblies
Imaging, Medical, and Document
C API/C++ Class Libraries
Imaging, Medical, and Document
HTML5 JavaScript Libraries
Imaging, Medical, and Document