make_intensity_df: create labeled dataframe of vectorized voxel intensities for...

Description Usage Arguments Value Author(s) Examples

View source: R/make_intensity_df.R

Description

Function used along with mica::vectorize_image() to vectorize images and place in a dataframe, where names for each image are drawn from the filepath of the image.

Usage

1
make_intensity_df(filepaths, subj_scan_scanner, ...)

Arguments

filepaths

List of paths to where nifti objects are stored.

subj_scan_scanner

Character valued ID for subject, scan number, and scanner, in the format subj_scan_scanner.

...

Additional arguments passed to or from other functions.

Value

a data frame of vectorized images with columns intensity, id, site, and scan, cdf.

Author(s)

Julia Wrobel julia.wrobel@cuanschutz.edu

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## Not run: 
filenames = list.files(path = "../Documents/", pattern = "flair_reg", recursive = TRUE)
filenames = paste0("../Documents/", filenames)
sitenames = lapply(filenames, function(f) substring(f, 64, 66))
scan_nos = lapply(filenames, function(f) substring(str_split(f, "Scan_")[[1]][2], 1, 1))
ids = paste(sitenames, scan_nos, sep = "_")

intensity_data = make_intensities_df(filenames, ids, sitenames, scan_nos)

## End(Not run)

julia-wrobel/mica documentation built on Nov. 15, 2020, 8:41 p.m.