You are here: Start » FIL.NET » Function Reference » Geometry 2D » Geometry 2D Fitting » FIL.FitSegmentToPoints_TheilSen
Approximates points with a segment using TheilSen algorithm, optionally with Siegel's improvement.
Namespace: | FilNet |
---|---|
Assembly: | FIL.NET.dll |
Syntax
C++
C#
public static void FitSegmentToPoints_TheilSen ( IList<FilNet.Point2D> inPoints, FilNet.Range? inRange, FilNet.TheilSenVariant inVariant, int? inSampleLimit, float? inOutlierRatio, out FilNet.Segment2D outSegment, IList<float> diagOrientations )
Parameters
Name | Type | Range | Default | Description | |
---|---|---|---|---|---|
![]() | inPoints | System.Collections.Generic.IList<FilNet.Point2D> | Input points. | ||
![]() | inRange | FilNet.Range? | Determines which array points take part in fitting process. Default value: ftl::NIL. | ||
![]() | inVariant | FilNet.TheilSenVariant | Switches between Theil-Sen and Siegel methods. | ||
![]() | inSampleLimit | int? | <5, INF> | How many pairs of points are used to estimate orientation. Default value: ftl::NIL. | |
![]() | inOutlierRatio | float? | <0.0f, 0.99f> | ||
![]() | outSegment | FilNet.Segment2D | Fitted segment. | ||
![]() | diagOrientations | System.Collections.Generic.IList<float> | Sample orientations used to determine the output line orientation. |
Errors
List of possible exceptions:
Error type | Description |
---|---|
DomainError | Empty array of points in FitSegmentToPoints_TheilSen. |
DomainError | Range exceeds the input point array in FitSegmentToPoints_TheilSen. |
Function Overrides
- FitSegmentToPoints_TheilSen(IList<Point2D>, TheilSenVariant, Segment2D)
- FitSegmentToPoints_TheilSen(IList<Point2D>, Nullable<Range>, TheilSenVariant, Nullable<Int32>, Nullable<Single>, Segment2D)