-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
IWI sample image data buffers #1239
Comments
The best universal solution I have found is to use byteOffset, but I am not sure why this is not zero in these validation datasets:
|
neurolabusc
added a commit
to niivue/niivue
that referenced
this issue
Sep 18, 2024
Yes, I expect this also. |
hanayik
pushed a commit
to niivue/niivue
that referenced
this issue
Oct 16, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I was able to create sensible IWI images with Python:
However, the validation itk-wasm test datasets seem odd, specifically
When I decode each, the data.buffer.bytelength is larger than the data.byteLength, with the latter being the number of bytes described by the header (while the former is >200 bytes too large). While padding datasets for byte alignment seems understandable, the strange thing is the the padding is at the start of the array, not the end. This makes fast reading of byte data as Uint8Array regardless of datatype (e.g. Float32Array, etc) ungainly. My best guess is these validation versions were created by beta software and should be updated to reflect the standard, but it might be worth understanding the origin of this discrepancy.
The text was updated successfully, but these errors were encountered: