shape <- c(50, 50, 50)
vox2ras <- matrix(
c(-1, 0, 0, 25,
0, 0, 1, -25,
0, -1, 0, 25,
0, 0, 0, 1),
nrow = 4, byrow = TRUE
)
# continuous
x <- array(rnorm(125000), shape)
volume <- as_ieegio_volume(x, vox2ras = vox2ras)
plot(volume, zoom = 3, pixel_width = 0.5)
# color rgb(a)
x <- array(
sample(c("red","blue", "green", "cyan", "yellow"),
12500, replace = TRUE),
shape
)
rgb <- as_ieegio_volume(x, vox2ras = vox2ras)
plot(rgb, zoom = 3, pixel_width = 0.5)
Run the code above in your browser using DataLab