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 8-bit images #153

Open
bje43 opened this issue Sep 20, 2021 · 1 comment
Open

Support for 8-bit images #153

bje43 opened this issue Sep 20, 2021 · 1 comment

Comments

@bje43
Copy link

bje43 commented Sep 20, 2021

@swederik how difficult would it be to add support for 8-bit images? Any chance you could help point me in the right direction?

'8 Bit signed images are not yet supported by this plugin.'

@swederik
Copy link
Member

So right now the shaders in VTK.js only support Float32 and UInt8. We are working on enabling the use of Int16 and UInt16 in this PR here: Kitware/vtk-js#2058

That's the main reason why we put these errors. I don't think we actually checked if it would work or not. It's just that we know it's slow to convert formats.

It's possible that if you just remove this if check and just try to use an Int8 ImageData, VTK may convert it to a Float32 before putting it into the shader anyway, but I've never tried.

See here: https://github.com/Kitware/vtk-js/blob/b189b7fa3b7f1205bfae1079a54d0d52761f5047/Sources/Rendering/OpenGL/Texture/index.js#L850

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants