CogGeneralContour CreateSegmentIterator Method Cognex VisionPro 9.25 SR1
Creates an iterator to iterate over the segments in the contour. InitialSegmentIndex is the index of the segment pointed at by the iterator on return. A value of -1 is interpreted as SegmentCount, and will return the 'End' iterator.

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

public CogGeneralContourSegmentIterator CreateSegmentIterator(
	int initialSegmentIndex
)

Parameters

initialSegmentIndex
Type: System Int32

The initial position of the iterator. If this value is −1, the iterator is positioned after the last segment.

Return Value

Type: CogGeneralContourSegmentIterator

The iterator.

Exceptions

ExceptionCondition
ArgumentException

initialSegmentIndex > SegmentCount or < 0. (−1 is a special case.)

Remarks

Creates an CogGeneralContourSegmentIterator to iterate over the segments in the contour. The iterator is positioned at the segment specified by InitialSegment. A value of −1 creates an iterator that is positioned just after the last segment.

See Also