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,
  upgrade.to.latest.version = FALSE,
  ignore.duplicates = FALSE
)

Arguments

dirname

Full paths of the directories of a single patient, or vector of full.path of Rdcm.files.

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.

upgrade.to.latest.version

Boolean. If TRUE, the function attempts to upgrade to the latest version, parsing the DICOM data. It may take longer to load the data. Consider using theRdcm.upgrade function.

ignore.duplicates

Boolean. If TRUE, the function ignores duplicated objects.

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.6.0 Index]