dcmjs
dcmjs copied to clipboard
DicomMessage._read() Sets Decoder Too Late in Some Cases
Looking at the function DicomMessage._read() and the following section:
if (cleanTagString === "00080005") {
...
bufferStream.setDecoder(new TextDecoder(coding));
the above assumes that cleanTagString === "00080005" will be encountered before other encoded tags. If this does not hold true then this will be set too late.
Do you have example data that could be used to test this? I'm not sure this would ever come up in practice since the tags are always in order and this is the first on in the dictionary (https://dicom.nema.org/medical/dicom/current/output/html/part06.html).