Skip to content

Commit

Permalink
dont use reverse_y=False in the examples
Browse files Browse the repository at this point in the history
  • Loading branch information
almarklein committed Nov 25, 2020
1 parent 3ef64bc commit e670173
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 10 deletions.
1 change: 1 addition & 0 deletions dash_slicer/slicer.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ class VolumeSlicer:
reverse_y (bool): Whether to reverse the y-axis, so that the origin of
the slice is in the top-left, rather than bottom-left. Default True.
(This sets the figure's yaxes ``autorange`` to "reversed" or True.)
Note: setting this to False affects performance, see #12.
scene_id (str): the scene that this slicer is part of. Slicers
that have the same scene-id show each-other's positions with
line indicators. By default this is derived from ``id(volume)``.
Expand Down
10 changes: 3 additions & 7 deletions examples/slicer_with_1_plus_2_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,10 @@
ori = 1000, 2000, 3000


slicer1 = VolumeSlicer(
app, vol1, axis=1, origin=ori, reverse_y=False, scene_id="scene1"
)
slicer2 = VolumeSlicer(
app, vol1, axis=0, origin=ori, reverse_y=False, scene_id="scene1"
)
slicer1 = VolumeSlicer(app, vol1, axis=1, origin=ori, scene_id="scene1")
slicer2 = VolumeSlicer(app, vol1, axis=0, origin=ori, scene_id="scene1")
slicer3 = VolumeSlicer(
app, vol2, axis=0, origin=ori, spacing=spacing, reverse_y=False, scene_id="scene1"
app, vol2, axis=0, origin=ori, spacing=spacing, scene_id="scene1"
)

app.layout = html.Div(
Expand Down
6 changes: 3 additions & 3 deletions examples/slicer_with_3_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@

# Read volumes and create slicer objects
vol = imageio.volread("imageio:stent.npz")
slicer1 = VolumeSlicer(app, vol, reverse_y=False, axis=0)
slicer2 = VolumeSlicer(app, vol, reverse_y=False, axis=1)
slicer3 = VolumeSlicer(app, vol, reverse_y=False, axis=2)
slicer1 = VolumeSlicer(app, vol, axis=0)
slicer2 = VolumeSlicer(app, vol, axis=1)
slicer3 = VolumeSlicer(app, vol, axis=2)

# Calculate isosurface and create a figure with a mesh object
verts, faces, _, _ = marching_cubes(vol, 300, step_size=2)
Expand Down

0 comments on commit e670173

Please sign in to comment.