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

1-bit pixel data conversion is currently not supported #348

Open
Tracked by #125
Enet4 opened this issue May 13, 2023 · 2 comments
Open
Tracked by #125

1-bit pixel data conversion is currently not supported #348

Enet4 opened this issue May 13, 2023 · 2 comments
Labels
A-lib Area: library C-pixeldata Crate: dicom-pixeldata good first issue

Comments

@Enet4
Copy link
Owner

Enet4 commented May 13, 2023

Example from pydicom tests: liver.dcm

@Enet4 Enet4 added A-lib Area: library C-pixeldata Crate: dicom-pixeldata labels May 13, 2023
@ChayceJRoss
Copy link

ChayceJRoss commented Nov 6, 2024

Hi. First time contributor here.

  1. Am I correct that you would like to add support for when "(0028,0101) Bits Stored" is 1?
  2. I have worked with raw bits in rust before and it proved challenging without the help of external libraries (e.g. support for std::vector<bool>) is this ok to use?

@Enet4
Copy link
Owner Author

Enet4 commented Nov 7, 2024

Thank you for reaching out!

  1. Am I correct that you would like to add support for when "(0028,0101) Bits Stored" is 1?

Yes, this would be for handing image files where Bits Allocated (and subsequently Bits Stored) are 1. The necessary expansion from bits to bytes would happen when turning the DecodedPixelData into a vector, image, or ndarray.

  1. I have worked with raw bits in rust before and it proved challenging without the help of external libraries (e.g. support for std::vector) is this ok to use?

You may be able to use bitvec. Once a byte-addressable view is obtained, it would only be a matter of making it go through the established pixel data transformation functions (Modality LUT, VOI LUT).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-lib Area: library C-pixeldata Crate: dicom-pixeldata good first issue
Projects
None yet
Development

No branches or pull requests

2 participants