IMcProfileEdgesFindEdges Method
|
|
Analyzes the ProfilesAncestor and detects "edges" along selected profiles.
Namespace:
MediaCy.IQL.Features
Assembly:
MediaCy.IQL.Features (in MediaCy.IQL.Features.dll) Version: 10.0.6912.0
SyntaxFunction FindEdges (
<OptionalAttribute> Selector As Object,
Optional ClearPlacedEdges As Boolean = true
) As Integer
Parameters
- Selector (Optional)
- Type: SystemObject
An empty variant, a single negative value,
a single index value, or an array of zero or more index values
(negative index values are legal but will be ignored).
If the Selector argument is a non-negative scalar index value, then
edges for the indicated profile are computed. The value must fall between
zero and ProfilesAncestor.CountOfProfiles-1.
If the Selector argument is Empty, Error or Null, or any negative scalar
value, then edges are found for all ProfilesAncestor.CountOfProfiles
profiles. In this case, IsStale is guaranteed to go False.
If Selector is an array, then zero or positive values are treated as
indices into the ProfilesAncestor profiles, negative values are legal but
ignored. In this case, edges will be computed only for the indicated
profiles. Edges on all other profiles will be undisturbed. Index values
greater or equal to the ProfilesAncestor.CountOfProfiles property are
illegal. - ClearPlacedEdges (Optional)
- Type: SystemBoolean
If True (the default), all edges on the selected profiles
are removed before new ones are detected and placed. If False, then any
existing edges that were added by the AddEdges method (ones with the
mcpeeaAddedEdgeFlag set in the EdgeAttributes property) will not be
cleared before detecting new edges. Automatically found edges are always
cleared before new ones are placed.
Return Value
Type:
Int32The total number of edges on all Selected profiles.
RemarksThe FindEdges method invokes the EdgeFindingMethod to find "edges"
along selected profiles in the ProfilesAncestor or the RawProfiles if
ProfilesAncestor is Nothing.
Edge finding on each profile is a two phase process: first the profile is
analyzed to create a "weighted profile", and then peak locations above a
threshold value are marked as "edges" on that weighted profile. Each element of
this process is controlled by McProfileEdges properties. The analysis of the
profile to get the weighted profile is controlled by the EdgeFindingMethod,
ChannelOfInterest, Weights or Pattern, MatchLength, SizeWeighting and
WeightingFlags properties.
The result of the first phase profile analysis is available as the
WeightedProfile property. In the second phase, edges are detected on the
WeightedProfile based on the ThresholdForEdges, MatchLength, MatchHotspot,
MinEdgesPerProfile and MaxEdgesPerProfile properties. Assigning to the
WeightedProfile property will invoke this second, edge detection phase directly.
This allows custom weighting analyses to be performed (e.g., some analysis of a
color profile), while still making use of the McProfileEdges object's tools for
finding, maintaining and displaying edges. And of course edges can be added at
arbitrary positions along the profiles with the AddEdges method.
FindEdges takes a Selector argument which allows edges to be found on a
selected sub-set of the ProfilesAncestor profiles; existing edges on unselected
profiles are not disturbed, even if those edges are "stale". The IsStale
property will become False after calling FindEdges only if all "stale" profiles
are included in the Selector argument (the default is to find edges on all
profiles).
If any edges were added, changed or removed then an McObjMgr
McObjStandardNotify.SpecialNotify is fired on the McObject backing this
McProfileEdges. The notify code will be SNC_NOTIFY_HO_PROPERTYCHANGED and the
notify data will be ID_IMcProfileEdges_EdgeCounts. You can use an instance of
McNotifySink WithEvents in VBA to track these notifies.
See AlsoReference
WeightedProfile
ThresholdForEdges
and