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 for RGB for pixeldata #336

Open
vitalii-komenda opened this issue Jul 12, 2024 · 3 comments
Open

Support for RGB for pixeldata #336

vitalii-komenda opened this issue Jul 12, 2024 · 3 comments
Labels
good first issue Good for newcomers help wanted Extra attention is needed

Comments

@vitalii-komenda
Copy link

Currently only gray colours are possible.

Would it be feasible to add RGB support like in pydicom

@suyashkumar
Copy link
Owner

suyashkumar commented Jul 25, 2024

Hi! For encapsulated PixelData since it's typically some form of JPEG that we decode directly it should support color. For NativePixel data we should probably revamp the way we convert the parsed dicom values to images, but it shouldn't be too bad. iirc an RGB image will just have a SamplesPerPixel value of 3 and we can just grab the RGB values to build a go image.

Another slightly annoying thing about Go images (at least for grayscale) is that they only support uint16s for grayscale images. Same for RGBA, we have uint16s for each R, G, B, A channels.

Anyway, is this something you'd be interested in contributing to?

In the current code, you'd likely need to make the updates here. You may also need to add the photomeric interpretation to the NativeFrame during parsing.

@suyashkumar
Copy link
Owner

Actually, something that might interfere with these changes is that I might change the way we store the data in native frames that I discovered here. But if you'd like to start, feel free to give it a try! Otherwise I'll try to take a look sometime this week or next.

@suyashkumar suyashkumar added help wanted Extra attention is needed good first issue Good for newcomers labels Jul 25, 2024
@suyashkumar
Copy link
Owner

The changes I mentioned in the comment above have landed:#315 so should be anyone should be unblocked to take a peek at this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants