View source: R/load_patient_from_Rdcm.R
| load.patient.from.Rdcm | R Documentation |
The load.patient.from.Rdcm function is used to load or
pre-load in memory all patient objects converted in *.Rdcm files.
load.patient.from.Rdcm(
dirname,
data = FALSE,
dvh = FALSE,
upgrade.to.latest.version = FALSE,
ignore.duplicates = FALSE
)
dirname |
Full paths of the directories of a single patient, or vector of full.path of Rdcm.files. |
data |
Boolean. If |
dvh |
Boolean. if |
upgrade.to.latest.version |
Boolean. If |
ignore.duplicates |
Boolean. If |
Returns an espadon object of class "patient", describing the
information contained in dirname. See espadon.class for a
description of the "patient" class.
dicom.to.Rdcm.converter, load.patient.from.dicom, load.obj.data, load.obj.from.dicom, load.obj.from.Rdcm and load.T.MAT.
# First, save toy patient objects to a temporary file pat.dir for testing.
pat.dir <- file.path(tempdir(), "PM_Rdcm")
dir.create(pat.dir, recursive = TRUE)
patient <- toy.load.patient(modality = c("ct", "mr"), roi.name = "",
dxyz = c(4, 4, 4))
save.to.Rdcm(patient$ct[[1]], dirname = pat.dir)
save.to.Rdcm(patient$mr[[1]], dirname = pat.dir)
save.T.MAT(patient$T.MAT, dirname = pat.dir)
# Rdcm files in pat.dir
list.files(pat.dir)
# loading patient from Rdcm files with data:
new.patient <- load.patient.from.Rdcm(pat.dir, data = TRUE)
str(new.patient, max.level = 2 )
# Cleaning temporary directory
unlink(pat.dir, recursive = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.