Skip to contents

Serializes a tidy header tibble from read_dicom_header() into a DICOM PS3.18 JSON Model list ({"gggggggg": {"vr": ..., "Value": [...]}}).

Usage

as_dicom_json(hdr)

Arguments

hdr

A data frame returned by read_dicom_header().

Value

A named list conforming to the DICOM PS3.18 JSON Model.

Examples

dcm <- system.file("extdata", "example.dcm", package = "dicomtk")
if (nzchar(dcm)) {
  dj <- as_dicom_json(read_dicom_header(dcm))
  names(dj)[1:3]
}
#> [1] "00020001" "00020002" "00020003"