-
Notifications
You must be signed in to change notification settings - Fork 8
First poc #2
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
Conversation
Really cool! I'll read at least some of the code before our meeting this afternoon. Could you please add a minimal |
Will do. Though if you run |
Nope, the current dir is only in PYTHONPATH when running interactively. Anyway, setup.py is added, so you can do e.g. |
zeroline=False, | ||
) | ||
# Add an empty layout image that we can populate from JS. | ||
fig.add_layout_image( |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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?
Screenshot of the

slicer_with_3_views.py
exampe: