dcmjs
dcmjs copied to clipboard
prevent arraybuffers from being excluded of naturalized datasets
Hi Pieper,
Sure, problem arise when loading a dicom-seg files which trigger RangeError: Invalid typed array length. After debugging found that the addAccessor's function is being called with the arraybuffer in question and since it doesn't have any key, it silently exists this function leaving the property with undefined value.
I believe addAccessor's function is not intended for arrays or arraybuffers so the additional filter makes sense I guess.
Thanks for the context 👍 I agree a test would help.
Another small thing I think there cannot be a space between the fix and the ( in the commit message header.
Hi! What's the progress on this? I'm currently encountering this very issue in 0.19.6 with PixelData in CT images being placed inside an array after the changes to sequence naturalization. I currently have a workaround for this but naturally I would prefer to see this fix merged to master.
@wayfarer3130 can you comment on this PR to see if it's good to merge? Specifically how does it relate to #251 which seems to touch the same code.