IMcThresholdIntensityRange Property
|
|
Property reflecting and setting the current intensity limits
that will be used for thresholding.
Namespace:
MediaCy.IQL.Features
Assembly:
MediaCy.IQL.Features (in MediaCy.IQL.Features.dll) Version: 10.0.6912.0
SyntaxProperty IntensityRange (
Optional Index As Integer = -1
) As Object
Get
Set
Parameters
- Index (Optional)
- Type: SystemInt32
long : If -2, then an array of Double "Seed Intensity Center Fraction" is
being assigned or accessed. The Seed Intensity Center Fraction is a value from 0 to
1.0 (default 0.5) which sets the location within the IntensityRange where the
luminance under the optional Execute method SeedPoint parameter is centered. If
Nothing is assigned then the Seed Intensity Center Fraction is assumed to be 0.5 for
all channels Nothing will be exposed as the value of IntensityRange(-2) on access.
The assigned array may be shorter than the array of IntensityRange values, in which
case the Seed Intensity Center Fraction is assumed to be 0.5 for any missing indices.
If -3, then an array of nChannels of Double "Last Seed Point Intensity" is returned.
If no seeded threshold has been done, then this result will be a zero-length array on
access. The value may be assigned to and the assigned result will persist on access,
but once a seeded threshold Execute is done the assigned value will be replaced by the
actual luminance under the given seed point.
If -4, then an array of nChannels DOUBLERANGE "Intensity Range Before Seed" is
assigned or exposed which is the IntensityRange which will be centered about the seed
point luminance to get the actual IntensityRange used for thresholding when doing
seeded thresholding. When IntensityRange(-1) is assigned, then IntensityRange(-4) is
automatically assigned, so if you want these values to be different, assign
IntensityRange(-1) first and then IntensityRange(-4).
If -1, then all channels of intensity are being accessed or
set. If some non-negative index, then only that channel's intensity is
being accessed or set. The default is -1. If Index is -1, the property is
exposed as an array of DOUBLERANGE structures, while if it is a non-zero
index then the property is exposed as a scalar DOUBLERANGE structure for
that index. Index 0 is the first range in the range array or is the only
range for Interpretation mctiMonochrome thresholding.
Property Value
Type:
Object
RemarksThe IntensityRange property is an array of DOUBLERANGE structures, one
for each color channel of the Interpretation. The DOUBLERANGE Start and End
fields give luminance intensity values for which a pixel channel is to be considered
foreground.
The test is performed as follows: if Start <= End, then a channel is foreground
if the channel luminance is >= Start and <= End (i.e., interior to the
Start-End range). If Start >= End, then a channel is foreground if the channel
luminance is <= End or >= Start (i.e., exterior to the End-Start range);
this reversed Start-End notation is most useful for the Hue channel of the
mctiHSI and mctiHSL Interpretations where the values "wrap".
A pixel is considered foreground if the luminance of each channel of its
Interpretation that is masked by the ChannelMask property passes the above test.
If the Interpretation property is assigned mctiAnyInterp, then
the native image type's number of channels is used to determine how many
DOUBLERANGE start,end values need to be supplied to fill the IntensityRange
property.
If the Interpretation property is the default mctiMonochrome, then an intensity
thresholding is done by casting each pixel to a single intensity channel. In
this case, the IntensityRange property is only one DOUBLERANGE value.
The other allowed Interpretation values are mctiRGB, mctiHSL and mctiHSI
corresponding to the three color channels Red-Green-Blue,
Hue-Saturation-Lumiance and Hue-Saturation-Intensity, respectively. In these
cases, the IntensityRange property is an array of 3 DOUBLERANGE values.
IntensityRange(-2) can be assigned an array of Double "Seed Intensity Center
Fraction" values (0 to 1.0 with 0.5 the default) that will determine how the luminance
under any given Execute method SeedPoint is centered within the IntensityRange.
Note |
---|
A user supplied IntensityRange property implies that the AutoFindPhase
property is mcfpManual, and it is automatically set to this value whenever you
assign an IntensityRange.
If you assign a single range with the Index set to -1, then that implies that
any color image should be thresholded based on its intensity, so the
Interpretation property is forced to mctiMonochrome.
For other AutoFindPhase values, the IntensityRange is automatically computed by
a call to FindIntensityRange when an Execute call is made, so that you never
assign the IntensityRange directly.
On assignment, either a scalar DOUBLERANGE variable or an array may be
supplied. If an array is supplied, it may be an array of DOUBLERANGE or an
array of start,end value pairs of any numeric type (at least one pair must be
supplied).
During the Execute operation when a SeedPoint argument is supplied, only the
difference between the Start and End fields is important. In this case the
IntensityRange Start and End values are slid to the left or right to center the
intensity range for each channel about the luminance at the seed point. |
See Also