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

randomize_mask

Randomize Image based on Mask


Description

Randomize the values within a mask

Usage

randomize_mask(img, mask)

Arguments

img

Object of class nifti with values to be randomized

mask

Binary mask indicating which values should be randomized.

Value

Object of class nifti

Examples

set.seed(5)
  dims = rep(10, 3)
  arr = array(rnorm(prod(dims)), dim = dims)
  nim = oro.nifti::nifti(arr)
  mask = abs(nim) > 1
  randomize_mask(nim, mask)

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.