## load a MRIaggr object
data("MRIaggr.Pat1_red", package = "MRIaggr")
num <- 3
## display 1
multiplot(MRIaggr.Pat1_red, param = "T2_FLAIR_t2",
num = num, legend = FALSE, window = FALSE)
## outline on display 1
res <- outline(sequential=TRUE,min_dist=3)
## display the results
multiplot(MRIaggr.Pat1_red, param = "T2_FLAIR_t2",
num = num, legend = FALSE,
index1 = data.frame(k = num, res$edge[,c("i","j")]),
index2 = data.frame(k = num, res$surface[,c("i","j")]),
window = FALSE)
carto <- selectContrast(MRIaggr.Pat1_red, param = c("MASK_T2_FLAIR_t2","index"),
num = num, coords = TRUE)
carto <- merge(carto, cbind(res$surface, outline = TRUE), all = TRUE)
carto[is.na(carto$outline),"outline"] <- FALSE
head(carto)
## display the results next to MASK_T2_FLAIR_t2
multiplot(MRIaggr.Pat1_red, param = "T2_FLAIR_t2",
num = num, legend = FALSE,
index1 = carto[carto$MASK_T2_FLAIR_t2,c("i","j","k")],
index2 = carto[carto$outline,c("i","j","k")],
window = FALSE)
Run the code above in your browser using DataLab