Description Usage Arguments Details Value See Also Examples
Associate each voxel to an hemisphere and compute the difference between the voxel values and their contralateral correspondent.
1 2 3 4 | ## S4 method for signature 'MRIaggr'
calcContralateral(object, param, num = NULL, type = "mean",
param.ref = NULL, distband = 1, lambda = 1,
verbose = optionsMRIaggr("verbose"), update.object = FALSE, overwrite = FALSE)
|
object |
an object of class |
param |
the contrast parameters to normalize. character vector. REQUIRED. |
num |
the slices to extract. numeric vector or |
type |
the method used to compute the contralateral correspondent of each voxel. Can be |
param.ref |
the parameter to use as a reference for the identification of the contralateral voxel. character or |
distband |
the distance within which the contralateral values are considered. postive numeric. |
lambda |
the importance of the penalization. numeric. |
verbose |
should the execution of the function be traced ? logical. |
update.object |
should the resulting contralateral parameters be stored in |
overwrite |
if contrast parameters with the same names are already stored in |
ARGUMENTS:
Information about the num
argument can be found in the details section of initNum
.
FUNCTION:
To compute the contralateral correspondent of each voxel, the mean or median value of the contralateral observations present in the distband can be used.
Otherwise, considering a reference parameter, the contralateral voxel that minimised the difference in contrast (denoted I) with the voxel of interest (denoted x) penalized by the distance is retained :
voxel_{contro} = argmin_{y} \frac{|I(x) - I(y)|}{σ} + λ * dist(x,y) where σ=sd(I)
The param.ref
and lambda
are active only if type
is "1NN_penalized"
. In this case lambda
equal 0
means no penalization.
An list containing :
[[data]]
: a data.frame containing the coordinates and the parameters normalized by the contralateral values.
[[index_plot]]
: two lists containing the observations used to compute the contralateral values, one for each hemisphere.
calcHemisphere
to identify the hemispheres.
selectContrast
to select the contralateral normalized parameters or the hemisphere parameter.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | ## load a MRIaggr object
data("MRIaggr.Pat1_red", package = "MRIaggr")
## associate each voxel to its contralateral correspondant
## according T1 parameter and compute the normalized parameters
res <- calcContralateral(MRIaggr.Pat1_red, param = c("DWI_t0","T2_FLAIR_t2"), num = NULL,
type = "mean", param.ref = "T1_t0", distband = 1, lambda = 1, verbose = TRUE)
## display
multiplot(res$data[,c("i","j","k"),drop = FALSE],
contrast = res$data$DWI_t0_contro
)
multiplot(res$data[,c("i","j","k"), drop = FALSE],
contrast = res$data$DWI_t0_contro,
index1 = res$data[res$index_plot$index.plot_lesionR,c("i","j","k"), drop = FALSE],
index2 = res$data[res$index_plot$index.plot_lesionL,c("i","j","k"), drop = FALSE]
)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.