Skip to content
Snippets Groups Projects
Commit ee42c6a9 authored by Andrey Aristov's avatar Andrey Aristov
Browse files

detect channel axis

parent c1ef4014
No related branches found
No related tags found
No related merge requests found
...@@ -40,11 +40,15 @@ def napari_get_reader(path): ...@@ -40,11 +40,15 @@ def napari_get_reader(path):
def read_nd2(path): def read_nd2(path):
data = nd2.ND2File(path) data = nd2.ND2File(path)
ddata = data.to_dask() ddata = data.to_dask()
try:
channel_axis = list(d.sizes.keys()).index('C')
except ValueError:
channel_axis = None
return [ return [
( (
ddata, ddata,
dict( dict(
channel_axis=1, channel_axis=channel_axis,
name=["BF", "fluo"], name=["BF", "fluo"],
colormap=["gray", "green"], colormap=["gray", "green"],
contrast_limits=[(8500, 35000), (150, 20000)], contrast_limits=[(8500, 35000), (150, 20000)],
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment