load.patient.from.Rdcm {espadon}R Documentation

Loading patient data from *.Rdcm files


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)



Full paths of the directories of a single patient.


Boolean. If data = TRUE, the voxels value of the "volume" class objects, or the coordinates of the RoI (region of interest) of the struct class objects, are loaded into memory.


Boolean. if dvh = TRUE and if they exist, patient DVH are loaded, for convenience. They are not used as is in espadon package.


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.


# 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

# 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)

[Package espadon version 1.2.0 Index]