Description Usage Arguments Details Value Examples
Tool for graphical definition of a spatial region on an image.
1 2 3 4 5 6 7 8 | ## S4 method for signature 'MRIaggr'
outlineMRIaggr(object, param, index1 = NULL, num = NULL, hemisphere = "both",
numeric2logical = FALSE, xlim = NULL, ylim = NULL, legend = FALSE,
palette = "terrain.colors", col = NULL, breaks = 25, fill = TRUE, n = 50,
sequential = TRUE, min_dist = 1, operator_index1 = "none",
col.outline = c("blue","red","grey"), pch = 20, cex = c(0.75,1,0.75),
name_newparam = "userMask",
verbose = optionsMRIaggr("verbose"), update.object = FALSE, overwrite = FALSE)
|
object |
an object of class |
param |
the contrast parameter map on which the outline will be drawn. character. REQUIRED. |
index1 |
the coordinates of additionnal points to display. data.frame or list or |
num |
the slices on which the outline will be drawn. numeric vector or |
hemisphere |
the hemisphere to consider. character. |
numeric2logical |
if a parameter is specified for the index argument, should it be converted to logical ? logical. |
xlim |
the y limits of the plot. numeric vector of size 2 or |
ylim |
the y limits of the plot. numeric vector of size 2 or |
legend |
how should the legend be displayed ? logical or |
palette |
the colors or the palette to use when associating colors to observation intensities. character vector or character. |
col |
the color to use to plot the observations. character vector or |
breaks |
the break points or the number of breakpoints to use to generate the color intervals . numeric vector or postive integer. |
fill |
should the spatial region be filled ? Otherwise only the edge is used. logical. |
n |
maximum number of points to define the outline. integer. |
sequential |
should the region edge be updated on the graphical device after each point ? logical. |
min_dist |
if the distance between the new point and the initial point is inferior to |
operator_index1 |
the operator to apply between the index1 observations and the outlined observations. Can be |
col.outline |
the colors in which the user-defined edge points, the interpolated edge points and the interior points should be ploted. character vector[3]. |
pch |
the symbol with which the observations will be displayed. positive integer. |
cex |
the expansion factor used to plot the edge points, the interpolated edge points and the interior points. positive numeric vector of size 3. |
verbose |
should the execution of the function be traced ? logical. |
name_newparam |
the name of the new parameter. character. |
update.object |
should the new parameter be stored in |
overwrite |
if a contrast parameter with the same names is already stored in |
ARGUMENTS:
Information about the num
argument can be found in the details section of initNum
.
Information about the index1
argument can be found in the details section of initIndex
(argument index
).
Information about the hemisphere
argument can be found in the details section of selectContrast
.
Information about the palette
and legend
arguments can be found in the details section of initCol
.
FUNCTION:
This function uses the locator
function to obtain the coordinates of the cursor. See outline
for more details.
It will display slice by slice the parameter map and on each slice a region should be drawn.
Press Echap and 1 to restart the draw on the same slice.
Press Echap and 0 to skip a slice.
A matrix containing in columns :
[,c("i","j","k")]
: the coordinates of the observations.
[,"index"]
: the index of the observation in object
.
[,"edge"]
: whether each observation is on an edge.
[,"surface"]
: whether each observation is in the interior.
[,"userMask"]
: whether each observation belong to index1
(if no not defined, always FALSE
).
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 28 29 30 31 32 33 34 35 36 37 38 39 40 | ## Not run:
## load a MRIaggr object
data("MRIaggr.Pat1_red", package = "MRIaggr")
## outline the area of interest
res <- outlineMRIaggr(MRIaggr.Pat1_red, param = "DWI_t0",
num = 1:3, sequential = TRUE, overwrite = TRUE, update.object = TRUE)
multiplot(MRIaggr.Pat1_red, param = "userMask",
num = 1:3)
## outline an edge of interest
res <- outlineMRIaggr(MRIaggr.Pat1_red, param = "DWI_t0", index1 = "MASK_DWI_t0",
fill = FALSE, num = 1:3, sequential = TRUE, overwrite = TRUE, update.object = TRUE)
multiplot(MRIaggr.Pat1_red, param = "userMask", num = 1:3)
## define an new area as the union of the outlined area and the initial lesion mask
res <- outlineMRIaggr(MRIaggr.Pat1_red, param = "DWI_t0", index1 = "MASK_DWI_t0",
operator_index1 = "union", num = 3, sequential = TRUE,
overwrite = TRUE, update.object = TRUE)
multiplot(MRIaggr.Pat1_red, param = "userMask", num = 3)
## define an new area as the intersection of the outlined area and the initial lesion mask
res <- outlineMRIaggr(MRIaggr.Pat1_red, param = "DWI_t0", index1 = "MASK_DWI_t0",
operator_index1 = "intersection", num = 3, sequential = TRUE,
overwrite = TRUE, update.object = TRUE)
multiplot(MRIaggr.Pat1_red, param = "userMask", num = 3)
## define an new area as the difference between the outlined area and the initial lesion mask
res <- outlineMRIaggr(MRIaggr.Pat1_red, param = "DWI_t0", index1 = "MASK_DWI_t0",
operator_index1 = "difference", num = 3, sequential = TRUE,
overwrite = TRUE, update.object = TRUE)
multiplot(MRIaggr.Pat1_red, param = "userMask", num=3)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.