Constructor for the sg_image S3 class, which represents a
multi-channel image with associated metadata.
Arguments
- pixels
Numeric array of dimensions H x W (grayscale) or H x W x C (multi-channel).
- channels
Character vector of channel names. If
NULL, defaults toch1,ch2, etc.- resolution
Named list with
x_umandy_um: microns per current array pixel. Divide these byorigin$downsamplefor the full-resolution reference pixel sizes.- metadata
Named list of additional image metadata.
- id
Optional stable image identifier (string). Absolute file paths must not be used as identity.
- plane
Optional list with zero-based
level,series,c,zandt.c = NAmeans that the array holds all channels.- origin
Optional list with
x,y(position of the array's top-left corner in full-resolution pixel coordinates) anddownsample(full-resolution pixels per array pixel).- bands
Optional data frame describing channels/bands with columns
name,wavelength_nm,fwhm_nm(one row per channel).- value_semantics
What pixel values represent: one of
"unknown","intensity","raw","reflectance","radiance","absorbance","probability".- source_digest
Optional
"sha256:<hex>"digest of the source file or pixel content.- transform_digest
Optional digest of transformations applied to the source.
- provenance
Named list of provenance records.
Details
The pixel array order is always [y, x, channel]: the first array row
is the top image row. All arguments after metadata are optional
interchange fields added in segmantR 0.2.0; objects created by older
code simply lack them and are treated with the documented defaults.