load.Rdcm.raw.data {espadon}R Documentation

Loading a *.Rdcm file

Description

the load.Rdcm.raw.data function loads the content of a *.Rdcm file.

Usage

load.Rdcm.raw.data(
  Rdcm.filename,
  address = TRUE,
  data = TRUE,
  upgrade.to.latest.version = FALSE
)

Arguments

Rdcm.filename

Character string, representing the full name of a *.Rdcm file created by dicom.to.Rdcm.converter.

address

Boolean. If TRUE, a dataframe with the address of the tags in the raw DICOM data is returned.

data

Boolean. If TRUE, the DICOM information are returned as an R list.

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 the Rdcm.upgrade function.

Value

Returns a list containing the information, converted by espadon, of a DICOM object..

See Also

dicom.to.Rdcm.converter, load.obj.from.Rdcm.

Examples

# For testing, save first toy.dicom.raw () raw data to a temporary file, and
# convert it in Rdcm fie
pat.src.dir <- file.path (tempdir(), "PM_dcm") 
dir.create (pat.src.dir, recursive = TRUE) 
dcm.filename <- tempfile (pattern = "PM_rtplan", tmpdir = pat.src.dir,
                          fileext = ".dcm")
zz <- file (dcm.filename, "wb")
writeBin (toy.dicom.raw (), zz, size = 1)
close (zz)
pat.dir <- file.path (tempdir(), "PM_Rdcm")
dicom.to.Rdcm.converter (pat.src.dir, pat.dir, update = TRUE)
lf <- list.files (pat.dir, pattern = "[.]Rdcm$", full.names = TRUE)
lf

# Inspect Rdcm raw data
L <- load.Rdcm.raw.data (lf[1])
str (L, max.level =3)

[Package espadon version 1.7.0 Index]