Parses a DICOM header to a data.frame

parse_hdr(hdr)

Arguments

hdr

Character vector from dcmdump

Value

data.frame of tags and values

Examples

file = system.file("extdata", "example.dcm", package = "dcmtk")
hdr = dcmdump(file)
#> /tmp/RtmpbIKxLr/bin/dcmdump  /home/runner/work/_temp/Library/dcmtk/extdata/example.dcm 
#> Warning: running command '/tmp/RtmpbIKxLr/bin/dcmdump  /home/runner/work/_temp/Library/dcmtk/extdata/example.dcm ' had status 126
#> Warning: dcmdump gave back non-zero status
parsed = parse_hdr(hdr)
#> Error in if (nrow(df) == 0) {    return(NULL)} argument is of length zero