Table of contents

LineSegmentsUnit

The LineSegmentsUnit class represents a collection of line segments in 2D space. It is a derived class of IntermediateResultUnit.

Definition

Namespace: Dynamsoft.Core.intermediate_results

public class LineSegmentsUnit : IntermediateResultUnit, IEnumerable<LineSegment>

Methods

Method Description
GetCount Gets the number of line segments in the collection.
GetLineSegment Gets the specified line segment from the collection.
GetLineSegments Gets all line segments from the collection.
RemoveAllLineSegments Removes all line segments from the unit.
RemoveLineSegment Removes the line segment at the specified index.
AddLineSegment Adds a line segment to the unit.
SetLineSegment Sets the line segment at the specified index.

Inherited Methods

Checkout inherited methods from IntermediateResultUnit for more details.

GetCount

Gets the number of line segments in the collection.

int GetCount()

Return value

Returns the number of line segments in the collection.

GetLineSegment

Gets the specified line segment from the collection.

LineSegment GetLineSegement(int index)

Parameters

[in] index The index of the line segment to retrieve.

Return value

Returns the LineSegment object at the specified index or NULL if the index is out of range.

See Also

LineSegment

GetLineSegments

Gets all line segments from the collection.

LineSegment[] GetLineSegements()

Return value

Returns all LineSegment objects.

See Also

LineSegment

RemoveAllLineSegments

Removes all line segments from the unit.

void RemoveAllLineSegments()

RemoveLineSegment

Removes the line segment at the specified index.

int RemoveLineSegment(int index)

Parameters

[in] index The index of the line segment to remove.

Return Value

Returns 0 if the operation succeeds, or a nonzero error code if the operation fails.

AddLineSegment

Adds a line segment to the unit.

int AddLineSegment(LineSegment lineSegment, double[]? matrixToOriginalImage = null)

Parameters

lineSegment The line segment to add.

matrixToOriginalImage The matrix to original image.

Return Value

Returns 0 if the operation succeeds, or a nonzero error code if the operation fails.

See Also

LineSegment

SetLineSegment

Sets the line segment at the specified index.

int SetLineSegment(int index, LineSegment lineSegment, double[] matrixToOriginalImage = null)

Parameters

index The index of the line segment to set.

lineSegment The line segment to set.

matrixToOriginalImage The matrix to original image.

Return Value

Returns 0 if the operation succeeds, or a nonzero error code if the operation fails.

See Also

LineSegment

This page is compatible for:

Is this page helpful?

YesYes NoNo

In this article: