Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add (interactive) slice explorer in plotly. (#4953)
This PR is an addition to the 3D image processing introduction tutorial, which landed with #4850. It relates to #4850 (comment) and #4762. I've made a slice explorer with Plotly so it renders even in the static HTML page. In future iterations, I'll add a 3D visualization showing the position of the selected slice within the dataset. I've chosen the density_heatmap function so I could readily use its animation_frame argument for the slider interaction (selection). This function is made for aggregation, which I'm bypassing by setting the number of bins to the data size... Ideally, I wanted to use imshow to view the image slices (planes) but this wouldn't offer such a convenient abstraction in terms of slider interaction. One issue when trying with this is that occasionally the Plotly plot would behave strangely when dragging the animation slider (the slider itself sometimes moved to a lower position on the screen mid-drag and the image would quit updating). Hitting the "home" button at top to reset the axes should restore it to a working state again. It might be somehow related to dragging too quickly as I never saw the issue if I just clicked around on different frames, only when dragging the slider. Co-authored-by: Emmanuelle Gouillart <emma@plot.ly> Co-authored-by: Juan Nunez-Iglesias <juan.nunez-iglesias@monash.edu> Co-authored-by: Gregory R. Lee <grlee77@gmail.com>
- Loading branch information