Learn R Programming

espadon (version 1.11.3)

mesh.in.new.ref: Change of frame of reference of a mesh

Description

The mesh.in.new.ref function allows you to change the frame of reference of a mesh.

Usage

mesh.in.new.ref(
  mesh,
  new.ref.pseudo,
  T.MAT = NULL,
  alias = "",
  description = NULL
)

Value

Returns "mesh" class object in the new frame of reference new.ref.pseudo.

Arguments

mesh

"volume" class object.

new.ref.pseudo

pseudonym of the frame of reference in which the mesh should be located. This new.ref.pseudo must exist in the T.MAT list.

T.MAT

"t.mat" class object, created by load.patient.from.Rdcm, load.patient.from.dicom, load.T.MAT or ref.add.

alias

Character string, $alias of the created object.

description

Character string, describing the created object. If description = NULL (default value), it will be that of the mesh.

Examples

Run this code
# loading of toy-patient objects (decrease dxyz for better result)
step <- 4
patient <- toy.load.patient (modality = c("ct", "rtstruct", "mr"), 
                             roi.name = "", dxyz = rep (step, 3))
CT <- patient$ct[[1]]
S <- patient$rtstruct[[1]]

#creation of the patient mesh
bin <- bin.from.roi (CT, struct = S, roi.name = "patient", verbose = FALSE)
mesh.patient <- mesh.from.bin (bin, alias = "patient", verbose = FALSE)

# mesh in the MR frame of reference
new.mesh <- mesh.in.new.ref (mesh.patient, patient$mr[[1]]$ref.pseudo, 
                             T.MAT = patient$T.MAT)

str (new.mesh, max.level = 2)                             

Run the code above in your browser using DataLab