starfish icon indicating copy to clipboard operation
starfish copied to clipboard

add holoviews/bokeh as a backend for starfish.display

Open neuromusic opened this issue 6 years ago • 2 comments

holoviews/bokeh offers interactive visualization of n-dimensional xarray datasets, making them an ideal way to interactively explore image stacks

advantages:

  • works with remote kernels
  • works on Windows WSL
  • can be rendered into HTML for documentation
  • in-notebook selection of r/c/z, zoom, pan, etc

image

neuromusic avatar Jul 25 '19 21:07 neuromusic

Note: the "rendering imagestacks in holoviews" part of this may be easier with #1472

neuromusic avatar Jul 25 '19 22:07 neuromusic

after @shanaxel42 reminded me of #1136, I'm closing #1472

one barrier to using holoviews with the imagestack xarray is that x and y don't have coordinates.

this works, however...

from starfish import Experiment

e = Experiment.from_json('https://d2z4zivcmlmaj1.cloudfront.net/ISS/mouse_vs_human/experiment.json')
imgs = e.fov().get_image('primary')

import holoviews as hv
hv.extension('matplotlib')

imgs.xarray.name = 'primary'
ds = hv.Dataset(imgs.xarray.set_index(x='xc',y='yc',z='zc'))

ds.to(hv.Image,['x','y'])

neuromusic avatar Jul 25 '19 22:07 neuromusic