load.patient.from.dicom {espadon} | R Documentation |
Loading patient data from DICOM files
Description
The load.patient.from.dicom
function is used to load or
pre-load in memory all patient objects from DICOM files.
Usage
load.patient.from.dicom(
dcm.files,
data = FALSE,
dvh = FALSE,
ignore.duplicates = FALSE,
tag.dictionary = dicom.tag.dictionary(),
verbose = TRUE
)
Arguments
dcm.files |
String vector, representing the list of the full names of the DICOM files of the same patient, or its directories. |
data |
Boolean. If |
dvh |
Boolean. if |
ignore.duplicates |
Boolean. If |
tag.dictionary |
Dataframe, by default equal to dicom.tag.dictionary, whose structure it must keep. This dataframe is used to parse DICOM files. |
verbose |
Boolean. If |
Value
Returns an espadon object of class "patient", describing the
information from dcm.files
. See espadon.class for a
description of the "patient" class.
See Also
dicom.to.Rdcm.converter, load.patient.from.Rdcm, load.obj.data, load.obj.from.dicom, load.obj.from.Rdcm and load.T.MAT.
Examples
# 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)