# loading of toy-patient objects (decrease dxyz for better result)
step <- 5
patient <- toy.load.patient (modality = "ct", roi.name = "",
dxyz = rep (step, 3))
CT <- patient$ct[[1]]
# Calculation of the new CT restricted to the parallelepiped reduced by 10 mm.
pt.CT <- get.extreme.pt (CT) # extreme points of CT
new.pt.CT <- pt.CT + matrix (rep (c (+ 12, -12), 3), ncol = 2, byrow = TRUE)
new.CT <- nesting.cube (CT, new.pt.CT$min, new.pt.CT$max, alias = "new CT")
if (FALSE) {
# check for change
display.3D.stack (CT)
display.3D.stack (new.CT, line.col="red")
}
Run the code above in your browser using DataLab