oevislib_net  0.14.3.0
Loading...
Searching...
No Matches
Basics

Functions

 oevislib_net.Region.Region ()
 Creates a new empty Region.
 oevislib_net.Region.Region (int inWidth, int inHeight)
 Creates a new Region given frame dimensions.
 oevislib_net.Region.Region (Size inFrame)
 Creates a new Region given a frame.
 oevislib_net.Region.Region (Size inFrame, Array< PointsSequence > inPointsSequences)
 Creates a new Region using a frame and a set of points.
ByteBuffer oevislib_net.Region.Serialize ()
 Serializes the object.
static Region oevislib_net.Region.Deserialize (ByteBuffer inBuffer)
 De-serialize a Region buffer.
Size oevislib_net.Region.GetFrame ()
 Returns the region frame.
int oevislib_net.Region.GetSize ()
 Returns the number of points sequence in the region.
PointsSequence[] oevislib_net.Region.GetData ()
 Returns the raw data pointer to the PointsSequence array.
void oevislib_net.Region.Reserve (int inNewCapacity)
 Reserves (but not allocates) space for the Region data.
void oevislib_net.Region.SetFrame (Size inFrame)
 Sets a new frame for the region.
void oevislib_net.Region.Swap (Region inRegion)
 Exchange the content of two regions.
void oevislib_net.Region.Add (PointsSequence inPointsSequence)
 Adds a new PointsSequence to the region.
void oevislib_net.Region.Add (Point2Di inOffset, int inLength)
 Adds a new PointsSequence to the region, given the starting point and its length.
Array< Point2Dioevislib_net.Region.GetPoints ()
 Returns all the points contained in the region.
static Region oevislib_net.Region.FromPoints (Array< Point2Di > inPositions, Size inFrame)
 Creates a new region compressing the provided points into sequences.
static Region oevislib_net.Region.FromBox (Box inBox, Size inFrame)
 Creates a new region from a box.
static Region oevislib_net.Region.FromBoxBorders (Box inBox, Size inFrame, int inBorderWidth=1, BorderPosition inBorderPosition=BorderPosition.Centered)
 Creates a new region starting from the borders of a box.
static Region oevislib_net.Region.FromEllipse (Ellipse2D inEllipse, Size inFrame, Optional< UCS2D > inEllipseAlignment=null, Optional< Ellipse2D > outAlignedEllipse=null)
 Creates a new region from an ellipse object.
static Region oevislib_net.Region.FromRing (Ring2D inRing, Size inFrame, Optional< UCS2D > inRingAlignment=null, Optional< Ring2D > outAlignedRing=null)
 Creates a new region from a ring.
static Region oevislib_net.Region.FromCross (Box inCrossBoundingBox, Size inFrame)
 Creates a new region from a cross shape.
static Region oevislib_net.Region.FromGrid (Box inGridBoundingBox, Size inFrame, int inHorizontalStep=1, int inVerticalStep=1)
 Creates a new region with a grid shape.
static Region oevislib_net.Region.FromCircle (Circle2D inCircle, Size inFrame, Optional< UCS2D > inCircleAlignment=null, Optional< Circle2D > outAlignedCircle=null)
 Creates a new region given a circle.
static Region oevislib_net.Region.FromPolygon (Path inPolygon, Size inFrame, Optional< UCS2D > inPolygonAlignment=null, Optional< Path > outAlignedPolygon=null)
 Creates a new region given a polygon.
static Region oevislib_net.Region.FromPath (Path inPath, Size inFrame, float inWidth=1.0f, Optional< UCS2D > inPathAlignment=null, Optional< Path > outAlignedPath=null)
 Creates a new region given a path and a width.
static Region oevislib_net.Region.FromRectangle (Rectangle2D inRectangle, Size inFrame, Optional< UCS2D > inRectangleAlignment=null, Optional< Rectangle2D > outAlignedRectangle=null)
 Creates a new region given a rectangle.
bool oevislib_net.Region.IsOnFrame ()
 Checks if the region is adjacent to its frame.
bool oevislib_net.Region.IsEmpty ()
 Checks if the region contains any point.
static Region oevislib_net.Region.FromSegment (Segment2D inSegment, Size inFrame, float inWidth=1.0f, Optional< UCS2D > inSegmentAlignment=null, Optional< Segment2D > outAlignedSegment=null)
 Creates a new region from a segment.
static Region oevislib_net.Region.FromLine (Line2D inLine, Size inFrame, float inWidth=1, Optional< UCS2D > inLineAlignment=null, Optional< Line2D > outAlignedLine=null)
 Creates a new region from a line.
void oevislib_net.Region.Verify ()
 Checks if the region is valid.

Detailed Description

Function Documentation

◆ Add() [1/2]

void oevislib_net.Region.Add ( Point2Di inOffset,
int inLength )
inline

Adds a new PointsSequence to the region, given the starting point and its length.

Parameters
inOffsetStarting point.
inLengthSequence length. Range: [1, +inf).

◆ Add() [2/2]

void oevislib_net.Region.Add ( PointsSequence inPointsSequence)
inline

Adds a new PointsSequence to the region.

Parameters
inPointsSequenceNew PointsSequence.

◆ Deserialize()

Region oevislib_net.Region.Deserialize ( ByteBuffer inBuffer)
inlinestatic

De-serialize a Region buffer.

Parameters
inBufferBuffer containing the object.
Returns
Deserialized object.

◆ FromBox()

Region oevislib_net.Region.FromBox ( Box inBox,
Size inFrame )
inlinestatic

Creates a new region from a box.

Parameters
inBoxBox that contains the region points.
inFrameSize of the region frame.
Returns
The Region object.

◆ FromBoxBorders()

Region oevislib_net.Region.FromBoxBorders ( Box inBox,
Size inFrame,
int inBorderWidth = 1,
BorderPosition inBorderPosition = BorderPosition::Centered )
inlinestatic

Creates a new region starting from the borders of a box.

Parameters
inBoxBox used to compute borders.
inFrameSize of the region frame.
inBorderWidthWidth of the box borders. Range: [0, +inf).
inBorderPositionPosition used to compute borders starting from the provided box.
Returns
The Region object.

◆ FromCircle()

Region oevislib_net.Region.FromCircle ( Circle2D inCircle,
Size inFrame,
Optional< UCS2D > inCircleAlignment = null,
Optional< Circle2D > outAlignedCircle = null )
inlinestatic

Creates a new region given a circle.

Parameters
inCircleThe circle
inFrameRegion dimensions.
inCircleAlignmentCoordinate system used to align the input circle.
outAlignedCircleInput circle aligned using the provided coordinate system.
Returns
The Region object.

◆ FromCross()

Region oevislib_net.Region.FromCross ( Box inCrossBoundingBox,
Size inFrame )
inlinestatic

Creates a new region from a cross shape.

Parameters
inCrossBoundingBoxBox that contains the cross.
inFrameRegion dimensions.
Returns
The Region object.

◆ FromEllipse()

Region oevislib_net.Region.FromEllipse ( Ellipse2D inEllipse,
Size inFrame,
Optional< UCS2D > inEllipseAlignment = null,
Optional< Ellipse2D > outAlignedEllipse = null )
inlinestatic

Creates a new region from an ellipse object.

Parameters
inEllipseInput ellipse.
inFrameSize of the region frame.
inEllipseAlignmentCoordinate system used to align the ellipse object.
outAlignedEllipseEllipse object aligned to the provided coordinate system.
Returns
The Region object.

◆ FromGrid()

Region oevislib_net.Region.FromGrid ( Box inGridBoundingBox,
Size inFrame,
int inHorizontalStep = 1,
int inVerticalStep = 1 )
inlinestatic

Creates a new region with a grid shape.

Parameters
inGridBoundingBoxThe box that contains the grid.
inFrameThe region dimensions.
inHorizontalStepStep for the horizontal axis. Range: [1, +inf).
inVerticalStepStep for the vertical axis. Range: [1, +inf).
Returns
The Region object.

◆ FromLine()

Region oevislib_net.Region.FromLine ( Line2D inLine,
Size inFrame,
float inWidth = 1,
Optional< UCS2D > inLineAlignment = null,
Optional< Line2D > outAlignedLine = null )
inlinestatic

Creates a new region from a line.

Parameters
inLineInput line.
inFrameRegion dimensions.
inWidthWidth of the region built around the input line. Range: [0, +inf).
inLineAlignmentCoordinate system used to align the input line.
outAlignedLineInput line aligned using the provided coordinate system.
Returns
The Region object.

◆ FromPath()

Region oevislib_net.Region.FromPath ( Path inPath,
Size inFrame,
float inWidth = 1::0f,
Optional< UCS2D > inPathAlignment = null,
Optional< Path > outAlignedPath = null )
inlinestatic

Creates a new region given a path and a width.

Parameters
inPathReference path.
inFrameRegion dimensions.
inWidthWidth of the region built around the reference path. Range: [0, +inf).
inPathAlignmentCoordinate system used to align the input path.
outAlignedPathInput path aligned using the provided coordinate system.
Returns
The Region object.

◆ FromPoints()

Region oevislib_net.Region.FromPoints ( Array< Point2Di > inPositions,
Size inFrame )
inlinestatic

Creates a new region compressing the provided points into sequences.

Parameters
inPositionsArray with all the region points.
inFrameSize of the region frame.
Returns
The Region object.

◆ FromPolygon()

Region oevislib_net.Region.FromPolygon ( Path inPolygon,
Size inFrame,
Optional< UCS2D > inPolygonAlignment = null,
Optional< Path > outAlignedPolygon = null )
inlinestatic

Creates a new region given a polygon.

Parameters
inPolygonReference polygon.
inFrameRegion dimensions.
inPolygonAlignmentCoordinate system used to align the input polygon.
outAlignedPolygonInput polygon aligned using the provided coordinate system.
Returns
The Region object.

◆ FromRectangle()

Region oevislib_net.Region.FromRectangle ( Rectangle2D inRectangle,
Size inFrame,
Optional< UCS2D > inRectangleAlignment = null,
Optional< Rectangle2D > outAlignedRectangle = null )
inlinestatic

Creates a new region given a rectangle.

Parameters
inRectangleInput rectangle.
inFrameRegion dimensions.
inRectangleAlignmentCoordinate system used to align the input rectangle.
outAlignedRectangleInput rectangle aligned using the provided coordinate system.
Returns
The Region object.

◆ FromRing()

Region oevislib_net.Region.FromRing ( Ring2D inRing,
Size inFrame,
Optional< UCS2D > inRingAlignment = null,
Optional< Ring2D > outAlignedRing = null )
inlinestatic

Creates a new region from a ring.

Parameters
inRingInput ring.
inFrameRegion dimensions.
inRingAlignmentCoordinate system used to align the ring object.
outAlignedRingRing object aligned to the provided coordinate system.
Returns
The Region object.

◆ FromSegment()

Region oevislib_net.Region.FromSegment ( Segment2D inSegment,
Size inFrame,
float inWidth = 1::0f,
Optional< UCS2D > inSegmentAlignment = null,
Optional< Segment2D > outAlignedSegment = null )
inlinestatic

Creates a new region from a segment.

Parameters
inSegmentInput segment.
inFrameRegion dimensions.
inWidthWidth of the region built around the input segment. Range: [0, +inf).
inSegmentAlignmentCoordinate system used to align the input segment.
outAlignedSegmentSegment object aligned using the provided coordinate system.
Returns
The Region object.

◆ GetData()

PointsSequence[] oevislib_net.Region.GetData ( )
inline

Returns the raw data pointer to the PointsSequence array.

Returns
The raw data pointer to the PointsSequence array.

◆ GetFrame()

Size oevislib_net.Region.GetFrame ( )
inline

Returns the region frame.

Returns
A size object.

◆ GetPoints()

Array< Point2Di > oevislib_net.Region.GetPoints ( )
inline

Returns all the points contained in the region.

Returns
Array containing region points.

◆ GetSize()

int oevislib_net.Region.GetSize ( )
inline

Returns the number of points sequence in the region.

Returns
Number of points sequences in the region.

◆ IsEmpty()

bool oevislib_net.Region.IsEmpty ( )
inline

Checks if the region contains any point.

Returns
True if the region contains at least one point, false otherwise.

◆ IsOnFrame()

bool oevislib_net.Region.IsOnFrame ( )
inline

Checks if the region is adjacent to its frame.

Returns
True if at least one point is adjacent to the frame, false otherwise.

◆ Region() [1/4]

oevislib_net.Region.Region ( )
inline

Creates a new empty Region.

◆ Region() [2/4]

oevislib_net.Region.Region ( int inWidth,
int inHeight )
inline

Creates a new Region given frame dimensions.

Parameters
inWidthFrame width. Range: [0, +inf).
inHeightFrame height. Range: [0, +inf).

◆ Region() [3/4]

oevislib_net.Region.Region ( Size inFrame)
inline

Creates a new Region given a frame.

Parameters
inFrameFrame dimensions.

◆ Region() [4/4]

oevislib_net.Region.Region ( Size inFrame,
Array< PointsSequence > inPointsSequences )
inline

Creates a new Region using a frame and a set of points.

Parameters
inFrameFrame size.
inPointsSequencesPoints sequences.

◆ Reserve()

void oevislib_net.Region.Reserve ( int inNewCapacity)
inline

Reserves (but not allocates) space for the Region data.

Parameters
inNewCapacityNew capacity. Range: [0, +inf).

◆ Serialize()

ByteBuffer oevislib_net.Region.Serialize ( )
inline

Serializes the object.

Returns
Buffer where the object is stored.

◆ SetFrame()

void oevislib_net.Region.SetFrame ( Size inFrame)
inline

Sets a new frame for the region.

Parameters
inFrameNew region frame. It must contain all the region points.

◆ Swap()

void oevislib_net.Region.Swap ( Region inRegion)
inline

Exchange the content of two regions.

Parameters
inRegionThe object that will be swapped.

◆ Verify()

void oevislib_net.Region.Verify ( )
inline

Checks if the region is valid.

A region is valid if and only ifIts points sequences are ordered with increasing y coordinate. Its points sequences are ordered with increasing x coordinate. Its points sequences have positive length. Its points sequences do not overlap and are not contiguous. It does not contain points outside its frame.