Learn R Programming

neuroim2 (version 0.8.5)

as.dense,ClusteredNeuroVol-method: Coerce SparseNeuroVol to DenseNeuroVol

Description

Convert a sparse volumetric image to a dense representation with the same spatial geometry. Non-zero values stored in the sparse vector are placed at their corresponding linear indices in the dense array; all other voxels are 0.

This function provides a method to coerce an object of class ROIVol to a DenseNeuroVol using the as.dense method.

Usage

# S4 method for ClusteredNeuroVol
as.dense(x)

# S4 method for SparseNeuroVol as.dense(x)

# S4 method for ROIVol as.dense(x)

# S4 method for SparseNeuroVec as.dense(x)

Value

A NeuroVol object representing the dense version of the clustered volume.

A DenseNeuroVol with identical spatial dimensions and values expanded from the sparse representation.

A DenseNeuroVol object obtained by coercing the ROIVol object.

Arguments

x

An object of class ROIVol to be coerced to a DenseNeuroVol.