getLesionLoad: Compute regional lesion load

Description Usage Arguments Value Author(s) Examples

View source: R/getLesionLoad.R

Description

Computes lesion loads from a series of images. A parcellation image (or simple mask) is required to define the regions from which to compute the lesion load.

Usage

1
2
getLesionLoad(lesions.list, parcellation, label = NA, mask = NA,
  binaryCheck = F, keepAllLabels = F, minSubjectPerLabel = "10%")

Arguments

lesions.list

list of antsImages or filenames. Must be binary (0 and 1 values).

parcellation

ansImage or filename of the parcellated volumes. A parcellation is an image brain regions showned as with integer values (i.e. ,1,2,3,...).

label

(default=NA) you can ask to get output for a specific label in the parcellation volume (i.e., label=122).

mask

(default=NA) if this mask is specified (antsImage or filename) lesioned voxels outside the mask are ignored. This is not a good choice, but in case you need it its there.

binaryCheck

(default=FALSE) check whether lesion maps are binary (0/1). Will output an error if lesion files are not binary.

keepAllLabels

(default=FALSE) by default labels are removed if affected in just few subjects. Setting this to TRUE will keep all labels.

minSubjectPerLabel

minimum number of subjects a parcel must be lesioned to keep and return it.

Value

Author(s)

Dorian Pustina

Examples

1
2
3
4
5
6
lesydata = file.path(find.package('LESYMAP'),'extdata')
filenames = Sys.glob(file.path(lesydata, 'lesions', '*.nii.gz'))
lesions = imageFileNames2ImageList(filenames[1:10])
parcellation = antsImageRead(
file.path(lesydata,'template', 'Parcellation_403areas.nii.gz'))
lesload = getLesionLoad(lesions, parcellation)

neuroconductor/LESYMAP documentation built on May 28, 2020, 7:27 p.m.