CogGeneralContour RemoveSegment Method Cognex VisionPro
Remove the given ContourSegment, disconnecting any neighboring segments it may be connected to. Returns a new iterator positioned at the segment immediately following the removed one (ContourSegment).

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

public CogGeneralContourSegmentIterator RemoveSegment(
	CogGeneralContourSegmentIterator contourSegment
)

Return Value

Type: CogGeneralContourSegmentIterator

A new iterator positioned after contourSegment.

Events

Event TypeReason
CogGeneralContour Changed

Fires when the segment is removed.

The following state flags may be affected:

    Exceptions

    ExceptionCondition
    ArgumentException

    contourSegment is Nothing.

    CogIteratorInvalidIteratorException

    contourSegment is invalid.

    Remarks

    Removes contourSegment, disconnecting any neighboring segments it may be connected to and returns a new iterator positioned at the following segment.

    Note: Any CogGeneralContourSegmentIterator positioned at contourSegment become invalid. Other iterators are unchanged.

    See Also