Convert ClusteredNeuroVol to a base array
Source:R/clustervol.R, R/neurovec.R, R/neurovol.R, and 1 more
as.array-methods.RdEnsures that clustered volumes dispatch through the `as.array` S4 generic and return dense arrays of cluster labels aligned to the underlying space.
Provides an `as.array` S4 method so sparse volumes can be coerced with the same syntax used for dense objects.
The S4 slots of an object that extends array are stored as attributes
on that array, so the default coercion handed back the voxel data still
carrying space, header and class. Anyone calling
as.array() wants the numbers without the wrapper; these methods give
exactly that.
Usage
# S4 method for class 'ClusteredNeuroVol'
as.array(x, ...)
# S4 method for class 'DenseNeuroVec'
as.array(x, ...)
# S4 method for class 'SparseNeuroVol'
as.array(x, ...)
# S4 method for class 'DenseNeuroVol'
as.array(x, ...)
# S4 method for class 'NeuroSlice'
as.array(x, ...)
# S4 method for class 'SparseNeuroVec'
as.array(x, ...)