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

channels

Extract channels from RGB data


Description

Extract one or more channels from an RGB data array that was obtained from an RGB NIfTI image or created by the rgbArray function. The result is more amenable to numeric manipulation.

Usage

channels(array, channels = c("red", "green", "blue", "alpha"), raw = FALSE)

Arguments

array

An image, an rgbArray, or another array that can be converted to the latter.

channels

A character vector of channels to extract.

raw

Boolean value: if TRUE, return a raw array, which is the most compact representation; otherwise return an integer array.

Value

A raw-mode or integer-mode array with one more dimension than the first argument, corresponding to channels.

Author(s)

Jon Clayden <code@clayden.org>


RNifti

Fast R and C++ Access to NIfTI Images

v1.3.0
GPL-2
Authors
Jon Clayden [cre, aut] (<https://orcid.org/0000-0002-6608-0619>), Bob Cox [aut], Mark Jenkinson [aut], Matt Hall [ctb], Rick Reynolds [ctb], Kate Fissell [ctb], Jean-loup Gailly [cph], Mark Adler [cph]
Initial release
2020-12-04

We don't support your browser anymore

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