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

slice_colour_df

Slice a Image Color Data.frame


Description

Slices a image color data.frame along the 3 planes (axial, coronal, sagittal) and returns it in a ggplot-ready format for faceting.

Usage

slice_colour_df(img_df, xyz = NULL)

Arguments

img_df

an image data.frame, usually from img_colour_df. Must have the columns: dim1, dim2, dim3, colour, and value.

xyz

coordinates to slice the data.frame in x, y, and z - domains

Value

A data.frame with x and y coordinates, colour, and intensity values, along with the associated planes that were sliced.

Examples

img = nifti(array(rnorm(10^3), dim = rep(10, 3)))
df = img_colour_df(img)
sliced = slice_colour_df(df, c(5, 5, 4))

neurobase

'Neuroconductor' Base Package with Helper Functions for 'nifti' Objects

v1.32.1
GPL-2
Authors
John Muschelli [aut, cre]
Initial release

We don't support your browser anymore

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