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
| Name | Type | Description |
|---|---|---|
empty[get]
|
bool | Whether this view has zero resident area. |
height[get]
|
size_t | Resident height of this view. |
planeCount[get]
|
size_t | Number of logical planes/bands. |
region[get]
|
Region2D | Resident descriptor-space region represented by this view. |
width[get]
|
size_t | Resident width of this view. |
Methods
| Name | Description |
|---|---|
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);