## Not run:
# ## generate MRIaggr objects
# data("MRIaggr.Pat1_red", package = "MRIaggr")
#
# path.Pat2 <- system.file("anlz", package = "oro.nifti")
# analyse.avg <- readMRI(file.path(path.Pat2, "avg152T1"), format = "analyze")
# # analyse.avg@descrip
# MRIaggr.Pat2 <- constMRIaggr(analyse.avg, param = "T1_t0", identifier = "Pat2")
#
# path.Pat3 <- system.file("nifti", package = "oro.nifti")
# nifti.ffd <- readMRI(file.path(path.Pat3, "filtered_func_data"), format = "nifti")
# # nifti.ffd@descrip
# MRIaggr.Pat3 <- constMRIaggr(lapply(1:5, function(x){nifti.ffd[,,,x, drop = FALSE]}),
# param=paste("T2_GRE_t", 0:4, sep = ""),identifier = "Pat3")
#
# ## create directories
# path <- "."
# dir.create(file.path(path, "Display"))
# dir.create(file.path(path, "Display/T1_t0"))
# dir.create(file.path(path, "Display/T2_GRE_t0"))
# dir.create(file.path(path, "Display/MASK_DWI_t0"))
#
# ## export images
# multiplot(MRIaggr.Pat1_red, param = "T1_t0",
# mfrow = c(2,4), axes = FALSE, mar = c(0,0,1.5,0),
# window = "png", path = "Display/T1_t0/")
# multiplot(MRIaggr.Pat2, param = "T1_t0",
# mfrow = c(3,6), axes = FALSE, mar = c(0,0,1.5,0), legend = FALSE,
# window = "png", path = "Display/T1_t0/")
#
# multiplot(MRIaggr.Pat1_red, param = "T2_GRE_t0",
# mfrow = c(2,4), axes = FALSE, mar = c(0,0,1.5,0),
# window = "png", path = "Display/T2_GRE_t0/")
# multiplot(MRIaggr.Pat3, param = "T2_GRE_t0",
# mfrow = c(2,4), axes = FALSE, mar = c(0,0,1.5,0),
# window = "png", path = "Display/T2_GRE_t0/")
#
# multiplot(MRIaggr.Pat1_red, param = "MASK_DWI_t0",
# mfrow = c(2,4), axes = FALSE, mar = c(0,0,1.5,0),
# window = "png", path = "Display/MASK_DWI_t0/")
#
# ## create latex file (default)
# res <- constLatex(directory = "Display/", filename = "sweaveDisplay")
#
# ## create latex file (personalized)
# res <- constLatex(directory = "Display/", filename = "sweaveDisplay",
# param = c("T1_t0","T2_GRE_t0","MASK_DWI_t0"),
# tabular = list(data.frame(cbind(Id = c("Pat1","Pat2","Pat3"),
# Age = c(28,54,32),
# Gender = c("Male","Female","Male")))
# ),
# label = c("T1 sequence","T2 gradient echo sequence","lesion mask"),
# extra_text = list("Patient 1 suffers from stroke diseases ...",
# "Patient 2 has ...",
# "Patient 3 has ...")
# )
# ## End(Not run)
Run the code above in your browser using DataLab