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)

Arguments

dirname

Full paths of the directories of a single patient.

data

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.

dvh

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

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)

[Package espadon version 1.2.0 Index]