dcmjs icon indicating copy to clipboard operation
dcmjs copied to clipboard

prevent arraybuffers from being excluded of naturalized datasets

Open helghast79 opened this issue 4 years ago • 4 comments
trafficstars

helghast79 avatar Nov 02 '21 06:11 helghast79

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.

Captura de ecrã 2021-11-03, às 08 07 58

helghast79 avatar Nov 03 '21 08:11 helghast79

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.

pieper avatar Nov 03 '21 13:11 pieper

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.

jsaarija avatar Mar 03 '22 14:03 jsaarija

@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.

pieper avatar Mar 07 '22 19:03 pieper