sjtans commited on
Commit
48de0d0
·
verified ·
1 Parent(s): 17d092b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -2
app.py CHANGED
@@ -35,7 +35,10 @@ def imread(filepath):
35
 
36
  def check_dims(filepath):
37
  tif = tiff.TiffFile(filepath)
38
- img = tif.aszarr()
 
 
 
39
 
40
  if img.ndim==3:
41
  return img.shape[0], None
@@ -87,7 +90,9 @@ def get_slice(filepath, z, c=0):
87
 
88
  tif = tiff.TiffFile(filepath)
89
 
90
- img = tif.aszarr()
 
 
91
 
92
  print(img.shape)
93
  if img.ndim==2:
 
35
 
36
  def check_dims(filepath):
37
  tif = tiff.TiffFile(filepath)
38
+
39
+ store = tif.aszarr()
40
+ img = zarr.open(store, mode='r', chunks=None)
41
+ store.close()
42
 
43
  if img.ndim==3:
44
  return img.shape[0], None
 
90
 
91
  tif = tiff.TiffFile(filepath)
92
 
93
+ store = tif.aszarr()
94
+ img = zarr.open(store, mode='r', chunks=None)
95
+ store.close()
96
 
97
  print(img.shape)
98
  if img.ndim==2: