Kitware / vtk-js

Visualization Toolkit for the Web
https://kitware.github.io/vtk-js/
BSD 3-Clause "New" or "Revised" License
1.23k stars 370 forks source link

[Feature] Support for LZMA vtk files #3042

Open skoloCFD opened 6 months ago

skoloCFD commented 6 months ago

Feature Request

Given the smaller filesize of vtk encoded with LZMA, and the support in paraview/vtk-python for this compression type, native support in vtk.js could be useful.

Motivation and Detailed Description

See above

daker commented 6 months ago

Thanks for the report, maybe if you could attach an example file in case someone wants to work on that.

skoloCFD commented 6 months ago

Certainly! Here's a small example - zipped because github won't accept .vtp uploads.

vtp_LZMA_example.vtp.zip

When reading this in with vtk.js, the error message is quite clear:

Invalid compressor vtkLZMADataCompressor

jourdain commented 6 months ago

That will be easier to manage via wasm than plain JS.

daker commented 6 months ago

@jourdain what do you recommend to use ? i was thinking about using Lzip but this means creating a package and publish it on npm

jourdain commented 6 months ago

I was thinking you can get such reader today using itk-wasm. They have a vtp reader which already include LZMA compression support. You can see that by loading that example file within Glance.