oa::ImagePlanes

ImagePlanes class in the OA Ui public surface.

Public Methods

oa::U8 oa::ImagePlanes::channelCount()
oa::I32 oa::ImagePlanes::height()
bool oa::ImagePlanes::isValid()
oa::Status oa::ImagePlanes::markConsumed(const oa::Event & inCompletion)
ImageDtype oa::ImagePlanes::planeDtype(oa::U32 inChannel)
oa::U32 oa::ImagePlanes::planeIndex(oa::U32 inChannel)
oa::I32 oa::ImagePlanes::width()

Static Public Methods

static oa::Result<ImagePlanes> oa::ImagePlanes::fromPlanes(oa::Engine & inRt, oa::Span<const oa::Span<const oa::U8>> inPlanes, oa::Span<const ImageDtype> inDtypes, oa::I32 inW, oa::I32 inH)
static oa::Result<ImagePlanes> oa::ImagePlanes::loadFile(oa::Engine & inRt, oa::StringView inPath)

Constructor & Destructor Documentation

oa::ImagePlanes::ImagePlanes()
No public source comment is attached to this declaration.
void oa::ImagePlanes::~ImagePlanes()
No public source comment is attached to this declaration.

Public Method Documentation

oa::U8 oa::ImagePlanes::channelCount()
No public source comment is attached to this declaration.

Returns

oa::U8

The declared return value.

oa::I32 oa::ImagePlanes::height()
No public source comment is attached to this declaration.

Returns

oa::I32

The declared return value.

bool oa::ImagePlanes::isValid()
No public source comment is attached to this declaration.

Returns

bool

The declared return value.

oa::Status oa::ImagePlanes::markConsumed( const oa::Event & inCompletion )
Records the exact UI consumer completion. Abandoning the value before completion transfers all owned plane buffers to engine retirement.

Parameters

inCompletion
const oa::Event &

Returns

oa::Status

The declared return value.

ImageDtype oa::ImagePlanes::planeDtype( oa::U32 inChannel )
No public source comment is attached to this declaration.

Parameters

inChannel
oa::U32

Returns

ImageDtype

The declared return value.

oa::U32 oa::ImagePlanes::planeIndex( oa::U32 inChannel )
No public source comment is attached to this declaration.

Parameters

inChannel
oa::U32

Returns

oa::U32

The declared return value.

oa::I32 oa::ImagePlanes::width()
No public source comment is attached to this declaration.

Returns

oa::I32

The declared return value.

static oa::Result<ImagePlanes> oa::ImagePlanes::fromPlanes( oa::Engine & inRt, oa::Span<const oa::Span<const oa::U8>> inPlanes, oa::Span<const ImageDtype> inDtypes, oa::I32 inW, oa::I32 inH )
upload caller-provided planes. inPlanes and inDtypes must have the same length (1–4). Each span is W*H * sizeof(dtype) bytes. Synchronous.

Parameters

inRt
oa::Engine &

inPlanes
oa::Span<const oa::Span<const oa::U8>>

inDtypes
oa::Span<const ImageDtype>

inW
oa::I32

inH
oa::I32

Returns

oa::Result<ImagePlanes>

The declared return value.

static oa::Result<ImagePlanes> oa::ImagePlanes::loadFile( oa::Engine & inRt, oa::StringView inPath )
Decode any stb_image-supported file to planar U8. 1-channel files → gray (channelCount=1). 3-channel files → RGB (channelCount=3). 4-channel files → RGBA (channelCount=4). HDR (.hdr) → planar F32. synchronous (transfer completes on return).

Parameters

inRt
oa::Engine &

inPath
oa::StringView

Returns

oa::Result<ImagePlanes>

The declared return value.