normalize_mask: Normalize a mask to a logical array

View source: R/common.R

normalize_maskR Documentation

Normalize a mask to a logical array

Description

Coerces various mask representations into a logical 3D array of the requested dimensions. Accepts: logical arrays, integer index vectors, LogicalNeuroVol, numeric NeuroVol (thresholded > 0), logical vectors, or NULL (all TRUE).

Usage

normalize_mask(mask, target_dim)

Arguments

mask

The mask input (see description).

target_dim

Integer vector of length 3 giving the target dimensions.

Value

A logical array of dimension target_dim.


neuroim2 documentation built on April 16, 2026, 5:07 p.m.