R6 Class - Generate Data Cube Geometry via 3D Volume Texture
Source:R/geom_datacube2.R
DataCubeGeom2.RdVolumetric data cube geometry rendered via a 3D texture lookup.
Extends DataCubeGeom with four-channel color map support and opacity
thresholding.
Super classes
AbstractGeom -> DataCubeGeom -> DataCubeGeom2
Public fields
typeGeometry type string (
"datacube2").clickableLogical; always
FALSEfor volume geometry.thresholdOpacity threshold: voxel values below this level are rendered as transparent. Default
0.6.color_formatWebGL texture format string; either
"RGBAFormat"or"RedFormat".color_mapNamed list describing the four-channel color map applied to the volume, or
NULL.trans_space_fromCoordinate space of the input data before applying the transformation matrix; either
"model"(default) or"scannerRAS".
Methods
DataCubeGeom2$new()
Create a new data cube geometry using a 3D texture.
Arguments
nameUnique character name.
valueInteger vector of voxel values (0-255).
dimInteger vector of length 3: dimensions of the volume.
half_sizeNumeric vector of length 3: half-extents of the bounding box in world-space units. Default
c(128, 128, 128).groupGeomGroupused to store the voxel data.positionNumeric vector of length 3: geometry origin.
color_formatWebGL texture format:
"RGBAFormat"(default) or"RedFormat".cache_filePath to a JSON cache file,
TRUEfor a temporary file, orNULLto keep data in memory.layerCamera layer. Default
8(main camera only).digestLogical; compute a content digest for cache validation.
...Additional arguments forwarded to
DataCubeGeom.
DataCubeGeom2$to_list()
Serialize the texture data cube geometry to a named list
for JSON export, adding threshold, color_format,
color_map, isDataCube2, and trans_space_from.