Learn R Programming

neuroim2 (version 0.8.5)

as-ClusteredNeuroVol-DenseNeuroVol: Convert ClusteredNeuroVol to DenseNeuroVol

Description

This method converts a ClusteredNeuroVol into an equivalent DenseNeuroVol object.

Value

A DenseNeuroVol object

Arguments

from

A ClusteredNeuroVol object to be converted

Details

Convert a ClusteredNeuroVol Object to a DenseNeuroVol Object

See Also

ClusteredNeuroVol, DenseNeuroVol

Examples

Run this code

# Create a clustered volume
mask <- read_vol(system.file("extdata", "global_mask_v4.nii", package="neuroim2"))
clusters <- rep(1:5, length.out=sum(mask))
cvol <- ClusteredNeuroVol(mask, clusters)

# Convert to DenseNeuroVol
dvol <- as(cvol, "DenseNeuroVol")

Run the code above in your browser using DataLab