ref.cutplane.add {espadon}R Documentation

Adding volume's cutting planes frame of reference in T.MAT

Description

The ref.cutplane.add function adds in T.MAT the transfer matrices from or to volume's cutting planes frame of reference.

Usage

ref.cutplane.add(
  vol,
  origin = vol$xyz0[1, ],
  ref.cutplane = paste0(vol$ref.pseudo, "m"),
  T.MAT = NULL
)

Arguments

vol

"volume" class object.

origin

Vector of the x, y, z coordinates of the origin point of the cut planes frame of reference.

ref.cutplane

Name of the volume's cutting planes frame of reference. By default ref.cutplane = paste0 (vol$ref.pseudo,".m").

T.MAT

"t.mat" class object created by load.patient.from.dicom, load.patient.from.Rdcm or load.T.MAT. If T.MAT = NULL, then only the link between vol$ref.pseudo and ref.name is established.

Value

Returns a "t.mat" class object, which contains the transfer matrices from or to volume's cutting planes frame of reference. If the T.MAT is NULL, then the returned object will contain only 4 matrices: "src.ref<-src.ref", "src.ref<-ref.cutplane", "ref.cutplane<-ref.cutplane", "ref.cutplane<-src.ref".

See Also

ref.add, ref.remove.

Examples

# loading of toy-patient objects
patient <- toy.load.patient (modality = "mr", roi.name = "", dxyz = c (4, 4, 4))
MR <- patient$mr[[1]]
MR$xyz.from.ijk

# creation of t.mat, containing the transfer matrix to the frame of reference 
# of the MR cutting planes
t.mat <- ref.cutplane.add (MR)

# Change of frame of reference
MR.m <- vol.in.new.ref (MR, paste0 (MR$ref.pseudo, "m"), t.mat)

MR.m$xyz.from.ijk

[Package espadon version 1.2.0 Index]