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

First poc #2

Merged
merged 11 commits into from
Oct 29, 2020
Merged

First poc #2

merged 11 commits into from
Oct 29, 2020

Conversation

almarklein
Copy link
Collaborator

@almarklein almarklein commented Oct 29, 2020

Screenshot of the slicer_with_3_views.py exampe:
afbeelding

@emmanuelle
Copy link
Contributor

emmanuelle commented Oct 29, 2020

Really cool! I'll read at least some of the code before our meeting this afternoon. Could you please add a minimal setup.py so that we can install the package locally to run the examples? (unless there is another preferred workflow)

@emmanuelle
Copy link
Contributor

@nicolaskruchten 👀

@almarklein
Copy link
Collaborator Author

Could you please add a minimal setup.py

Will do. Though if you run python examples/xxxx.py from the root, it should also work, I think.

@almarklein
Copy link
Collaborator Author

Though if you run python examples/xxxx.py from the root, it should also work, I think.

Nope, the current dir is only in PYTHONPATH when running interactively. Anyway, setup.py is added, so you can do e.g. pip install -e .

zeroline=False,
)
# Add an empty layout image that we can populate from JS.
fig.add_layout_image(
Copy link
Contributor

Choose a reason for hiding this comment

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

I know we sent you code where the image was added as a layout image but the more "modern" way of doing this is to use an Image trace like in https://github.com/plotly/dash-sample-apps/blob/master/apps/dash-covid-xray/app.py#L68 and https://github.com/plotly/dash-sample-apps/blob/master/apps/dash-covid-xray/app.py#L418. This way you can get hover and click events on image pixels, which is not the case with a layout image

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 saw that the two examples used different methods, and I assumed that layout images where easier, but will change this :) I think I'll do that in a new PR. Are there any other differences? E.g. I saw that with layout images one can create a stack of them and use alpha blending to overlay e.g. segmentation results. Is that possible with image traces as well?

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