MRIaggr-allocDescStats: Allocate non standard elements

Description Usage Arguments Details Value See Also Examples

Description

Allocate non standard elements to a MRIaggr object.

Usage

1
2
3
## S4 replacement method for signature 'MRIaggr'
allocDescStats(object, name, 
         overwrite = FALSE, verbose = optionsMRIaggr("verbose")) <- value

Arguments

object

an object of class MRIaggr. REQUIRED.

value

any R object. REQUIRED.

name

the name of the element storing value. character. REQUIRED.

overwrite

if an element with the same name is already stored in object@ls_descStats, can it be overwritten ? logical.

verbose

should the execution of the function be traced ? logical.

Details

FUNCTION:
Contrary to all other alloc. methods that impose restrictions on the objects that can be allocated, this function enable to allocate freely a R element. However these elements will have no interaction with the methods of this package.

Value

None.

See Also

selectDescStats to extract non standard elements.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
## load a MRIaggr object
data("MRIaggr.Pat1_red", package = "MRIaggr")

## allocate a vector
allocDescStats(MRIaggr.Pat1_red,name = "spatial_res") <- c(1.875,1.875,6)

## select the corresponding element
selectDescStats(MRIaggr.Pat1_red, "spatial_res")

## some calc methods automatically save results in the ls_descStats slot
# find spatial groups 
calcGroupsMask(MRIaggr.Pat1_red,mask = c("MASK_DWI_t0","MASK_T2_FLAIR_t2"),
               W.range = 6, W.spatial_res = selectDescStats(MRIaggr.Pat1_red,"spatial_res"),
               update.object = TRUE, overwrite = TRUE)

# extract spatial groups
selectDescStats(MRIaggr.Pat1_red, "GroupsLesion")

bozenne/MRIaggr documentation built on May 13, 2019, 1:39 a.m.