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

Allow to specify scalars data type? #671

Closed
FezVrasta opened this issue Oct 14, 2022 · 0 comments
Closed

Allow to specify scalars data type? #671

FezVrasta opened this issue Oct 14, 2022 · 0 comments
Assignees

Comments

@FezVrasta
Copy link
Collaborator

As part of some performance optimizations work we are doing, we noticed that a huge bottleneck is located at the vtk.js updateArrayDataType helper (of Rendering/OpenGL/Texture).

The issue is that image.getPointData().getScalars() can return any kind of typed array, while the webgl logic requires a Float32Array. Any time vtk needs to render something, it needs to convert the scalars to the expected format, and this produces many garbage collection events and general slowness due to the size of the scalars data.

If itk-wasm provided an option to pre-convert the scalars in the Float32Array type, we could avoid all the above.

Do you think this is something that you could add to this lib?

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