load.obj.from.dicom {espadon}R Documentation

Loading an espadon object from DICOM files or folder

Description

Loading an espadon object from DICOM files or folder.

Usage

load.obj.from.dicom(
  dcm.files,
  data = TRUE,
  ref.pseudo = "ref1",
  tag.dictionary = dicom.tag.dictionary(),
  verbose = TRUE
)

Arguments

dcm.files

String vector, representing the list of the full names of the DICOM files of the same DICOM object, or its directory.

data

Boolean. Only valid for objects usable by the espadon package, namely ct, mr, rtdose, rtstruct, pt... If data = TRUE, either the values of the voxels when modality is (ct, mr, rtdose, pt), or the coordinates of the RoI when modality is rtstruct, are loaded into memory.

ref.pseudo

String, $ref.pseudo (i.e. pseudonym of the frame of reference) to assign to the loaded object.

tag.dictionary

Dataframe, by default equal to dicom.tag.dictionary, whose structure it must keep. This dataframe is used to parse DICOM files.

verbose

Boolean. If TRUE, a progress bar indicates the progress of the conversion.

Value

Returns an espadon object of class "dvh","histo","histo2D","mesh", "rtplan","struct", "undef" or "volume" depending on the object modality. See espadon.class for class definitions.

See Also

load.obj.data and load.obj.from.Rdcm

Examples

# First, save toy.dicom.raw () raw data to a temporary file pat.dir for testing.
pat.dir <- file.path (tempdir(), "PM_dcm") 
dir.create (pat.dir, recursive = TRUE) 
dcm.filename <- tempfile (pattern = "toyrtplan", tmpdir = pat.dir,
                          fileext = ".dcm")
zz <- file (dcm.filename, "wb")
writeBin (toy.dicom.raw (), zz, size = 1)
close (zz)

# loading of rt-plan object
RTplan <- load.obj.from.dicom (dcm.filename)
str (RTplan)
# Cleaning  temporary directory
unlink (pat.dir, recursive = TRUE)

[Package espadon version 1.7.0 Index]