fan.planar | R Documentation |
The fan.planar
function creates a "fan" class object
containing, among others, the coordinates of the unit director vectors of
the rays of rectangular pyramid fan. Rays are passing through all pixels of a
plane, which represent the pyramid basis. It is for instance useful to compute
rt-image.
fan.planar(
vol,
k = vol$k.idx[ceiling(length(vol$k.idx)/2)],
origin = c(0, 0, 0),
alias = "",
description = "planar fan"
)
vol |
"volume" class object. |
k |
Positive number specifying the plane index that the rays of the fan must cross. By default, k is the central plane. |
origin |
Numeric vector, giving the xyz coordinates of the fan origin.
By default |
alias |
Character string, |
description |
Character string, describing the the created object. |
Returns a "fan" class object (see espadon.class for class definitions) containing, among others,
$xyz
: a matrix of 3 columns giving the xyz coordinates of the fan rays.
$local.coords
: a list of the ijkt DICOM coordinates of the crossed plane,
and the transfer matrix to xyz.from.ijk to compute xyz coordinates in $ref.pseudo
.
fan.sphere, fan.beam, fan.to.voxel
# loading of toy-patient objects (decrease dxyz and increase beam.nb for
# better result)
step <- 5
patient <- toy.load.patient (modality = c("ct"), dxyz = rep (step, 3))
fan <- fan.planar (patient$ct[[1]], origin = patient$ct[[1]]$xyz0[1,])
head (fan$xyz)
if (interactive()) {
rgl::open3d ()
points3d (fan$xyz)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.