-
Notifications
You must be signed in to change notification settings - Fork 8
Open
Description
Hi,
I am strugling to make dash-slicer work in the app.callback. Here is my code:
import dash
import dash_html_components as html
import imageio
from dash_slicer import VolumeSlicer
app = dash.Dash(__name__, update_title=None)
app.layout = html.Div(
children=[
html.Button('Randomize', id='random_button', n_clicks=0),
html.Div(id='series_viewer')
]
)
@app.callback(
dash.dependencies.Output('series_viewer', 'children'),
dash.dependencies.Input('random_button', 'n_clicks')
)
def show(n_clicks):
vol = imageio.volread("imageio:stent.npz")
slicer = VolumeSlicer(app, vol)
slicer.graph.config["scrollZoom"] = False
return slicer.graph, slicer.slider, *slicer.stores
if __name__ == "__main__":
app.run_server(debug=True, dev_tools_props_check=False)
Where there should be an image over the slider. Is there any way to make it work?
This code is based on the example from: Introduction to Dash Slicer
guigautier
Metadata
Metadata
Assignees
Labels
No labels
