Learn R Programming

oro.dicom (version 0.2.5)

Create: Create Arrays from DICOM Headers/Images

Description

A DICOM list structure is used to produce a multi-dimensional array representing a single acquisition of medical imaging data.

Usage

create3D(dcm, mode = "double", transpose = TRUE, pixelData = TRUE, ...)
create4D(dcm, W, mode = "double", transpose = TRUE, pixelData = TRUE,
         mosaic = FALSE, ...)

Arguments

dcm
is the DICOM list structure (if pixelData = TRUE) or the DICOM header information (if pixelData = FALSE).
mode
is a valid character string for storage.mode.
transpose
is necessary to switch the definition of rows and columns from DICOM to R.
pixelData
is a logical variable (default = TRUE) that is associated with the DICOM image data being pre-loaded.
W
is the fourth dimension of the array.
mosaic
is a logical variable (default = FALSE) to denote storage of the data in Siemens Mosaic format.
...
...

Value

  • Multi-dimensional array of medical imaging data.

References

Digital Imaging and Communications in Medicine (DICOM) http://medical.nema.org

See Also

array, dicomInfo, storage.mode

Examples

Run this code
## pixelData = TRUE
## The DICOM image data are read from dicomSeparate()
dcmList <- dicomSeparate(system.file("hk-40", package="oro.dicom"))
sliceLocation <- NULL
dcmImage <- create3D(dcmList, mode="integer")
graphics::image(dcmImage[,,1], col=grey(0:64/64), axes=FALSE,
                xlab="", ylab="")
dSL <- abs(diff(sliceLocation))
plot(dSL, ylim=range(range(dSL) * 1.5, 0, 10), xlab="Index", ylab="mm",
     main="Difference in Slice Location")

## pixelData = FALSE
## The DICOM image data are read from create3D()
## This may save on memory for large batches of DICOM data
dcmList <- dicomSeparate(system.file("hk-40", package="oro.dicom"),
                         pixelData=FALSE)
dcmImage <- create3D(dcmList, mode="integer", pixelData=FALSE)
graphics::image(dcmImage[,,1], col=grey(0:64/64), axes=FALSE,
                xlab="", ylab="")

Run the code above in your browser using DataLab