Description

The weighted profile upon which edges are detected.

Property type

A Variant value.  

Syntax

object.WeightedProfiles([Selector]) [= value]

The WeightedProfiles Property syntax has these parts:

PartDescription
objectAn expression evaluating to an object of type McProfileEdges.
SelectorOptional. A Variant value.

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 the weighted profile for just the indicated profile is returned or assigned to as or from a 1-D array. The index value must fall between zero and ProfilesAncestor.CountOfProfiles-1.

If the Selector argument is Empty, Error or Null, or any negative scalar value, then profiles are returned or assigned to for all ProfilesAncestor.CountOfProfiles profiles. In this case, the returned value or assigning value will be an array of Variant, where each Variant is a 1-D array that is the weighted profile from the ProfilesAncestor's profile at the same index.

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, weighted profiles only for the indicated profiles, and the returned value or assigning value is an array of Variant, with each holding one weighted profile array. Index values greater or equal to the ProfilesAncestor.CountOfProfiles property are illegal.

valueA Variant value.

Remarks

After calling FindEdges, the weighted profile for each ProfilesAncestor profile that was selected in the FindEdges call will be available in this property. Each weighted profile is a 1-D array of Double that is the same length as the number of samples in the ProfilesAncestor profile; that is, for profile N, ProfilesAncestor.NumberOfSamples(N).

Examining the weighted profiles can be critical to understanding the effect of the properties that control the weighting process (EdgeFindingMethod, Weights or Pattern, MatchLength, SizeWeighting and WeightingFlags).

The WeightedProfiles property can also be assigned to directly for those rare cases where the weighting that FindEdges does is not adequate (e.g., some analysis of a color profile). When a weighted profile is assigned to, any existing automatically found edges on it are removed and new edges are detected based on the assigned weighted profile and the the AbsoluteMaxWeightValue, ThresholdForEdges, mcpeofAbsoluteThresholding bit of OptionFlags, MatchLength, MatchHotspot, MinEdgesPerProfile and MaxEdgesPerProfile properties. 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. You may need to assign to the AbsoluteMaxWeightValue property just before assigning to WeightedProfiles. This is especially true if the mcpeofAbsoluteThresholding bit of OptionFlags is set, because that makes ThresholdForEdges act as a fixed percentage of AbsoluteMaxWeightValue.

All, one or a selected sub-set of weighted profiles may be accessed or assigned. When multiple profiles are accessed or assigned they are exposed or assigned from an array of Variant, each Variant holding one profile array.

If any edges were added, changed or removed on assignment 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.