View source: R/emptyImageDimensionsMask.R
emptyImageDimensionsMask | R Documentation |
Make a mask of an image that has all irrelevant values
emptyImageDimensionsMask(img, ..., reorient = FALSE)
empty_dim_mask(img, ..., reorient = FALSE)
img |
nifti object |
... |
Arguments to be passed to |
reorient |
Should image be reoriented if a filename? |
Object of class nifti
, with binary values
empty_dim_mask
is a shorthand for emptyImageDimensionsMask
with all the same arguments.
getEmptyImageDimensions
set.seed(5)
dims = rep(10, 3)
arr = array(rnorm(prod(dims)), dim = dims)
arr[,,10] = 0
nim = oro.nifti::nifti(arr)
out = emptyImageDimensionsMask(nim)
out_arr = emptyImageDimensionsMask(arr)
testthat::expect_equal(out_arr, array(out, dim = dim(out)))
out_arr = empty_dim_mask(arr)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.