8000 DicomJsonConvertor deserialization fails on invalid dicomElement even when auto validate is set to false · Issue #1445 · fo-dicom/fo-dicom · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
DicomJsonConvertor deserialization fails on invalid dicomElement even when auto validate is set to false #1445
Closed
@smithago

Description

@smithago

Describe the bug
We have a dcm file with invalid privateCreator data element like below
const string json = @"
{
""00090010"": {
""vr"": ""US"",
""Value"": [
1234,
3333
]
},
""00091001"": {
""vr"": ""CS"",
""Value"": [
""00""
]
}
} ";

Note: the 00090010 is a private creator tag, it needs to be VR: LO and VM:1 https://dicom.nema.org/dicom/2013/output/chtml/part05/sect_7.8.html

This bad data fails to deserialize with below exception even when autovalidate is set to false for the serializer.

DICOM element (xxxx,0010) must contain a single value, but contains 4

To Reproduce
const string json = @"
{
""00090010"": {
""vr"": ""US"",
""Value"": [
1234,
3333
]
},
""00091001"": {
""vr"": ""CS"",
""Value"": [
""00""
]
}
} ";

        // make sure below serialization does not throw
        DicomDataset ds = DicomJson.ConvertJsonToDicom(json, autoValidate: false);

Expected behavior
Conversion to succeed to the best effort.

Screenshots or test DICOM files
Included above

Environment
Fellow Oak DICOM version: 5.0.3

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0