Description Usage Arguments Details Value See Also Examples
Compute the regional contrast parameters.
1 2 3 4 5 | ## S4 method for signature 'MRIaggr'
calcRegionalContrast(object,param, bandwidth, power = 2, diagonal = FALSE,
W = "ifany", W.range, W.spatial_res = c(1,1,1), num = NULL, hemisphere = "both",
name_newparam = paste(param,"regional", sep = "_"),
verbose = optionsMRIaggr("verbose"), update.object = FALSE, overwrite = FALSE)
|
object |
an object of class |
param |
the contrast parameter(s) from which the regional parameter(s) will be computed. character vector. REQUIRED. |
bandwidth |
the bandwidth of the kernel. postive numeric. REQUIRED. |
power |
the power of the kernel. postive numeric. |
diagonal |
should the diagonal be added to the neighbourhood matrix ? logical. |
W |
the neighbourhood matrix. dgCMatrix or |
W.range |
the neighbourhood range. postive numeric. Required only if |
W.spatial_res |
a dilatation factor for the coordinates. positive numeric vector of size 3. |
num |
the slices to use. numeric vector or |
hemisphere |
the hemisphere to use. character. |
verbose |
should the execution of the function be traced ? logical. |
name_newparam |
the name of the new parameters. character vector. |
update.object |
should the resulting regional parameters be stored in |
overwrite |
if contrast parameters with the same names are already stored in |
This function requires to have installed the Matrix and the spam package to work.
ARGUMENTS :
Information about the num argument can be found in the details section of initNum.
Information about the hemisphere arguments can be found in the details section of selectContrast.
Information about bandwidth and power arguments can be found in the details section of EDK.
A data.frame containing in columns the regional parameters.
selectContrast to select the regional parameter(s).
calcW to compute the neighboring matrix.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | ## load a MRIaggr object
data("MRIaggr.Pat1_red", package = "MRIaggr")
## compute regional values
res <- calcRegionalContrast(MRIaggr.Pat1_red, param = c("T2_FLAIR_t2","T1_t0"), bandwidth = 1.875,
W.spatial_res = c(1.875,1.875,6), W.range = 6,
update.object = TRUE, overwrite = TRUE)
## display
par(mfrow = c(2,4), mar = rep(1.5,4), mgp = c(2,0.5,0))
multiplot(MRIaggr.Pat1_red, param = "T2_FLAIR_t2", num = 1:3,
window = NULL, main = "raw - slice ")
multiplot(MRIaggr.Pat1_red, param = "T2_FLAIR_t2_regional", num = 1:3,
window = NULL, main = "regional - slice ")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.