IMcImageClear Method
|
|
Clear a portion of the image to a constant value
Namespace:
MediaCy.IQL.Engine
Assembly:
MediaCy.IQL.Engine (in MediaCy.IQL.Engine.dll) Version: 10.0.6912.0
SyntaxSub Clear (
<OptionalAttribute> SourceRect As Object,
<OptionalAttribute> ValueToSet As Object,
Optional Channel As Integer = -1,
Optional MaskByAoi As Boolean = true
)
Parameters
- SourceRect (Optional)
- Type: SystemObject
If given, either a LONGRECT or an array of 4 values in
the order Left, Top, Right, Bottom, specifying the source rectangle for the
clear. If this argument is missing, then source rectange is the bounding
rectangle of any AOI or the whole image if there is no AOI. This rectangle
may be larger than the image, in which case it is clipped to the image
bounds, but it must intersect at least some portion of the image. - ValueToSet (Optional)
- Type: SystemObject
The new pixel value to be applied to the image data. Either
a single floating point value or an array of values, one for each channel (which
will be 1 if the Channel argument is other than the default of -1). If only one value is given, then
this value is applied to each channel (except for HSI and HSL image types, see Notes).
If not given, then the default value is 0.0 to be applied to all channels. - Channel (Optional)
- Type: SystemInt32
The default value of -1 means all channels are cleared. If a
channel from 0 up to NumberOfChannels-1 is specified, then only that channel
is cleared. If all channels are to be cleared, the ValueToSet may be supplyed
as a single value which is applied to all channels, or as an array, in which case
the array must be - MaskByAoi (Optional)
- Type: SystemBoolean
If TRUE (the default), any AOI is used to mask the
portion of the image cleared. Areas outside of the AOI are left unchanged.
If FALSE, then no AOI masking is done and the entire SourceRect of the image
is cleared.
RemarksThe source rectangle to be cleared may be specified as well as a
single channel to be cleared. Clearing may be restricted to a specified
rectangle or to just the AOI, or it may cover the entire source image.
Note |
---|
If the UseActiveFrameRange property is TRUE, then any ActiveFrameRange is
honored to decide which frames should be cleared, otherwise only the ActiveFrame
is cleared.
If a single value is given for the ValueToSet and the Channel argument is -1 (all
channels), then HSI and HSL images need to be handled differently. In these case,
the Hue channel (0) is always set to zero, the Saturation channel (1) is always
set to zero and only the Intensity or Luminance channel (2) is given the value
supplied. The effect is to have a grayscale fill with the given intensity. |
See Also