Skip to content

Control characters in image metadata trigger error in readImage #1454

@PaulHax

Description

@PaulHax

Hola =)

We are seeing DICOM date tags in the wild that have control characters in some of their date VR tags. See attached DICOM file in the zip
corrupt_dates.zip

When feeding the unziped DICOM file to @itk-wasm/image-io::readImage:
https://insightsoftwareconsortium.github.io/ITK-Wasm/image-io/ts/app/?functionName=readImage

Uncaught (in promise) SyntaxError: Bad control character in string literal in JSON at position 1786 (line 109 column 16) (at index-DK1H_2do.js:3638:594)
    at JSON.parse (<anonymous>)
    at eA (itk-wasm-pipeline.worker-p9mTvdp2.js:10:54442)
    at itk-wasm-pipeline.worker-p9mTvdp2.js:10:59402

What do you think we should do? Ideas:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions