powered by
Takes in an image and a color scheme, converts that image into a data.frame with the data and a color mapping.
data.frame
img_colour_df(img, zlim = NULL, breaks = NULL, col = gray(0:64/64))img_color_df(...)
img_color_df(...)
A data.frame with the first columns being the x,y,z (maybe t) coordinates (named dim and the dimension number), a value
dim
value
column that contains the intensity information, and a colour column representing the color that voxel maps to
colour
an object to be coerced to nifti using check_nifti
nifti
check_nifti
Limits for the domain of the intensities
Breaks for the intensities to map to colors
Colors to map intensities
not used
img = nifti(array(rnorm(10^3), dim = rep(10, 3))) df = img_colour_df(img) df = img_color_df(img)
Run the code above in your browser using DataLab