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

Missing methods and dependencies #19

Open
jourdain opened this issue Feb 26, 2025 · 5 comments
Open

Missing methods and dependencies #19

jourdain opened this issue Feb 26, 2025 · 5 comments

Comments

@jourdain
Copy link
Collaborator

  • dependencies could be optional but why don't we use vtk for the encoding? Is PIL faster?
  • With the nice helper how do we push a render from the Python side? Ideally that should be a method on the widget if possible.
@jourdain
Copy link
Collaborator Author

@Thibault-Pelletier

@jourdain
Copy link
Collaborator Author

Also the example is not working for me on mac

@jourdain
Copy link
Collaborator Author

@finetjul FYI

@Thibault-Pelletier
Copy link
Contributor

Thibault-Pelletier commented Mar 6, 2025

Hi @jourdain,

thanks for the ping / issue and sorry about the delayed answer!

From my tests, PIL was slightly faster for encoding than VTK for JPEG.
The reason I used PIL instead of VTK was to be able to switch between file formats with only one implementation when VTK would require multiple implementations for the same result.

I also wanted to check what results we could have with WEBP and AVIF formats which are not supported by VTK.

The best in terms of speed would be to have hardware encoding directly.

Regarding the method, the way to do that is to call the RcaRenderScheduler's schedule_render method.
Do you want me to add the method to the Adapter as well and delegate to the scheduler?

For the MacOS problem, I'll try to reproduce.

@Thibault-Pelletier
Copy link
Contributor

For information, I found the problem on MacOS. The problem comes from the meta["type"] which is broken and write "image/RcaEncoder.JPEG" instead of "image/jpeg"

It seems to be related to this issue : python/cpython#100458

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