Annotation Files

Note:

This topic is for Document/Medical only.

LEADTOOLS maintains annotations separately from bitmaps. The user's application code is responsible for maintaining the relationships between images and annotations. For example, the annotation example that ships with LEADTOOLS creates an annotation file that has the same name as its associated image file, but with a different extension. When the image file is loaded, the program looks for an associated annotation file and loads it as well.

LEADTOOLS provides several functions for handling annotation files. Annotation files can be stored on a disk, in memory or they may be embedded in another file. To load annotation files in these varied locations, LEAD provides the following:

L_AnnLoad

L_AnnLoadMemory

L_AnnLoadOffset

Each annotation file contains information about the annotations stored in that file. This information can be obtained using the following functions:

L_AnnFileInfo

L_AnnFileInfoMemory

L_AnnFileInfoOffset

Annotation files may contain a single page, or they may be multi-page. In a multi-page file, pages may be deleted using the following functions:

L_AnnDeletePage

L_AnnDeletePageMemory

L_AnnDeletePageOffset

Annotation files may be saved to disk, to memory, or embedded within another file, using the following functions:

L_AnnSave

L_AnnSaveMemory

L_AnnSaveOffset

When working with TIFF format files, L_AnnSaveTag can be called to save the annotation objects in a Wang compatible TIFF tag when the file is saved.