Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

emptyImageDimensionsMask

Make Mask from Empty Image Dimensions


Description

Make a mask of an image that has all irrelevant values

Usage

emptyImageDimensionsMask(img, ..., reorient = FALSE)

empty_dim_mask(img, ..., reorient = FALSE)

Arguments

img

nifti object

...

Arguments to be passed to getEmptyImageDimensions.

reorient

Should image be reoriented if a filename?

Value

Object of class nifti, with binary values

Note

empty_dim_mask is a shorthand for emptyImageDimensionsMask with all the same arguments.

See Also

Examples

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)

neurobase

'Neuroconductor' Base Package with Helper Functions for 'nifti' Objects

v1.32.1
GPL-2
Authors
John Muschelli [aut, cre]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.