Click or drag to resize

ImageOperatorsReferenceImage Method (McImage)

A read-write property that can be used to hold a reference image-of-interest

Namespace:  MediaCy.IQL.Operators
Assembly:  MediaCy.IQL.Operators (in MediaCy.IQL.Operators.dll) Version: 3.1.0.0
Syntax
VB
<ExtensionAttribute>
Public Shared Function ReferenceImage ( 
	image As McImage
) As McImage

Parameters

image
Type: MediaCy.IQL.EngineMcImage

Return Value

Type: McImage

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type McImage. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
Remarks
This property is Nothing unless it has been Set to some McImage. When the parent McImage is removed from the Images collection, then this property is automatically set to Nothing. This prevents circular references if the ReferenceImage also happens to be the parent McImage.
Examples
VB
Sub SubtractReferenceImage(ByVal dOffset As Double)
If ThisApplication.ActiveImage Is Nothing Then Exit Sub 'we need an ActiveImage
If ThisApplication.ActiveImage.ReferenceImage Is Nothing Then Exit Sub 'and a ReferenceImage
ThisApplication.ActiveImage.Op.SubEx ThisApplication.ActiveImage.ReferenceImage, dOffset
End Sub 'SubtractReferenceImage
Sub TestSubtractReferenceImage()
Images.Open Path + "Images\Colorblk.tif"
'Open an invisible ReferenceImage
Set ThisApplication.ActiveImage.ReferenceImage = _
Images.Open(Path + "Images\GrayBlk.tif", mcicfNoAddToCollection + mcicfNotVisible)
SubtractReferenceImage 128 'offset
MsgBox "You should see a transformed ColorBlk"
ThisApplication.ActiveImage.ReferenceImage.Close 'close the invisible reference image
ThisApplication.ActiveImage.Modified = False 'and close colorblk without asking
ThisApplication.ActiveImage.Close
End Sub 'TestSubtractReferenceImage
See Also