dicom.tag.parser | R Documentation |
the dicom.tag.parser
function decodes the content between
two DICOM raw data addresses.
dicom.tag.parser(start, stop, VR, endian, dicom.raw.data, try.parse = FALSE)
start |
Positive integer. Index of the first raw data to parse in the
|
stop |
Positive integer. Index of the last raw data to parse in the
|
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 |
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.
# 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
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.