Click or drag to resize

IMcGraphOverlaySave Method

Save an overlay collection.

Namespace:  MediaCy.IQL.Display.Overlays
Assembly:  MediaCy.IQL.Display.Overlays (in MediaCy.IQL.Display.Overlays.dll) Version: 10.0.6912.0
Syntax
VB
Sub Save ( 
	Destination As Object,
	Optional TagNumber As Integer = 0
)

Parameters

Destination
Type: SystemObject
Either a string file name, an object IStream interface pointer, an object IStorage interface pointer, or a numeric TagNumber. If a file name is given, the file is written as a compond document file holding the saved overlay information. If an IStorage is supplied, a stream with the ClipboardName is filled with the saved information. If an McStream object is given or the Destination argument is missing, then save information is written to the TIFF tag number given by the TagNumber argument. If the Destination argument is missing, then the McGraphOverlay instance must be an operator with an ancestor McImage. Furthermore, this ancestor image must have its McImage.File object set to some file name. The overlay information is read from the specified TIFF tag, which must have been previously written with a call to the Save method.
TagNumber (Optional)
Type: SystemInt32
If given, this is the TIFF tag number to use for the load. If missing, then a numeric tag value of mcttOVERLAY_ANNOT is implied if the ClipboardName property is "McImage.AnnotationOverlay", and a numeric tag value of mcttOVERLAY_AOI is implied if the overlay is an operator with a parent McRegions named "Aoi". If this McGraphOverlay is not one of these two special cases, then you must supply the desired tag number.
Remarks
This method is a friendly front end for the IPersistFile and IPersistStream interfaces that McGraphOverlay exposes. The method supports saving to a disk file, to an IStream, to an IStorage or to a specified tag number in a Tiff file.
Note Note
The save of the AnnotationOverlay shown in the first example is done automatically for you whenever an image file is saved in a format that supports tags. When a Tag value or McStream is given as the Destination, then the McImage.File or McStreamForTags object is left open. To finish the read, the client must call the McStream.Close method, however, you should never do this for the McImage.File object, since this is handled by the application.
Examples
VB
'Save to a Tiff Tag
Sub SaveAnnotationsToTiffFile( myMcStream As McStream)
ThisApplication.ActiveImage.AnnotationOverlay.Save myMcStream, mcttOVERLAY_ANNOT
'if you are all done with output, do the actual write and close (see Notes)
myMcStream.Write
myMcStream.Close
End Sub 'SaveAnnotationsToTiffFile
'Save to a File
Sub SaveAnnotationsToSeparateFile()
ThisApplication.ActiveImage.AnnotationOverlay.Save "G:\Temp\Annotations.iov"
End Sub 'SaveAnnotationsToSeparateFile
See Also