Description Usage Arguments Value See Also Examples
Construct a MRIaggr
object restricted to a subset of observations.
1 2 | ## S4 method for signature 'MRIaggr'
constReduceMRIaggr(object, mask, numeric2logical = FALSE, keep.index = TRUE)
|
object |
an object of class |
mask |
the binary contrast parameter or a vector indicating the observations to be kept. character or logical vector with length equal to the number of observations in |
numeric2logical |
should |
keep.index |
should the previous |
a MRIaggr
object.
calcBrainMask
to compute an indicator of the brain observations.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | ## load NIFTI files and convert them to MRIaggr
path.Pat1 <- system.file(file.path("nifti"), package = "MRIaggr")
ls.array <- list(readMRI(file.path(path.Pat1, "T2_GRE_t0"), format = "nifti"))
MRIaggr.Pat1 <- constMRIaggr(ls.array, identifier = "Pat1", param = "T2_GRE_t0")
## create the cerebral mask
## Not run:
res <- calcBrainMask(MRIaggr.Pat1, param = "T2_GRE_t0", type = "kmeans",
kmeans.n_groups = 2:4,
update.object = TRUE, overwrite = TRUE)
res <- calcSmoothMask(MRIaggr.Pat1, update.object = TRUE, overwrite = TRUE)
## End(Not run)
## display
multiplot(MRIaggr.Pat1, param = "mask", legend = FALSE)
## construct the reduced object
MRIaggr.Pat1_red <- constReduceMRIaggr(MRIaggr.Pat1, mask = "mask")
## display
par(mfrow = c(2,4), mar = rep(1.75, 4), mgp = c(2,0.75,0))
multiplot(MRIaggr.Pat1, param = "T2_GRE_t0",
window = NULL,breaks = seq(0, 300, 1), legend = FALSE)
multiplot(MRIaggr.Pat1_red, param = "T2_GRE_t0",
window = NULL, breaks = seq(0, 300, 1), legend = FALSE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.