"calcGroupsMask"(object, mask, numeric2logical = FALSE, W = "ifany", W.range, W.spatial_res = c(1,1,1),
verbose = optionsMRIaggr("verbose"), update.object = FALSE, overwrite = TRUE)
MRIaggr
. REQUIRED.mask
be convert to logical ? logical."ifany"
leading to use the neighbourhood matrix stored in the object
if any and else computate this matrix.object
? logical.object@ls_descStats
, can they be overwritten ? logical.[[group]]
: a vector containing the group index for each observation.
[[group_size]]
: a vector with the size of each spatial group.
[[group_number]]
: the number of spatial groups. integer vector.
[[group_max]]
: the index of the largest group. integer vector.
FUNCTION:
Call the calcGroupsW
function.
selectDescStats
to select the spatial groups.
calcW
to compute the neighbourhood matrix.
## load a MRIaggr object
data("MRIaggr.Pat1_red", package = "MRIaggr")
## compute spatial groups
calcGroupsMask(MRIaggr.Pat1_red, mask = c("MASK_DWI_t0","MASK_T2_FLAIR_t2"),
W.range = 6, W.spatial_res = c(1.875,1.875,6),
update.object = TRUE, overwrite = TRUE)
## extract spatial groups
selectDescStats(MRIaggr.Pat1_red, "GroupsLesion")
Run the code above in your browser using DataLab