| denseImage | R Documentation |
A dense image is an array carrying image geometry alongside it. It is an S7
class whose parent is the array S3 class, which means every storage mode
works (double, integer, logical and complex all occur in practice, masks
being logical). The data are still a plain R array, so no copy is needed to
pass them to compiled code, and the geometry is validated whenever it is
set rather than only on construction.
denseImage(
.data,
voxelSize = NULL,
worldTransform = NULL,
spatial = NULL,
unit = NULL,
geometry = NULL
)
isDenseImage(x)
asDense(x, ...)
.data |
An array, or any atomic vector, which is treated as one-dimensional. |
voxelSize |
Voxel size, one per spatial dimension. |
worldTransform |
A 4x4 affine transform mapping voxel to world coordinates. Decomposed into rotation/translation and voxel size on assignment; see geometry. |
spatial |
The number of leading dimensions that index location rather than the value held at each location. Defaults to the number the geometry has, if one is given, or otherwise to three, or the dimensionality if that is smaller. |
unit |
The unit of measurement of voxel size and world coordinates. |
geometry |
An imageGeometry, or an image to take one from, giving whatever is not specified explicitly. Its grid must match the leading dimensions of the data. |
x |
An image. |
... |
Further arguments to |
Properties are stored as ordinary attributes, so compiled code reads them without needing to know anything about S7.
An object of S7 class denseImage representing a dense image, with
a geometry property holding its imageGeometry.
S7 qualifies a class name with its package, so the class
attribute is "imply::denseImage" and inherits(x, "denseImage") is
FALSE. Use isDenseImage() rather than testing the class directly.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.