Learn R Programming

MRIaggr (version 1.1.5)

optionsMRIaggr: Set or Query Default Values for MRIaggr

Description

optionsMRIaggr works in the same way as options : it can be used to set or query the default values used by the functions of the MRIaggr package.

Usage

optionsMRIaggr(..., reinit.options = FALSE)

Arguments

...
arguments in tag = value form, or a list of tagged values. character or list.
reinit.options
should the default values be reinitialized. logical

Value

  • If not argument is provided, a list containing all the graphical parameters is returned. If one argument is provided with no value, the value of the corresponding graphical parameter. If several arguments are provided, a list containing the corresponding graphical parameters is returned. If one argument is provided with a value, nothing is returned.

optionsMRIaggr elements

The individual optionsMRIaggr elements are: ll{ asp the aspect ratio y/x. numeric. axes should the axes be plotted ? logical. bg the color used for the background. character. breaks the break points or the number of breakpoints to use to generate the color intervals . numeric vector or postive integer. Active in multiplot only if argument col is NULL. cex the expansion factor used to plot the observations. positive numeric. cex.index the expansion factor used to plot each additionnal points to display. integer vector of size 3. cex.legend the expansion factor of the legend. positive numeric. cex.main the expansion factor for the main title. numeric. checkArguments should the validity of thes argments be checked ? logical. col.index the color used to plot each additionnal points to display. integer vector of size 3. col.midplane the color used to display the midsagittal plan. character. col.NA the color to use to plot the NAs. character. digit.legend the number of decimal places to use when displaying graphics. integer. digit.result the number of decimal places to use when displaying results. integer. digit.epsilon the number of decimal places to use when displaying convergence criteria. integer. digit.percentage the number of decimal places to use when displaying percentage. integer. filter.index the filter used to define the edge of a spatial group. Any of "2D_N4", "2D_N8", "3D_N4", "3D_N6", "3D_N8", "3D_N10", "3D_N18", "3D_N26". height the height of the device used to export the plot. postive numeric. hemisphere the hemisphere to display. character. legend how should the legend be displayed ? logical, NULL or "only". main an overall title for the plot. character. main.legend a main title for the legend. character. mar the number of margin lines to be specified on the four sides of the plot. positive numeric vector of size 4. mar.legend the number of margin lines to be specified on the four sides of the legend. numeric vector of size 4. mfrow the division of the device in plot region. numeric vector of size 2 or NULL leading automatic adjustment. mgp the margin line for the axis title, axis labels and axis line. positive numeric vector of size 3. norm_mu the type of centering to apply on the parameter values. character. norm_sigma the type of scaling to apply on the parameter values. character. num.main should the slice number be written over each plot. logical. numeric2logical if a parameter is specified for the index arguments, should it be converted to logical ? logical. outline.index should all the additionnal points be displayed or only those on the boundary. logical. palette the colors or the palette to use when associating colors to observation intensities. character vector or character. Active in multiplot only if argument col is NULL. path the directory where the plot file will be created. character. If path is set to NULL, the image file is exported in the current working directory. pch.index the label used to plot each additionnal points to display. integer vector of size 3. pch.NA the label to use to plot the NAs. postive integer. pty the type of plot region to be used. Can be "s" or "m". quantiles.legend should the quantiles of the data be displayed on the legend ? logical. res the nominal resolution in ppi which will be recorded in the bitmap file. positive integer. slice_var the type of view to use. "i" for sagittal view, "j" for coronal view and "k" for transverse view. character. type.breaks should the break points be equally space according the range of data values ("range"), centered ("range_center") or correspond to the quantile values ("quantile") ? unit the units in which height and width are given. Can be any of "px", "in", "cm" or "mm".. verbose should the execution of the methods related to MRIaggr objects be traced ? logical. xlab a title for the x axis. character. ylab a title for the y axis. character. width the width of the device used to export the plot. postive numeric. window the type of device on which the plot will be displayed. logical, NULL or character. }

Details

ARGUMENTS: palette must have be a charater vector of length length(breaks)-1 containing colors or a single character corresponding to a palette name : "rainbow", "grey.colors", "heat.colors", "terrain.colors", "topo.colors" or "cm.colors". Possible values for legend are:
  • TRUE: the legend is displayed in the current device.
  • NULL: the legend is displayed it in a new device.
  • FALSE: the legend is not displayed.
  • "only": the legend is displayed but not the slices.
Possible values for windows are:
  • NULL: the plot is displayed on the current device with no reshape.
  • FALSE: the plot is displayed on the current device with the appropriate reshape.
  • TRUE: a new graphical device is open.
  • "eps": the plot is displayed in an image file usingpostscript.
  • "svg": the plot is displayed in an image file usingsvg.
  • "png": the plot is displayed in an image file usingpng.
  • "pdf": the plot is displayed in an image file usingpdf.
Arguments filename, width, height, path, unit and res correspond to those of postscript, svg and png. Arguments mfrow, mar, mar.legend, mgp pty, asp and bg acorrespond to those of par. See the details section of selectContrast for more details about the hemisphere, norm_mu and norm_mu arguments. See the initNeighborhood function for details about filter.index possible values. ARGUMENTS: The MRIaggr environment store an object called .ls_optionsMRIaggr that contains the list of default values. This object can be modified using the optionsMRIaggr function. The original default values can be restored using optionsMRIaggr(reinit.options=TRUE).

concept

plot.

Examples

Run this code
## load a MRIaggr object
data(MRIaggr.Pat1_red, package = "MRIaggr")

# display 3 slices 
multiplot(MRIaggr.Pat1_red, param = "DWI_t0",              
          num = 1:3, axes = FALSE, bg = "white", legend = FALSE)

##
# arguments :
# axes = FALSE, bg = "white", legend = FALSE 
# can become the default argument of multiplot using :
##

optionsMRIaggr(axes = FALSE, bg = "white", legend = FALSE)

multiplot(MRIaggr.Pat1_red, param = "DWI_t0")

# now axes can be restored using either
multiplot(MRIaggr.Pat1_red, param = "DWI_t0", axes = TRUE)
# or
optionsMRIaggr(axes = TRUE)
multiplot(MRIaggr.Pat1_red, param = "DWI_t0")

## to get default arguments of multiplot
optionsMRIaggr()
optionsMRIaggr()$bg
optionsMRIaggr("bg")

## to restore the original defaut values
optionsMRIaggr(reinit.options = TRUE)

Run the code above in your browser using DataLab