Exports the DICOM header and dataset elements to standard DICOMWeb JSON format (PS3.18).
Examples
dcm_file <- system.file("extdata", "example.dcm", package = "dicomtk")
json_txt <- dcm2json(dcm_file)
substr(json_txt, 1, 200)
#> [1] "{\n \"00020001\": {\n \"vr\": \"OB\",\n \"Value\": [\"00\", \"01\"]\n },\n \"00020002\": {\n \"vr\": \"UI\",\n \"Value\": [\"1.2.840.10008.5.1.4.1.1.2\"]\n },\n \"00020003\": {\n \"vr\": \"UI\",\n \"Value\": [\"1.3.6.1."
