dicom.browser: DICOM raw data browser

View source: R/dicom_browser.R

dicom.browserR Documentation

DICOM raw data browser

Description

the dicom.browser function creates a dataframe describing the tags contained in the raw data of a DICOM file, as well as the information to access them.

Usage

dicom.browser(
  dicom.raw.data,
  nbTAG = 0,
  stop.tag = "",
  stop.level = 0,
  full.info = FALSE,
  tag.dictionary = dicom.tag.dictionary()
)

Arguments

dicom.raw.data

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

nbTAG

Integer. If nbTAG = 0 (default), and stop.tag = "", all the DICOM raw data is browsed. Otherwise, the function only browses the first nbTAG tags.

stop.tag

Character string, representing the tag that stops the browse of the dicom.raw.data.

stop.level

Positive integer, specifying the encapsulation level of the stop.tag in dicom.raw.data.

full.info

Boolean. If TRUE, more information about the DICOM data is returned.

tag.dictionary

Dataframe, by default equal to dicom.tag.dictionary, whose structure it must keep. This dataframe is used to parse DICOM files.

Value

Returns a dataframe if dicom.raw.data is DICOM raw data, NULL otherwise.

If full.info = FALSE, dataframe columns are

  • tag : the tags contained in dicom.raw.data,

  • VR : value representation of the content of the tag,

  • endian : the endianness of the tag content,

  • start : the start address in dicom.raw.data of the tag content.

  • stop : the stop address in dicom.raw.data of the tag content.

If full.info = TRUE, the following columns are added :

  • encaps.load : If the tag contains nested data, this column gives the number of bytes remaining until the end of the nesting. If there are several levels of nesting, these numbers are collapsed and separated by a space.

  • load.start : the start address in dicom.raw.data of the tag load size.

  • load.stop : the stop address in dicom.raw.dataof the tag load size.

  • tag.start : the start address in dicom.raw.data of the tag.

See Also

dicom.raw.data.loader, dicom.tag.parser

Examples

# DICOM information dataframe of the dummy raw data toy.dicom.raw ()
df <- dicom.browser (toy.dicom.raw (), full.info = TRUE)
str (df)

espadon documentation built on April 11, 2025, 5:57 p.m.