Description
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