Skip to content
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

Support arbitrary BitsAllocated (beyond 8, 16, 32) #211

Open
suyashkumar opened this issue Jul 16, 2021 · 0 comments
Open

Support arbitrary BitsAllocated (beyond 8, 16, 32) #211

suyashkumar opened this issue Jul 16, 2021 · 0 comments
Labels
enhancement New feature or request help wanted Extra attention is needed question Further information is requested

Comments

@suyashkumar
Copy link
Owner

As discussed in #210, it might be worth trying to support BitsAllocated in ReadNativeFrames beyond those supported by binary.ByteOrder. At the moment we now return an error for unsupported values.

It's probably worth understanding what non-standard BitsAllocated might mean, and if the standard has any guidance.

@suyashkumar suyashkumar added enhancement New feature or request help wanted Extra attention is needed question Further information is requested labels Jul 16, 2021
suyashkumar added a commit that referenced this issue Aug 22, 2021
This adds initial support for bitsAllocated=1 assuming LittleEndian ordering.

I'm not sure if we should be assuming LittleEndian ordering all the time, but this appears to be consistent with pydicom's approach [1] and passes tests even for data that I attempted to write out as BigEndian (probably needs closer scrutiny in the future).

This will address #211 for the case bitsAllocated = 1.

[1] https://github.com/pydicom/pydicom/blob/f9ee9126fa8aa10c72dc1083d7aa53062b9ab6af/pydicom/pixel_data_handlers/numpy_handler.py#L186
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant