Description

Performs the thresholding operation to set the foreground region features in the parent McRegions object.

Return Type

None  

Syntax

object.Execute [SeedPoint], [SourceImage]

The Execute Method syntax has these parts:

PartDescription
objectAn expression evaluating to an object of type McThreshold.
SeedPointOptional. A Variant value.

VARIANT : If given, a seed point to use as the threshold IntensityRange center point. When a seed point is given, then the luminance (using the current Interpretation) at the image point is used as the center point for the IntensityRange, while the existing IntensityRange spread is kept; that is, the IntensityRange for each channel is slid to the left or right so that it is centered about the luminance under the SeedPoint. For mctiHSL and mctiHSI Interpretation (or native image Type), then Channel 0, the Hue channel, “wraps”. That is, if sliding the IntensityRange moves the range outside of the McImage.RangeMin to McImage.RangeMax, then the range wraps back to the other end of the range (this is accomplished by making the DOUBLERANGE Start field greater than the End field, see IntensityRange). When a SeedPoint is given only one region will be detected.

SourceImageOptional. A Variant value.

VARIANT : A required source McImage for the computation for instances of McThreshold with no ancestor McImage. This argument must be missing for McThreshold instances with an image ancestor (this is the usual case).

Remarks

Any existing region features in the parent McRegions are cleared before performing the threshold operation. It is quite feasible to have a count of zero features after this operation.

If the AutoFindPhase is not mcfpManual (and if no SeedPoint is given), then before Execute does the thresholding, it will call FindIntensityRange to automatically set the IntensityRange property to the AutoFindPhase. When a SeedPoint argument is given, the IntensityRange property is used to set the “window” around the SeedPoint luminance and it must be set by the caller.

If the AutoFindPhase mcfpIgnoreAoi bit is set then the Aoi will be ignored during both phase intensity range detection and the threshold Execute operation. By default this bit is cleared, so these operations are restricted to the Aoi, and all regions detected will be interior to the Aoi.

After regions are detected, if the Smoothing property is anything other than 0 then the region boundaries are smoothed using the Smoothing property as the filter size.

The McThreshold instance must always be a child of an McRegions object. It is into this parent McRegions that the results are placed.

If the SeedPoint is outside of the Aoi (or outside of the Image when the AutoFindPhase mcfpIgnoreAoi bit is set), then no region is found and the McRegions will be left in the IsReset state.