Skip to content

Commit

Permalink
Merge pull request #10 from DavidStirling/zarr-reader
Browse files Browse the repository at this point in the history
Patch zarr reader for ome-zarr v0.4 plates
  • Loading branch information
emilroz authored Dec 2, 2024
2 parents c4ce381 + b5a036f commit 4b24fc5
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
2 changes: 1 addition & 1 deletion cellprofiler_core/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "4.2.8"
__version__ = "4.2.80002"
11 changes: 9 additions & 2 deletions cellprofiler_core/utilities/zarr.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,9 +204,16 @@ def map_wells(self):
if 'plate' not in attrs or 'wells' not in attrs['plate']:
return False
well_data = attrs['plate']['wells']
if not well_data:
# Empty well data for some reason
return False
mapper = {}
if 'column_index' in well_data[0]:
# Standard format
if "columnIndex" in well_data[0]:
# NGFF v0.4 format
for row in well_data:
mapper[(str(row['columnIndex']), str(row['rowIndex']))] = row['path']
elif 'column_index' in well_data[0]:
# Older bioformats2raw format
for row in well_data:
mapper[(str(row['column_index']), str(row['row_index']))] = row['path']
else:
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,6 @@
packages=setuptools.find_packages(exclude=["tests"]),
python_requires=">=3.8, <4",
url="https://github.com/CellProfiler/core",
version="4.2.8",
version="4.2.80002",
zip_safe=False,
)

0 comments on commit 4b24fc5

Please sign in to comment.