extractHeader: Extract Single Field from DICOM Headers

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/header.R

Description

A particular DICOM field is extracted for a collection of DICOM headers.

Usage

1
2
extractHeader(hdrs, string, numeric = TRUE, names = FALSE,
              inSequence = TRUE)

Arguments

hdrs

List object of DICOM headers.

string

DICOM field name.

numeric

Logical; values are converted to numbers when TRUE.

names

Logical; file names are kept with elements of the vector.

inSequence

Logical; whether or not to look into SequenceItem elements.

Details

The DICOM field is extracted from each DICOM header and placed into a vector.

Value

Vector of values from the requested DICOM field.

Author(s)

Brandon Whitcher bjw34032@users.sourceforge.net

References

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

See Also

readDICOM

Examples

1
2
3
4
x <- readDICOMFile(system.file("dcm/Abdo.dcm", package="oro.dicom"))
(seriesDescription <- extractHeader(x$hdr, "SeriesDescription",
                                    numeric=FALSE))
(IOP <- extractHeader(x$hdr, "ImageOrientationPatient", numeric=FALSE))

Example output

oro.dicom 0.5.3
[1] "Liver SpleeT2W UTSE RC$ COR    TSE   2000      100    90"
[1] "1.000000 0.000000 0.000000 0.000000 0.000000 -1.000000"

oro.dicom documentation built on May 2, 2019, 6:07 p.m.