Skip to content

Commit 8a78bd1

Browse files
author
anna-grim
committed
refactor: rm zarr reader
1 parent 057cf34 commit 8a78bd1

File tree

1 file changed

+0
-41
lines changed

1 file changed

+0
-41
lines changed

src/segmentation_skeleton_metrics/utils/img_util.py

Lines changed: 0 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,7 @@
1414
from tifffile import imread
1515

1616
import numpy as np
17-
import s3fs
1817
import tensorstore as ts
19-
import zarr
2018

2119
from deep_neurographs.utils import util
2220

@@ -302,45 +300,6 @@ def _load_image(self):
302300
self.img = imread(self.img_path)
303301

304302

305-
class ZarrReader(ImageReader):
306-
"""
307-
Class that reads image with Zarr library.
308-
309-
"""
310-
311-
def __init__(self, img_path):
312-
"""
313-
Constructs a Zarr image reader.
314-
315-
Parameters
316-
----------
317-
img_path : str
318-
Path to image.
319-
320-
Returns
321-
-------
322-
None
323-
324-
"""
325-
super().__init__(img_path)
326-
327-
def _load_image(self):
328-
"""
329-
Loads image using the Zarr library.
330-
331-
Parameters
332-
----------
333-
None
334-
335-
Returns
336-
-------
337-
None
338-
339-
"""
340-
store = s3fs.S3Map(root=self.img_path, s3=s3fs.S3FileSystem(anon=True))
341-
self.img = zarr.open(store, mode="r")
342-
343-
344303
def get_start_end(voxel, shape, from_center=True):
345304
"""
346305
Gets the start and end indices of the chunk to be read.

0 commit comments

Comments
 (0)