Convert ClusteredNeuroVol to DenseNeuroVol
Source:R/clustervol.R
as-ClusteredNeuroVol-DenseNeuroVol.Rd
This method converts a ClusteredNeuroVol into an equivalent DenseNeuroVol object.
Arguments
- from
A
ClusteredNeuroVol
object to be converted
Value
A DenseNeuroVol
object
Examples
if (FALSE) { # \dontrun{
# Create a clustered volume
mask <- read_vol(system.file("extdata", "global_mask_v4.nii", package="neuroim2"))
clusters <- rep(1:5, each=sum(mask)/5)
cvol <- ClusteredNeuroVol(mask, clusters)
# Convert to DenseNeuroVol
dvol <- as(cvol, "DenseNeuroVol")
} # }