Determines values outside the surface of an image and gives a mask back with those values set to a replacement.
replace_outside_surface(
img,
value = 0,
threshold = 0,
replace_value = NA,
reorient = FALSE
)nifti object or array
Value to check against. If zero, then
replace_outside_surface will include any dimension that has
fewer than threshold zeroes. May be a vector of values, matched with
match
Include dimension if fewer than threshold voxels
are in the slice
Value to replace those outside the surface.
Should image be reoriented if a filename?
Passed to check_nifti
Creates an array of binary values. If img is a nifti
object, then a nifti is returned