This still needs some more testing, and need to think about best way to actually expose the parameters to the user. Example of adjusting the cutting plane interactively in Jupyter:
from ipywidgets import interact
@interact(a=(-1., 1.))
def update_a(a):
current = list(vol.state.cutting_plane)
current[0] = a
vol.state.cutting_plane = current
@interact(b=(-1., 1.))
def update_b(b):
current = list(vol.state.cutting_plane)
current[1] = b
vol.state.cutting_plane = current
@interact(c=(-1., 1.))
def update_c(c):
current = list(vol.state.cutting_plane)
current[2] = c
vol.state.cutting_plane = current
@interact(d=(-256., 256.))
def update_d(d):
current = list(vol.state.cutting_plane)
current[3] = d
vol.state.cutting_plane = current
Main TODOs:
[ ] Have a toggle in the shaders for turning cutting plane on/off
[ ] Implement UI options to set the cutting plane - could have simple mode where one just cuts in x, y, or z, and then have an advanced mode where all the coefficients can be edited.
[ ] Added visual tests (either here or in glue-jupyter)
This still needs some more testing, and need to think about best way to actually expose the parameters to the user. Example of adjusting the cutting plane interactively in Jupyter:
Main TODOs: