dicom.tag.parser {espadon}R Documentation

DICOM TAG parser

Description

the dicom.tag.parser function decodes the content between two DICOM raw data addresses.

Usage

dicom.tag.parser(start, stop, VR, endian, dicom.raw.data, try.parse = FALSE)

Arguments

start

Positive integer. Index of the first raw data to parse in the dicom.raw.data.

stop

Positive integer. Index of the last raw data to parse in the dicom.raw.data.

VR

Character string, representing the value representation of DICOM data. See DICOM standard.

endian

Character string, equal to "little" or "big".

dicom.raw.data

Raw vector, representing the binary extraction of the DICOM file.

try.parse

Boolean. If TRUE, the value, with an undocumented VR, is considered, as far as possible, as a string.

Value

Returns the dicom.raw.data content between the addresses start and stop. Depending on the representation of the value (VR), it can be a character string or a numerical vector.

Examples

# creation of the toy.dicom.raw () addresses dataframe:
df <- dicom.browser (toy.dicom.raw ())

# search for modality of toy.dicom.raw ()
idx <- grep ("^[(]0008,0060[)]$", df$tag)
modality  <- dicom.tag.parser (df$start[idx], df$stop[idx], df$VR[idx], 
                               df$endian[idx], toy.dicom.raw ())
modality

[Package espadon version 1.6.0 Index]