ImageOperatorsReferenceImage Method (McImage) |
![]() |
Namespace: MediaCy.IQL.Operators
<ExtensionAttribute> Public Shared Function ReferenceImage ( image As McImage ) As McImage
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