Created
December 20, 2019 05:41
-
-
Save gazzar/d06a1cafdba9888a47d905e2664d070f to your computer and use it in GitHub Desktop.
View data in a BigDataViewer hdf5 container in napari
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
""" | |
Created on Fri Dec 20 11:31:51 2019 | |
@author: grub0002 | |
""" | |
import napari | |
import h5py | |
import dask | |
import dask.array as da | |
from dask_image.imread import imread | |
DATA = r'C:\Users\grub0002\unsynced\scratch\IMBL_Nov_Croton\linda_brain\recon.h5' | |
stack = h5py.File(DATA, 'r') | |
data0 = stack['/t00000/s00/0/cells'] | |
data1 = stack['/t00000/s00/1/cells'] | |
data2 = stack['/t00000/s00/2/cells'] | |
data3 = stack['/t00000/s00/3/cells'] | |
pyramid = [data0, data1, data2, data3] | |
with napari.gui_qt(): | |
napari.view_image(pyramid, contrast_limits=[0, 200], is_pyramid=True) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment