as.mask-methods: Convert NeuroVol to a mask

as.mask,NeuroVol,missing-methodR Documentation

Convert NeuroVol to a mask

Description

This method converts a NeuroVol object to a mask by setting all positive values to TRUE and all non-positive values to FALSE.

This method converts a NeuroVol object to a mask by setting the specified indices to TRUE and the remaining elements to FALSE.

Usage

## S4 method for signature 'NeuroVol,missing'
as.mask(x)

## S4 method for signature 'NeuroVol,numeric'
as.mask(x, indices)

Arguments

x

A NeuroVol object to convert to a mask.

indices

A numeric vector containing the indices of the input NeuroVol that should be set to TRUE in the resulting mask.

Value

A LogicalNeuroVol object representing the mask created from the input NeuroVol.

A LogicalNeuroVol object representing the mask created from the input NeuroVol with specified indices.


bbuchsbaum/neuroim2 documentation built on April 20, 2024, 4:20 p.m.