powered by
This image will flip x, y, or z direction
flip_img(img, x = FALSE, y = FALSE, z = FALSE, ...)
Object of class nifti
nifti object or character filename
(logical) Flip x direction
(logical) Flip y direction
(logical) Flip z direction
Arguments passed to check_nifti
check_nifti
img = random_nifti(rep(15, 3)) flipped = flip_img(img, x = TRUE, y = TRUE, z = TRUE) img = random_nifti(rep(15, 2)) flipped = flip_img(img, x = TRUE) testthat::expect_error(flip_img(img, z= TRUE))
Run the code above in your browser using DataLab