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

L16 images render as black until edit panel is open #613

Open
woelper opened this issue Jan 14, 2025 · 3 comments
Open

L16 images render as black until edit panel is open #613

woelper opened this issue Jan 14, 2025 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@woelper
Copy link
Owner

woelper commented Jan 14, 2025

Describe the bug
I suspect there is an issue with the texture / display of L16 images. It works if the edit panel is open and a Rgba8 operator is automatically added.

Tagging @B-LechCode for visibility.

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots / sample files
If applicable, add screenshots to help explain your problem. You can also attach problematic images here to help test the bug. Please pay attention to image copyright.

Desktop (please complete the following information):

  • OS: Windows, MacOS, Linux, NetBSD...
  • [Linux] Desktop environment, distribution, do you use Wayland?
  • Version

Additional context
Add any other context about the problem here.

@B-LechCode
Copy link
Collaborator

Do you know the min and max pixel values in your L16 images?
I suppose the values are just too low?

@woelper
Copy link
Owner Author

woelper commented Jan 15, 2025

Oh, that could be a possibility. I am testing Dicom support and they could be out of visual range. I am not sure, but even if that was the case I don't know if converting them to rgba8 would compress them into 8bit per channel so they become visible - not sure if image is doing anything along those lines. I can check that!

@B-LechCode
Copy link
Collaborator

B-LechCode commented Jan 15, 2025

Okay, I checked it up:
Using the edit panel sets the data type to 8 bit - that's why it works. As a workaround: change it to rgba32f if you need more dynamic range.
Using 16 Bit data with values up to 2^16-1 always results in a black rendering.

Will look more deeply into in the evening.

I think it's linked to the texture type. R16 is missing, so I used R16Uint

I suggest a 2 level fix:

  1. Convert 16 Bit types to float in texture wrapper - we know that float is working fine (short term fix, will do it by this evening so you can carry on with dicom)
  2. Add R16 type to notan and bring up a pull request to them (long term fix to save memory and cpu cycles)

I'm still kinda a newbie to rust. Is there an option to clone notan from github and use that source code directly to compile oculante with it? So I would have a good setup to test everything together :)

@B-LechCode B-LechCode self-assigned this Jan 15, 2025
@B-LechCode B-LechCode added the bug Something isn't working label Jan 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants