# First, save toy.dicom.raw () raw data to a temporary file pat.dir for testing.
pat.dir <- file.path (tempdir(), "toy_dcm")
dir.create (pat.dir, recursive = TRUE)
dcm.filename <- tempfile (pattern = "toyrtplan", tmpdir = pat.dir,
fileext = ".dcm")
zz <- file (dcm.filename, "wb")
writeBin (toy.dicom.raw (), zz, size = 1)
close (zz)
# loading patient. Here the toy patient ha only a unique rt-plan object
patient <- load.patient.from.dicom (pat.dir, data = FALSE)
str (patient, max = 2)
# description of object
patient$description
# transfer matrices :
patient$T.MAT
# rt-plan object
str (patient$rtplan[[1]])
# Cleaning temporary directory
unlink (pat.dir, recursive = TRUE)
Run the code above in your browser using DataLab