Struct WritableRasterView
Non-owning writable semantic raster view.
struct WritableRasterView(T);
Plane order is logical band order.
Region coordinates belong to the resident descriptor-space coordinate system used by the stable PlaneDescriptor block.
The view owns neither descriptors nor pixel storage.
Properties
| Name | Type | Description |
|---|---|---|
empty[get]
|
bool | Whether the represented region has zero area. |
height[get]
|
size_t | Resident height. |
planeCount[get]
|
size_t | Number of logical planes/bands represented by this view. |
region[get]
|
Region2D | Resident descriptor-space region represented by this view. |
width[get]
|
size_t | Resident width. |
Methods
| Name | Description |
|---|---|
tryRoi
(relative, success)
|
Attempts to create a writable child ROI relative to this view. |
trySample
(band, x, y, value)
|
Attempts to read one logical sample. |
trySetSample
(band, x, y, value)
|
Attempts to write one logical sample. |
Example
Example using the default writable semantic capability.
import raster;
WritableRasterView!ubyte view;
assert(view .planeCount == 0);
assert(view .empty);