add.shape | R Documentation |
The add.shape
function adds the shape defined by espadon volume
object of the modality "binary" or "weight" to a 3D volume.
add.shape(obj, shape.bin, shape.mean, shape.sd)
obj |
Object of the "volume" class and a modality other than "binary" or "weight". |
shape.bin |
Object of the "volume" class and "binary" or "weight" modality,
sharing the same voxels as |
shape.mean , shape.sd |
Positive numbers, representing the mean value and
the standard deviation of voxels identified by |
Returns the ‘volume’ class object obj
, in which the voxels
identified by shape.bin
have been replaced by a linear interpolation
between the initial value and new values. These new values follow a normal
distribution with mean shape.mean
and standard deviation shape.sd
.
The weights of the linear interpolation are defined by the voxels values of shape.bin
.
bin.cuboid, bin.cylinder, bin.ellipsoid, bin.from.roi.
# Creation of a volume
CT <- vol.create (c(80, 80,40), c(1.2, 1.2, 2),
pt000 = c(-50.4,-50.4,-75), modality = "ct",
default.value = as.integer(-997), value.sd = 1)
# Creation of a new shape shape
ellipsoid <- bin.ellipsoid(CT, center = c(-20.1, 0.1, -15),
radius = c(19.3, 20.2, 15.3))
# Incorporating form into the CT
CT <- add.shape (CT, shape.bin = ellipsoid, shape.mean = 100, shape.sd = 10)
plot(CT, view.coord = c(-20.1, 0.1, -15))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.