Click or drag to resize

IMcFeaturesAccessMaskedImageData Method

Create a McRegionAccess that bounds this McFeatures and is masked by it if this is a McRegions.

Namespace:  MediaCy.IQL.Features
Assembly:  MediaCy.IQL.Features (in MediaCy.IQL.Features.dll) Version: 10.0.6912.0
Syntax
VB
Function AccessMaskedImageData ( 
	<OptionalAttribute> Type As Object,
	Optional channel As Integer = -1,
	Optional frame As Integer = -2,
	<OptionalAttribute> varImage As Object
) As McRegionAccess

Parameters

Type (Optional)
Type: SystemObject
channel (Optional)
Type: SystemInt32
minus 1 for all channels, or 0-based channel number
frame (Optional)
Type: SystemInt32
McActiveFrame, McLastFrame, or 0-based frame number
varImage (Optional)
Type: SystemObject
an optional source for the image data. If supplied this must be a McImage instance or one of the legal arguments for the McImages.Item property. If this argument is not supplied (i.e., is VT_EMPTY or VT_ERROR), then this McFeatures must have a parent McImage, which is used as the source for the image data.

Return Value

Type: McRegionAccess
The new McRegionAccess
Remarks
The bounds of the created McRegionAccess are the same as the Bounds property. Since McRegionAccess gives access to pixel values in an image, the McFeatures must be associated with a parent image or the optional varImage argument must be given. If the McFeatures is "reset" (IsReset true), a McRegionAccess that covers the entire image will be created. If the McFeatures is "empty" (i.e., some operation has left it with no features), then an error is generated; test for IsEmpty false to avoid this error (see Reset for more discussion). Except for the absence of left, top, right, bottom arguments which are properties of the region, this method has the same arguments as McImage.CreateRegionAccess() If this McFeatures is a McRegions and the McRegions is not "Reset" (IsReset returns FALSE) and if it is not a single, simple mcftBox, then after the McRegionAccess is created, this McRegions is assigned as its RegionMask property. You can subsequently call Set McRegionAccess.RegionMask = Nothing, or you can call McImage.CreateRegionAccess instead of this method if you want unmasked writes to the image. There is no need to set the McRegionAccess.RegionMask property if this IsReset or a simple mcftBox, since only the bounds of the McRegionAccess matter in this case.
See Also