dicom.raw.data.loader | R Documentation |
the dicom.raw.data.loader
function loads a DICOM file as
raw data.
dicom.raw.data.loader(dcm.filename)
dcm.filename |
Character string, representing the full name of a DICOM file. |
Returns a vector of raw data from dcm.filename
.
dicom.browser, dicom.tag.parser
# First, save toy.dicom.raw () raw data to a temporary file for testing.
pat.src.dir <- file.path (tempdir(), "toy_dcm")
dir.create (pat.src.dir, recursive = TRUE)
dcm.filename <- tempfile (pattern = "toyrtplan", tmpdir = pat.src.dir,
fileext = ".dcm")
zz <- file (dcm.filename, "wb")
writeBin (toy.dicom.raw (), zz, size = 1)
close (zz)
# loading of file
dicom.raw.data <- dicom.raw.data.loader (dcm.filename)
# checks if it is consistent with the original raw data
all ( dicom.raw.data == toy.dicom.raw () )
# Cleaning temporary directory
unlink (pat.src.dir, recursive = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.