Description Usage Arguments Details Value See Also Examples
Compute the spatial groups defined by a binary parameter.
1 2 3 4 | ## S4 method for signature 'MRIaggr'
calcGroupsMask(object, mask, numeric2logical = FALSE,
W = "ifany", W.range, W.spatial_res = c(1,1,1),
verbose = optionsMRIaggr("verbose"), update.object = FALSE, overwrite = TRUE)
|
object |
an object of class |
mask |
the binary contrast parameter that should be used to identifying the spatial groups. character. REQUIRED. |
numeric2logical |
should |
W |
the neighbourhood matrix. dgCMatrix or |
W.range |
the neighbourhood range. postive numeric. REQUIRED. |
W.spatial_res |
a dilatation factor for the coordinates. positive numeric vector of size 3. |
verbose |
should the execution of the function be traced ? logical. |
update.object |
should the resulting spatial groups be stored in |
overwrite |
if spatial groups are already stored in |
This function requires to have installed the Matrix and the spam package to work.
FUNCTION:
Call the calcGroupsW
function.
An list containing for each parameter:
[[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.
selectDescStats
to select the spatial groups.
calcW
to compute the neighbourhood matrix.
1 2 3 4 5 6 7 8 9 10 | ## 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")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.