if(interactive() && ants_available()) {
ants <- load_ants()
image1 <- ants$image_read(ants$get_ants_data('mni'))
image2 <- image1$smooth_image(1.0)
image3 <- image1$smooth_image(2.0)
image4 <- image1$smooth_image(3.0)
ants_plot_grid(
list(image1, image2, image3, image4),
slices = 100, title = "4x1 Grid"
)
ants_plot_grid(
list(image1, image2, image3, image4),
shape = c(2, 2),
slices = 100, title = "2x2 Grid"
)
ants_plot_grid(
list(image1, image2, image3, image4),
shape = c(2, 2), axes = c(0,1,2,1),
slices = 100, title = "2x2 Grid (diff. anatomical slices)"
)
}
Run the code above in your browser using DataLab