getUniqueLesionPatches: Compute unique lesion patches

Description Usage Arguments Value Author(s) Examples

View source: R/getUniqueLesionPatches.R

Description

Compute uniqe patches of voxels with the same pattern of lesions in all subjects. Useful to understand the number of patterns that will be analyzed in a lesion dataset. A patch is a group of voxels, not necessarily close to each other, which have the same identical lesion pattern.

Usage

1
2
3
getUniqueLesionPatches(lesions.list, mask = NA,
  returnPatchMatrix = FALSE, thresholdPercent = 0.1,
  binaryCheck = FALSE, showInfo = TRUE)

Arguments

lesions.list

list of antsImages (faster) or filenames (slower)

mask

(default=NA) a mask image to restrict the search for patches. Will be automatically calculated if not provided. Normally the mask restricts the search only to voxels lesioned in >10% of subejcts. To set this proportion use thresholdPercent.

returnPatchMatrix

(default=FALSE) logical, should the matrix of patches be returned. This is used in lesymap to run the analyses.

thresholdPercent

(default=0.1) voxels with lesions in less than this proportion of subjects will not be considered. I.e., 0.1 = 10%.

binaryCheck

(default=FALSE) set this to TRUE to verify that maps are binary.

showInfo

(default=TRUE) logical indicating whether to display information.

Value

List of objects named as follows:

Author(s)

Dorian Pustina

Examples

1
2
3
4
5
6
7
lesydata = file.path(find.package('LESYMAP'),'extdata')

filenames = Sys.glob(file.path(lesydata, 'lesions', '*.nii.gz'))
patchinfo = getUniqueLesionPatches(filenames[1:10]) # slower

lesions = imageFileNames2ImageList(filenames[1:10])
patchinfo = getUniqueLesionPatches(lesions) # faster

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