diff --git a/test/OD-single-word-example.dcm b/test/OD-single-word-example.dcm new file mode 100644 index 00000000..73c81cb7 Binary files /dev/null and b/test/OD-single-word-example.dcm differ diff --git a/test/data.test.js b/test/data.test.js index c598d181..b2470707 100644 --- a/test/data.test.js +++ b/test/data.test.js @@ -1154,3 +1154,19 @@ it.each([ expect(value).toBe(expected); } ); + +describe('test OtherDouble ValueRepresentation', () => { + test('Treat OD as explicit VR with correct length', () => { + const file = fs.readFileSync(`test/OD-single-word-example.dcm`); + const data = dcmjs.data.DicomMessage.readFile(new Uint8Array(file).buffer); + + // expect OD VR data element (VolumetricCurveUpDirections) to be read with expected value + expect(data.dict['00701A07']).toBeTruthy(); + const odBuffer = data.dict['00701A07'].Value[0] + expect(new Uint8Array(odBuffer)).toEqual(new Uint8Array([0, 0, 0, 0, 0, 0, 0, 64])) + + // expect arbitrary tag (BlendingInputNumber, US VR) after OD VR to be read without issue + expect(data.dict['00701B02']).toBeTruthy(); + expect(data.dict['00701B02'].Value[0]).toBe(1); + }) +}); \ No newline at end of file