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

Support for anisotropic data. #8

Merged
merged 2 commits into from
Nov 5, 2020
Merged

Support for anisotropic data. #8

merged 2 commits into from
Nov 5, 2020

Conversation

almarklein
Copy link
Collaborator

@almarklein almarklein commented Nov 4, 2020

rebased

This:

  • Adds spacing and origin arguments to specify the position and scale of a volume.
  • Update things accordingly: everything lives in "scene-coordinates" now.
  • Updates the slicer_with_1_plus_2_views.py example to include one view with downsampled data.
  • Add reverse_y argument.

@almarklein almarklein mentioned this pull request Nov 4, 2020
Closed
16 tasks
Comment on lines 31 to 35
slicer1 = DashVolumeSlicer(app, vol1, axis=1, origin=origin, scene_id="myscene")
slicer2 = DashVolumeSlicer(app, vol1, axis=0, origin=origin, scene_id="myscene")
slicer3 = DashVolumeSlicer(
app, vol2, axis=0, origin=origin, spacing=spacing, scene_id="myscene"
)
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@emmanuelle see how we use different data in the 3d slicer, and connect it up by using a common scene_id :)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I really like this example, haha

Copy link
Contributor

Choose a reason for hiding this comment

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

really cool :-)

@emmanuelle
Copy link
Contributor

Thanks @almarklein ! Looks good to me. With this PR I think it's now possible to adapt https://github.com/plotly/dash-sample-apps/blob/master/apps/dash-covid-xray/app.py to use the slicer (the data are indeed anisotropic). Would you like to try it or would you prefer someone else to adapt the app so that you focus on development? As you wish, both are fine.

@almarklein
Copy link
Collaborator Author

Yeah, I think adapting that example would be a really nice exercise to see how the API holds up, so I think I'll have a go myself!

Comment on lines +23 to +25
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 either "reversed" or True.)
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Also added this.

@almarklein almarklein merged commit 88e2e7b into main Nov 5, 2020
@almarklein almarklein deleted the world-coords branch November 5, 2020 12:29
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.

2 participants