## Not run:
# ## load an \code{MRIaggr} object
# data(MRIaggr.Pat1_red, package = "MRIaggr")
#
# calcThresholdMRIaggr(MRIaggr.Pat1_red, param = c("TTP_t0","MTT_t0"), threshold = 1:10,
# name_newparam = c("TTP.th_t0","MTT.th_t0"),
# update.object = TRUE, overwrite = TRUE)
#
# ## display raw parameter
# multiplot(MRIaggr.Pat1_red, param="TTP.th_t0", num = 3, numeric2logical = TRUE,
# index1 = list(coords = "MASK_DWI_t0", outline = TRUE))
#
# ## extract raw parameter, coordinates and compute the neighbourhood matrix
# carto <- selectContrast(MRIaggr.Pat1_red, num = 3, hemisphere = "lesion",
# param = c("TTP.th_t0","TTP_t0","MASK_DWI_t0"))
# coords <- selectCoords(MRIaggr.Pat1_red, num = 3, hemisphere = "lesion")
# W <- calcW(coords, range = sqrt(2))$W
#
# ## the seed is taken to be the point with the largest TTP in the lesion mask
# indexN <- which(carto$MASK_DWI_t0 == 1)
# seed <- indexN[which.max(carto[indexN,"TTP_t0"])]
#
# ## find optimal sigma
# resGR_sigma <- calcSigmaGR(contrast = carto$TTP.th_t0, W = W, seed = seed,
# sigma = seq(1,4,0.1), iter_max = 50,
# keep.upper = TRUE)
#
# ## display quality criteria according to sigma
# plotSigmaGR(resGR_sigma)
#
# ## display retained region
# multiplot(MRIaggr.Pat1_red, param = "TTP.th_t0", num = 3, numeric2logical = TRUE,
# index1 = list(coords = coords[resGR_sigma$list.GR$entropy,], outline = TRUE))
#
# multiplot(MRIaggr.Pat1_red, param = "TTP.th_t0", num = 3, numeric2logical = TRUE,
# index1 = list(coords = coords[resGR_sigma$list.GR$Kalinsky,], outline = TRUE))
#
# ## find optimal sigma
# resGR_sigma <- calcSigmaGR(contrast = carto$TTP.th_t0, W = W, seed = seed,
# sigma = seq(1,4,0.1), iter_max = 50,
# keep.upper = TRUE, keep.lower = TRUE)
#
# ## display quality criteria according to sigma
# plotSigmaGR(resGR_sigma)
#
# ## display retained region
# multiplot(MRIaggr.Pat1_red, param = "TTP.th_t0", num = 3, numeric2logical = TRUE,
# index1 = list(coords = coords[resGR_sigma$list.GR$entropy,], outline = TRUE))
#
# multiplot(MRIaggr.Pat1_red, param = "TTP.th_t0", num = 3, numeric2logical = TRUE,
# index1 = list(coords = coords[resGR_sigma$list.GR$Kalinsky,], outline = TRUE))
# ## End(Not run)
Run the code above in your browser using DataLab