Learn R Programming

MRIaggr (version 1.1.5)

plotLesion3D: 3D plot of the lesion

Description

Make a 3D plot of the lesion. (experimental version)

Usage

"plotLesion3D"(object, mask, edge = FALSE, Neighborhood = "3D_N6", numeric2logical = FALSE, spatial_res = c(1,1,1), xlim = NULL, ylim = NULL, zlim = NULL, type.plot = "shapelist3d", px_max = 10000, radius = 1, type = "s", col = "red", col.edge = "black")

Arguments

object
an object of class MRIaggr. REQUIRED.
mask
the binary contrast parameter indicating the lesion. character. REQUIRED.
edge
should the edges of the lesion be ploted instead of the core ? logical.
Neighborhood
the type of neighbourhood used to defined the edges. character.
numeric2logical
should mask be convert to logical ? logical.
spatial_res
a dilatation factor for the coordinates. positive numeric vector of size 3.
xlim
the x limits of the plot. numeric vector of size 2 or NULL leading to automatic setting of the x limits.
ylim
the y limits of the plot. numeric vector of size 2 or NULL leading to automatic setting of the y limits.
zlim
the z limits of the plot. numeric vector of size 2 or NULL leading to automatic setting of the z limits.
type.plot
the type of plot to be displayed. Can be "plot3d" or "shapelist3d".
px_max
the maximum number of points that can be ploted. integer.
radius
the radius of spheres. numeric. See plot3d for more details.
type
the type of item to plot. character. See plot3d for more details.
col
the color of the core of the lesion. character.
col.edge
the color of the edge of the lesion. character.

Value

None.

Details

ARGUMENTS: the Neighborhood argument can be a matrix or an array defining directly the neighbourhood to use (i.e the weight of each neighbor) or a name indicating which type of neighbourhood should be used (see the details section of initNeighborhood).

FUNCTION: This functions uses the plot3d or shapelist3d and thus require the rgl package to work. This package is not automatically loaded by the MRIaggr package.

Examples

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

## Not run: 
# if(require(rgl)){
#   # global view
# plotLesion3D(MRIaggr.Pat1_red, mask = "MASK_T2_FLAIR_t2", spatial_res = c(1.875,1.875,6),
#      numeric2logical = TRUE)
# 
#   # by slice
# plotLesion3D(MRIaggr.Pat1_red, mask = "MASK_T2_FLAIR_t2", spatial_res = c(1.875,1.875,6),
#      type.plot = "plot3d",
#      numeric2logical = TRUE)
# }
# ## End(Not run)

Run the code above in your browser using DataLab