Struct RasterView

Read-only non-owning raster view.

struct RasterView(T);

Plane order is logical band order.

The region coordinates belong to the resident coordinate system defined by the stable plane descriptors.

They are not global LogicalImage coordinates.

PlaneDescriptor.base represents resident descriptor coordinate (0, 0).

Properties

NameTypeDescription
empty[get] boolWhether this view has zero resident area.
height[get] size_tResident height of this view.
planeCount[get] size_tNumber of logical planes/bands.
region[get] Region2DResident descriptor-space region represented by this view.
width[get] size_tResident width of this view.

Methods

NameDescription
tryRoi (relative, success) Attempts to create a child region relative to this view.
trySample (band, x, y, value) Attempts to read one logical sample.

Example

Example using RasterView as a non-owning read-only capability.

import raster;
RasterView!ubyte view;
assert(view.planeCount == 0);
assert(view.region == Region2D.init);
assert(view.empty);