## 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")
Run the code above in your browser using DataLab