load.obj.from.dicom {espadon} | R Documentation |
Loading an espadon object from DICOM files or folder
Description
Loading an espadon object from DICOM files or folder.
Usage
load.obj.from.dicom(
dcm.files,
data = TRUE,
ref.pseudo = "ref1",
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 DICOM object, or its directory. |
data |
Boolean. Only valid for objects usable by the espadon package,
namely ct, mr, rtdose, rtstruct, pt... If |
ref.pseudo |
String, |
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 "dvh","histo","histo2D","mesh", "rtplan","struct", "undef" or "volume" depending on the object modality. See espadon.class for class definitions.
See Also
load.obj.data and load.obj.from.Rdcm
Examples
# First, save toy.dicom.raw () raw data to a temporary file pat.dir for testing.
pat.dir <- file.path (tempdir(), "PM_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 of rt-plan object
RTplan <- load.obj.from.dicom (dcm.filename)
str (RTplan)
# Cleaning temporary directory
unlink (pat.dir, recursive = TRUE)