spacetx / starfish

starfish: unified pipelines for image-based transcriptomics
https://spacetx-starfish.readthedocs.io/en/latest/
MIT License
228 stars 68 forks source link

add holoviews/bokeh as a backend for starfish.display #1471

Open neuromusic opened 5 years ago

neuromusic commented 5 years ago

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

advantages:

image

neuromusic commented 5 years ago

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

neuromusic commented 5 years ago

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'])