makeVolume {neuroim} | R Documentation |
makeVolume
Description
Construct a BrainVolume
instance, using default (dense) implementation
Usage
makeVolume(data = NULL, refvol, source = NULL, label = "",
indices = NULL)
Arguments
data |
an optional one- or three-dimensional |
refvol |
an instance of class |
source |
an optional instance of class |
label |
an optional |
indices |
an optional 1d vector of indices in to the 3d space |
Value
DenseBrainVolume
instance
Examples
bspace <- BrainSpace(c(64,64,64), spacing=c(1,1,1))
dat <- array(rnorm(64*64*64), c(64,64,64))
bvol <- BrainVolume(dat,bspace, label="test")
bvol2 <- makeVolume(dat, bvol)
all.equal(as.array(bvol),as.array(bvol2))
data <- 1:10
indices = seq(1,1000, length.out=10)
bvol3 <- makeVolume(data,bvol,indices=indices)
sum(bvol3) == sum(data)
[Package neuroim version 0.0.6 Index]