if(interactive()) {
dim <- c(6, 6, 6)
image <- as_ieegio_volume(
array(rnorm(prod(dim)), dim),
vox2ras = rbind(cbind(diag(1, 3), -dim / 2),
c(0, 0, 0, 1))
)
ras_positions <- rbind(c(1, -1, 1.5), c(-2.25, -1, -0.75))
burned <- burn_volume(
image,
ras_positions,
col = c("red", "green"),
radius = 0.5,
reshape = c(24, 24, 24)
)
plot(
burned,
position = ras_positions[1, ],
zoom = 15,
pixel_width = 0.25
)
}
Run the code above in your browser using DataLab