load.patient.from.Rdcm {espadon} | R Documentation |
Loading patient data from *.Rdcm files
Description
The load.patient.from.Rdcm
function is used to load or
pre-load in memory all patient objects converted in *.Rdcm files.
Usage
load.patient.from.Rdcm(
dirname,
data = FALSE,
dvh = FALSE,
upgrade.to.latest.version = FALSE,
ignore.duplicates = FALSE
)
Arguments
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 |
Value
Returns an espadon object of class "patient", describing the
information contained in dirname
. See espadon.class for a
description of the "patient" class.
See Also
dicom.to.Rdcm.converter, load.patient.from.dicom, load.obj.data, load.obj.from.dicom, load.obj.from.Rdcm and load.T.MAT.
Examples
# 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)