rii-mango / Daikon

A JavaScript DICOM reader.
Other
221 stars 54 forks source link

Console log spam from Siemens header #10

Closed alund closed 6 years ago

alund commented 6 years ago

daikon.Siemens.readHeader() is generating error messages like this:

RangeError: Offset is outside the bounds of the DataView
    at DataView.getUint8 (<anonymous>)
    at b.Siemens.readHeader (scripts.bundle.js:761)
    at Function.b.Tag.convertPrivateValue (scripts.bundle.js:777)
    at new b.Tag (scripts.bundle.js:765)
    at b.Parser.getNextTag (scripts.bundle.js:738)
    at b.Parser.parse (scripts.bundle.js:735)
    at Function.b.Series.parseImage (scripts.bundle.js:748)
    at papaya.volume.dicom.HeaderDICOM.readNextHeaderData (scripts.bundle.js:1350)
    at papaya.volume.dicom.HeaderDICOM.<anonymous> (scripts.bundle.js:1350)

This occurs when this.data is less than 4 bytes long (and so presumably is not a CSA2 header).

martinezmj-ims commented 6 years ago

Would you happen to have a sample file I could test with?

alund commented 6 years ago

Sorry for the late reply. The notification email got auto-filed somewhere I wasn’t checking. Yes, I can get you a file, hopefully tomorrow.

On Sun, Jan 7, 2018 at 6:22 PM Michael Martinez notifications@github.com wrote:

Would you happen to have a sample file I could test with?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/rii-mango/Daikon/issues/10#issuecomment-355865397, or mute the thread https://github.com/notifications/unsubscribe-auth/AAENRwrVoMPeunOYp5DlJ-M5Ufu8qABPks5tIV_XgaJpZM4RCZsk .

alund commented 6 years ago

The attached .zip file contains a single slice that demonstrates the problem. daikon-10-example.zip

martinezmj-ims commented 6 years ago

Should be fixed now. Thanks for reporting this.