Skip to content

Commit

Permalink
Implement RemoteZarr mask methods
Browse files Browse the repository at this point in the history
  • Loading branch information
will-moore committed Jul 6, 2020
1 parent 61f3a8f commit e59d928
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions ome_zarr.py
Original file line number Diff line number Diff line change
Expand Up @@ -295,12 +295,17 @@ def get_json(self, subpath):
return {}

def get_mask_names(self):
# TODO: find mask dirs remotely
# If this is a mask, the names are in root .zattrs
masks = self.root_attrs.get('masks')
if masks is not None:
return masks
return []

def has_ome_masks(self):
# TODO: check for /masks/
return False
# check for /masks/.zattrs with 'masks' key
mask_attrs = self.get_json('masks/.zattrs')
masks = mask_attrs.get('masks')
return masks is not None and len(masks) > 0

def info(path):
"""
Expand Down

0 comments on commit e59d928

Please sign in to comment.