OptrisOptrisDocumentation

Documentation/OTC SDK/Optris.Sdk — C# API referencev12.0

RegionStyle

public readonly record struct RegionStyle : IEquatable<RegionStyle>

How a region is drawn in the overlay.

Carried by the region whatever the pipeline: honoured wherever overlays are drawn, saved into the region document a recording and a camera configuration carry, and it does not change what the region measures. Set it with Region.Style.

Colours are RGBA in Vector4 order: X is red, Y is green, Z is blue, W is alpha, each 0 to 1.

Example

using var spot = Region.Spot(new Vector2(0.5f, 0.375f));
spot.Style = RegionStyle.Default with
{
    Color = new Vector4(0.0f, 0.5f, 1.0f, 1.0f),
    ShowLabel = true,
};
ulong id = camera.AddRegion(spot);

RegionStyle: properties

public Vector4 Color { get; init; }

The outline's colour, RGBA, each 0 to 1.

While an alarm rule on the region rings, the overlay draws the outline pure red instead, whatever is set here; the stored colour is untouched and returns when the alarm clears.

public static RegionStyle Default { get; }

The SDK's defaults: a 2 px red outline, a white label, a 5 px crosshair, label and aperture both off.

Read from the library rather than restated here, so the two cannot drift.

public float FontSize { get; init; }

The label height in pixels; zero lets the renderer choose one that suits the frame.

public LabelAnchor LabelAnchor { get; init; }

Which side of the region the label sits on.

public float LabelMargin { get; init; }

The gap between the region and its label, in pixels.

public float LineWidth { get; init; }

The outline width, in pixels of the surface being drawn on.

public float MarkerSize { get; init; }

The marker size in pixels: a circle's radius, or half a crosshair's arm length.

public MarkerStyle MarkerStyle { get; init; }

How a point region is marked.

public bool ShowAperture { get; init; }

Outline the pixels a point region's aperture actually sampled.

A debug aid, off by default. Requires Region.KeepSamples, because the sampled set is what the samples hold and nothing records it otherwise; without them this draws nothing rather than guessing at the nominal window. Ignored by every kind that is not a point.

public bool ShowLabel { get; init; }

Draw the region's name and reading beside it.

The reading is the hottest pixel for a hot spot, the coldest for a cold spot, and the mean for every other measuring kind; a RegionKind.Label region shows its name alone. Drawn with the SDK's own upper-case bitmap font in RegionStyle.TextColor, placed by RegionStyle.LabelAnchor and RegionStyle.LabelMargin.

public Vector4 TextColor { get; init; }

The label's colour, RGBA, each 0 to 1.

Used only while RegionStyle.ShowLabel is set.