Table of Contents

Class LayoutRegion<T>

Namespace
AiDotNet.Document
Assembly
AiDotNet.dll

Represents a single detected layout region in a document.

public class LayoutRegion<T>

Type Parameters

T

The numeric type used for calculations.

Inheritance
LayoutRegion<T>
Inherited Members

Properties

BoundingBox

Gets the bounding box as [x1, y1, x2, y2] in pixels or normalized coordinates.

public Vector<T> BoundingBox { get; init; }

Property Value

Vector<T>

Remarks

x1, y1: Top-left corner x2, y2: Bottom-right corner

Confidence

Gets the confidence score for this detection (0-1).

public T Confidence { get; init; }

Property Value

T

ConfidenceLevel

Gets the classification of confidence level.

public ConfidenceLevel ConfidenceLevel { get; }

Property Value

ConfidenceLevel

ConfidenceValue

Gets the confidence as a double value for comparison operations.

public double ConfidenceValue { get; init; }

Property Value

double

ElementType

Gets the type of layout element.

public LayoutElementType ElementType { get; init; }

Property Value

LayoutElementType

Index

Gets the region index in the original detection order.

public int Index { get; init; }

Property Value

int

ParentIndex

Gets the parent region index if this is a nested element.

public int? ParentIndex { get; init; }

Property Value

int?

TextContent

Gets the text content if available (requires OCR).

public string? TextContent { get; init; }

Property Value

string