WPF Annotation Files

Show in webframe

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 WPF annotation example that ships with LEADTOOLS creates a WPF 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:

WPF 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, first use the BitmapMetaData.GetQuery method with '/ifd/{uint=32932}' parameter and then pass the returned byte[] to LoadFromTag method. To save The WPF annotation objects in a container to a TIFF tag, use the SaveToTag method. After calling this method, you can save the byte[] object returned into a an existing TIFF file by calling the SetQuery method. To delete a page from a WPF Annotation stream or file which contains multiple pages, use the DeletePage method. To get information about a WPF Annotation stream or file, use the GetInformation method.

 

 


Products | Support | Contact Us | Copyright Notices
© 2006-2014 All Rights Reserved. LEAD Technologies, Inc.