ICogModelFeatureIterator InterfaceCognex VisionPro 9.21 SR1
The feature iterator iterates all the features in a shape model, and allows reading and writing of the Weight and Polarity properties.

Namespace: Cognex.VisionPro
Assembly: Cognex.VisionPro.Core (in Cognex.VisionPro.Core.dll) Version: 85.1.0.0
Syntax

public interface ICogModelFeatureIterator : ICogModelFeature

The ICogModelFeatureIterator type exposes the following members.

Methods

  NameDescription
Public methodCopy
Makes a copy of this iterator. The copy will be positioned at the same item as this plus the given IndexOffset. For example, if IndexOffset is +1 the copy will be positioned at the next item, if IndexOffset is -1, the copy will be at the previous item.
Public methodGetEffectivePolarity
If this feature has no ParentFeature, then its effective polarity is the value of the Polarity property. If this feature has a ParentFeature, then the effective polarity is the Polarity times the effective polarity of the ParentFeature.
(Inherited from ICogModelFeature.)
Public methodGetEffectiveWeight
If this feature has no ParentFeature, then its effective weight is the value of the Weight property. If this feature has a ParentFeature, then the effective weight is the Weight times the effective weight of the ParentFeature.
(Inherited from ICogModelFeature.)
Public methodMoveToNext
Moves the iterator to the next position, loading that item's properties into this iterator. If the iterator is at the end position, an error is returned. To avoid getting errors, you may wish to check IsEnd.
Public methodMoveToPosition
Moves the iterator to the specified position in the sequence, loading that item's properties into this iterator.
Public methodMoveToPrevious
Moves the iterator to the previous position, loading that item's properties into this iterator. If there are no items before this, an error is returned. To avoid getting errors, you may wish to check IsFirst.
Top
Properties

  NameDescription
Public propertyAttributes
Returns property bits describing which iterator methods can be called at the current position of the iterator.
Public propertyContainer
Returns a reference to the container object being iterated. This can be used for identifying the iterator's container.
Public propertyIsEnd
Returns True if this iterator is positioned past the last item of the sequence. If True, calling MoveToNext will return an error, and attempting to read item properties will produce an error. Moving the iterator to a valid item will validate it.
Public propertyIsFirst
Returns True if this is the first item. If True, a call to MoveToPrevious would return an error.
Public propertyIsInvalid
Returns True if this iterator is not positioned at a valid item. If True, reading or writing any item properties will produce errors.
Public propertyParentFeature
If this feature has a ParentFeature, then Weight and Polarity are defined with respect to the parent. The effective weight (or polarity) of this feature is its Weight (or Polarity) times the parent's effective weight (or polarity).
(Inherited from ICogModelFeature.)
Public propertyPolarity
Returns/sets the polarity of this feature. The polarity of a given feature may be -1, 0(undefined), or +1. Polarities of +1 or -1 define where to find brighter pixels relative to the feature geometry, and 0 means undefined.
(Inherited from ICogModelFeature.)
Public propertyPosition
Returns the position of the iterator in the container.
Public propertyWeight
Returns/sets the weight of this feature. The weight of a feature determines its relative importance compared to other features of the model. The weight defaults to 1.0.
(Inherited from ICogModelFeature.)
Top
Remarks

ICogModelFeatureIterator iterates over all the features in a shape model and allows setting and getting the Weight and Polarity properties.

See Also