IMcGraphOverlayLoad Method
|
|
Load a previously saved overlay collection.
Namespace:
MediaCy.IQL.Display.Overlays
Assembly:
MediaCy.IQL.Display.Overlays (in MediaCy.IQL.Display.Overlays.dll) Version: 10.0.6912.0
SyntaxSub Load (
Source As Object,
Optional TagNumber As Integer = 0
)
Parameters
- Source
- Type: SystemObject
Either a string file name, an IStream object, an IStorage object, a
McStream object or missing. If a file name is given, the file is read as a compond
document file holding the saved overlay information previously written
via a call to the Save method. If an IStorage is supplied,
a stream named the ClipboardName is used as the source for the
loaded overlay information.
If an McStream object is given or the Source argument is missing, then load
information is read from the TIFF tag number given by the TagNumber
argument. If the Source 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.
RemarksThis method is a friendly front end for the IPersistFile and IPersistStream
interfaces that McGraphOverlay exposes. The method supports loading from a disk
file, from an IStream, from an IStorage or from a specified tag number in a Tiff file.
All existing graph objects and user-defined templates are cleared before loading
the new overlay data. Existing programatically defined templates (see the Template
property) are retained.
Note |
---|
The load of the AnnotationOverlay shown in the first example is done automatically
for you whenever an image file is opened that supports tags.
When a Tag value or McStream is given as the Source, 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
Sub LoadAnnotationsFromTiffFile( myMcStream As McStream )
ThisApplication.ActiveImage.AnnotationOverlay.Load myMcStream, mcttOVERLAY_ANNOT
myMcStream.Close
End Sub
Sub LoadAnnotationsFromSeparateFile()
ThisApplication.ActiveImage.AnnotationOverlay.Load "G:\Temp\Annotations.iov"
End Sub
See Also