Learn R Programming

espadon (version 1.11.3)

load.obj.data: Load data of an espadon class object

Description

The load.obj.data function loads all the data of an espadon object of class 'struct' or 'volume'.

Usage

load.obj.data(obj, tag.dictionary = dicom.tag.dictionary())

Value

Returns the espadon object with data $vol3D.data or $roi.data

Arguments

obj

struct or "volume" class object

tag.dictionary

Dataframe, by default equal to dicom.tag.dictionary, whose structure it must keep. This dataframe is used to parse DICOM files in case obj was extracted from DICOM files.

See Also

load.obj.from.dicom and load.obj.from.Rdcm

Examples

Run this code
# 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)
rm( patient)


patient <- load.patient.from.Rdcm (pat.dir, data = FALSE)
CT <- load.obj.data (patient$ct[[1]])
str (CT, max.level = 2)
# Cleaning  temporary directory
unlink (pat.dir, recursive = TRUE)

Run the code above in your browser using DataLab