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

Feature request: add TextActor or CornerAnnotations serializer #67

Open
FelipeCybis opened this issue Apr 15, 2024 · 3 comments
Open

Feature request: add TextActor or CornerAnnotations serializer #67

FelipeCybis opened this issue Apr 15, 2024 · 3 comments

Comments

@FelipeCybis
Copy link
Contributor

It would be awsome to be able to serialize pyvista title/text objects. I've looked a little bit in the vtkjs side (https://kitware.github.io/vtk-js/api/Interaction_UI_CornerAnnotation.html) but I must confess it is quite different from other classes I looked up before. Not quite sure what would it need.

I see it has all this methods:

    'annotationContainer',
    'northWestContainer',
    'northContainer',
    'northEastContainer',
    'westContainer',
    'eastContainer',
    'southWestContainer',
    'southContainer',
    'southEastContainer',

that are divs. I assume it would work just passing innerHtml to them? Have you guys already thought about text or annotations serialization?

Would love to help in my free time, but definitely need guidance :)

@jourdain
Copy link
Collaborator

the issue here is that vtk.js use plain HTML to handle those and therefore don't really match what VTK/C++ is capturing/doing.

But with WASM, we should be able to capture it properly. Do you have a simple PyVista example illustrating such scene you would like to see on the client side? (that will help with testing/validation)

@FelipeCybis
Copy link
Contributor Author

FelipeCybis commented Apr 15, 2024

I see, I imagined, seeing the differences from other classes...

I guess this pyvista example in the end of the documentation would be enough? https://docs.pyvista.org/version/stable/api/plotting/_autosummary/pyvista.Plotter.add_title.html

import pyvista as pv
pl = pv.Plotter()
pl.background_color = 'grey'
actor = pl.add_title(
    'Plot Title', font='courier', color='k', font_size=40
)
pl.show()

@jourdain
Copy link
Collaborator

Perfect, thx...

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