img_colour_df: Convert Image to Data.frame with Colors

View source: R/img_color_df.R

img_colour_dfR Documentation

Convert Image to Data.frame with Colors

Description

Takes in an image and a color scheme, converts that image into a data.frame with the data and a color mapping.

Usage

img_colour_df(img, zlim = NULL, breaks = NULL, col = gray(0:64/64))

img_color_df(...)

Arguments

img

an object to be coerced to nifti using check_nifti

zlim

Limits for the domain of the intensities

breaks

Breaks for the intensities to map to colors

col

Colors to map intensities

...

not used

Value

A data.frame with the first columns being the x,y,z (maybe t) coordinates (named dim and the dimension number), a value column that contains the intensity information, and a colour column representing the color that voxel maps to

Note

img_color_df is a duplicate of img_colour_df

Examples

img = nifti(array(rnorm(10^3), dim = rep(10, 3)))
df = img_colour_df(img)
df = img_color_df(img)

neurobase documentation built on May 29, 2024, 2:17 a.m.