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

[VTK] Add axes coordinates to VTK view #817

Merged
merged 7 commits into from Dec 10, 2019
Merged

[VTK] Add axes coordinates to VTK view #817

merged 7 commits into from Dec 10, 2019

Conversation

xavArtley
Copy link
Collaborator

@xavArtley xavArtley commented Nov 26, 2019

First prototype of axes for VTK panel:

import panel as pn
import numpy as np

axes = dict(
    origin = [10, 0, -5],
    xticks = np.linspace(-10,10,5),
    yticks = np.linspace(0,12,11),
    zticks = np.linspace(-5,5,5),
)
dragon = pn.pane.VTK('https://raw.githubusercontent.com/Kitware/vtk-js/master/Data/StanfordDragon.vtkjs',
                     sizing_mode='stretch_width', height=400, enable_keybindings=True, orientation_widget=True,
                     serialize_on_instantiation=True, axes=axes)
dragon.show()

ezgif com-video-to-gif (18)

In the same time I restructure typescript code of VTK pane by splitting in smaller files in a repository specific to vtk

TODO:

  • : grid opacity, axes opacity
  • axes color, grid color
  • : separate ticks position and ticks label (number and text)
  • : add possibility to set tick label style properties (font
  • : add listener on axes change
  • : don't remove axes actor when panel object is changed
  • : Add documentation

"bokehjs": "^1.3.4"
"@types/gl-matrix": "^2.4.5",
"bokehjs": "^1.3.4",
"gl-matrix": "^3.1.0"
Copy link
Member

@philippjfr philippjfr Nov 26, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wasn't aware that you could actually load dependencies like this yet. What ends up loading the dependency?

Copy link
Collaborator Author

@xavArtley xavArtley Nov 26, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suppose node and the typescript compiler to create the .js

@codecov
Copy link

@codecov codecov bot commented Dec 4, 2019

Codecov Report

Merging #817 into master will decrease coverage by 0.16%.
The diff coverage is 79.16%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #817      +/-   ##
==========================================
- Coverage   69.94%   69.77%   -0.17%     
==========================================
  Files         104      104              
  Lines       10463    10532      +69     
==========================================
+ Hits         7318     7349      +31     
- Misses       3145     3183      +38
Impacted Files Coverage Δ
panel/models/vtk.py 100% <100%> (ø) ⬆️
panel/pane/vtk/vtk.py 28.45% <54.54%> (+1.93%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 77e27df...ba9128d. Read the comment docs.

@xavArtley
Copy link
Collaborator Author

@xavArtley xavArtley commented Dec 5, 2019

ezgif com-video-to-gif (3)

@xavArtley xavArtley requested a review from philippjfr Dec 5, 2019
@philippjfr
Copy link
Member

@philippjfr philippjfr commented Dec 10, 2019

Thanks for the PR! At some point we need to figure out how to test the Vtk code.

@philippjfr philippjfr merged commit 8a541e9 into master Dec 10, 2019
4 checks passed
@philippjfr philippjfr deleted the xav/vtk_axes branch Jan 23, 2020
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

Successfully merging this pull request may close these issues.

None yet

2 participants