# 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))
Run the code above in your browser using DataLab