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.
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.
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:
AnnCodecs.Load method
AnnCodecs.Save method
AnnCodecsFormat.Native - a text-based file format for storing annotations AnnCodecsFormat.Encoded - a binary file format for storing annotations AnnCodecsFormat.Serialize - a .NET Serialize format
Unlike the Native format, the XML format is both forward- and backward-compatible. It is human readable. Files using the XML format can be easily modified using a standard text editor (i.e. notepad.exe). It can be easily parsed using any standard XML parser. It can be used with any of the growing number of utilities that work with XML.