display.plane {espadon} | R Documentation |
Display the transverse frontal or sagittal view in the patient reference system
Description
The display.plane
function displays an overlay of images and RoI
closed planar contours on a plane defined by the equations x = constant (sagittal
view), or y = constant (frontal view) or z = constant (transverse view) in a
frame of reference chosen by the user.
Usage
display.plane(
bottom = NULL,
top = NULL,
struct = NULL,
roi.name = NULL,
roi.sname = NULL,
roi.idx = NULL,
struct.dxyz = c(0.5, 0.5, struct$thickness),
display.ref = NULL,
T.MAT = NULL,
interpolate = TRUE,
view.type = c("trans", "front", "sagi"),
view.coord = 0,
bg = "#000000",
abs.rng = NULL,
ord.rng = NULL,
bottom.col = grey.colors(255, start = 0, end = 1),
top.col = pal.rainbow(255),
bottom.breaks = NULL,
top.breaks = NULL,
sat.transp = FALSE,
struct.lwd = 2,
main = NULL,
legend.plot = TRUE,
legend.shift = 0,
legend.roi.pseudo = TRUE,
...
)
Arguments
bottom |
"volume" class object, displayed using |
top |
"volume" class object, displayed as an overlay, using |
struct |
"struct" class object. If |
roi.name |
Vector of exact names of the RoI in the |
roi.sname |
Vector of names or parts of names of the RoI in the |
roi.idx |
Vector of indices of the RoI that belong to the |
struct.dxyz |
3D vector. Used in case of |
display.ref |
Character string. Pseudonym of the frame of reference used
for display. If |
T.MAT |
"t.mat" class object, created by load.patient.from.Rdcm
or load.T.MAT. If |
interpolate |
Boolean, indicating whether to apply linear interpolation,
when calculating the bottom and top cuts,and then when displaying them.
If |
view.type |
Character string, defining the view to display. It must be set to
|
view.coord |
Numeric vector of the coordinates along the normal vector of the selected view. |
bg |
Background color of the image. By default, this color is black. |
abs.rng |
Vector of 2 elements indicating the minimum and maximum abscissa to display on the background image. |
ord.rng |
Vector of 2 elements indicating the minimum and maximum ordinate to display on the background image. |
bottom.col , top.col |
Vectors, representing the palette color of
|
bottom.breaks , top.breaks |
One of :
When breaks are specified, the number of breaks must be one unit more then the number of colors. |
sat.transp |
Boolean. If |
struct.lwd |
Line thickness of the RoI contours. |
main |
Character string. When |
legend.plot |
Boolean, that indicates whether the RoI legend should be displayed on the image. It is displayed by default. |
legend.shift |
Numeric. It shifts (in mm) the display of the RoI legend on x-axis. |
legend.roi.pseudo |
Boolean. If |
... |
others parameters of plot function |
Details
If roi.name
, roi.sname
, and roi.idx
are
all set to NULL
, all closed planar or point RoI are selected.
If a RoI is not present in the requested plane, the RoI legend won't mention it.
Value
Returns a display of the transverse, sagittal or frontal plane. This plane has the coordinate z = view.coord (transverse), y = view.coord (sagittal) pr x = view.coord (frontal). The display is an overlay of:
a background image of uniform color
bg
the bottom image if it exists
the top image if it exists
the contours of the regions of interest if they exist in the plane considered.
Note
1- The main title is given by bottom
, the
subtitle by top
.
2- When top
is in the "rtdose" modality, the maximum dose is
written on the image.
See Also
display.kplane, plot.volume, plot.struct, plot.mesh.
Examples
# loading of toy-patient objects (decrease dxyz and increase beam.nb for
# better result)
step <- 4
patient <- toy.load.patient (modality = c("ct", "mr", "rtstruct", "rtdose"),
roi.name = "",
dxyz = rep (step, 3), beam.nb = 3)
CT <- patient$ct[[1]]
MR <- patient$mr[[1]]
D <- patient$rtdose[[1]]
S <- patient$rtstruct[[1]]
display.plane (bottom = CT, top = D, struct = S, view.coord = -30,
interpolate = FALSE, legend.shift = -80)
# Display of CT in reference frame "ref1" and MR in "ref2"
display.plane (bottom = CT, top = MR, interpolate = FALSE)
# Display of CT and MR in reference frame "ref2"
display.plane (bottom = CT, top = MR, interpolate = FALSE, display.ref ="ref2",
T.MAT = patient$T.MAT)