Learn R Programming

MRIaggr (version 1.1.5)

calcTableLesion: Vertical distribution of the lesion

Description

Compute the number of lesion observations at each slice.

Usage

"calcTableLesion"(object, maskN, mask = NULL, numeric2logical = FALSE, verbose = optionsMRIaggr("verbose"), update.object = FALSE, overwrite = FALSE)

Arguments

object
an object of class MRIaggr. REQUIRED.
maskN
the binary contrast parameter indicating the lesion. character. REQUIRED.
mask
the binary contrast parameter indicating the brain. character or NULL if no mask is available.
numeric2logical
should mask and maskN values be converted to logical ? logical.
verbose
should the execution of the function be traced ? logical.
update.object
should the resulting lesion table be stored in object ? logical.
overwrite
if a lesion table is already stored in object@table_lesion, can it be overwritten ? logical.

Value

A data.frame containing the number of observation within the mask at each slice.

Examples

Run this code
## load a MRIaggr object
data("MRIaggr.Pat1_red", package = "MRIaggr")

## compute table
res <- calcTableLesion(MRIaggr.Pat1_red, maskN = c("MASK_DWI_t0", "MASK_T2_FLAIR_t2"),
     numeric2logical = TRUE, update.object = TRUE, overwrite = TRUE)

## extract table
res <- selectTable(MRIaggr.Pat1_red, "lesion")

Run the code above in your browser using DataLab