LEADTOOLS Annotations Send comments on this topic. | Back to Introduction - All Topics | Help Version 17.0.3.22
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 uses 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 properties and methods 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 objects from either a file or a stream, LEADTOOLS provides the following:

Annotation files may be saved to a file or to a stream, using the following: Prior to version 14.5, annotations could be saved using the AnnCodecs.Save method in one of three formats: Prior to version 14.5, the Native format was the preferred format for storing annotation files. Beginning with version 14.5, is a text-based format for annotations became available - AnnCodecsFormat.Xml. This is a text-based format for storing LEAD annotations that follows the XML (Extensible Markup Language) format. The XML format is replacing the Native format as the preferred format for storing annotations. There are many advantages of using the XML format: The TIFF 6.0 Specification sets aside a range of private tags that developers can define. To avoid conflicts with files created by other developers, you can register your tag by contacting Adobe Developer Relations. (The E-mail address posted on The Unofficial TIFF Home Page is gapdevsup@adobe.com.) To load the annotation objects stored in a TIFF tag, use the LoadFromTag method. Use the ReadTag method to load tag objects from a TIFF file. To save the annotation objects in a container to a TIFF tag, use the SaveToTag method. After calling this method, you can save the RasterTagMetadata object returned into a an existing TIFF file by calling the WriteTag or WriteTags methods. To delete a page from an annotation stream or file which contains multiple pages, use the DeletePage method. To get information about an annotation stream or file, use the GetInformation method.