save.to.Rdcm {espadon} | R Documentation |
Save a espadon object in a pre-formatted *.Rdcm file
Description
The function save.to.Rdcm
allows you to save an object
created by espadon in a pre-formatted *.Rdcm file. This object will also be
accessible by the load.patient.from.Rdcm
function.
Usage
save.to.Rdcm(obj, object.name = obj$object.alias, dirname = obj$file.dirname)
Arguments
obj |
espadon object of class |
object.name |
Character string, representing the name of the object,
default to |
dirname |
Directory where new files from |
Value
Returns TRUE
, if paste0(object.name,".Rdcm")
exists in
dirname
.
Returns FALSE
, if object.name
is not a valid file name,
or if the file that is created would replace a *.Rdcm file created by
dicom.to.Rdcm.converter.
Note
save.to.Rdcm
can not replace an *.Rdcm file created by
dicom.to.Rdcm.converter.
Examples
# loading of toy-patient objects (decrease dxyz for better result)
step <- 5
patient <- toy.load.patient (modality = c("ct", "mr"), roi.name = "",
dxyz = rep (step, 3))
# Save T.MAT to a temporary file pat.dir
pat.dir <- file.path (tempdir(), "PM_Rdcm")
dir.create (pat.dir, recursive = TRUE)
save.to.Rdcm (patient$ct[[1]], dirname = pat.dir)
save.to.Rdcm (patient$mr[[1]], dirname = pat.dir)
list.files(pat.dir)
# Cleaning temporary directory
unlink (pat.dir, recursive = TRUE)
[Package espadon version 1.7.2 Index]