Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Porting create_empty_zarr to iohub #234

Merged
merged 38 commits into from
Sep 27, 2024
Merged
Show file tree
Hide file tree
Changes from 8 commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
4386d32
initial commit with added docs prior to refactoring to simplify the n…
edyoshikun Jul 16, 2024
a5bca81
considering varying t_idx_in and out
edyoshikun Jul 16, 2024
6edd790
template for hypothesis
edyoshikun Jul 17, 2024
ee502b2
Refactor NGFF module and migrate to Pydantic v2 (#233)
ziw-liu Jul 29, 2024
7fc31a7
improving docstring for functions and renaming input and output path …
edyoshikun Jul 31, 2024
9ba133a
Fixing pyramid scaling factor (#238)
JoOkuma Aug 7, 2024
84f351c
Use annotation instead of field for tagged union (#244)
ziw-liu Sep 7, 2024
3304dac
Export `ImageArray` from the `ngff` module (#245)
edyoshikun Sep 10, 2024
755e941
renaming method arguments to have consistent naming structure
edyoshikun Sep 17, 2024
d391441
flake8
edyoshikun Sep 17, 2024
3844699
Merge branch 'main' into mp_utils_port
ieivanov Sep 19, 2024
5cc6ca8
refactor _calculate_zyx_chunk_size
ieivanov Sep 20, 2024
6a1252d
use input_store_path and output_store_path throughout
ieivanov Sep 20, 2024
0e1c141
style
ieivanov Sep 20, 2024
99e613e
rename and clean up time indices
ieivanov Sep 20, 2024
cde08f5
update time_indices documentation
ieivanov Sep 20, 2024
1af9254
add processing for channel indices
ieivanov Sep 20, 2024
e55686d
fix syntax and move ngff_utils.py to ngff/utils.py
talonchandler Sep 20, 2024
5bfe7c9
update import
talonchandler Sep 20, 2024
8315d4a
typing
talonchandler Sep 20, 2024
c6cd5e8
docs typos
talonchandler Sep 20, 2024
6621635
fix process_single_position iterator @talonchandler @edyoshikun
ieivanov Sep 20, 2024
671bf3d
update apply_transform... docstring
ieivanov Sep 20, 2024
3a0887e
compatibility with minimal deskew w/ @edyoshikun
talonchandler Sep 20, 2024
82dd335
pretty flat_iterable
ieivanov Sep 20, 2024
07dea4b
adding new tests
edyoshikun Sep 21, 2024
643665c
create_empty test without testing channel names
edyoshikun Sep 21, 2024
9ee6acb
fixing the create_empty_zarr extra indentation
edyoshikun Sep 21, 2024
961995c
-attempt to fix apply_transform_test. @ieivanov revert if needed
edyoshikun Sep 23, 2024
82950b3
fixed apply_transform_czyx
edyoshikun Sep 23, 2024
7e3f0af
debug pytest
ieivanov Sep 23, 2024
cf36dc2
fixing the test for create_empty_plate pytest
edyoshikun Sep 24, 2024
59b4bf2
synchronize log messages
talonchandler Sep 25, 2024
5b7f595
docs improvements
talonchandler Sep 26, 2024
c1246f1
improved docs and typing for Callable func
talonchandler Sep 26, 2024
f357184
remove commented slurmkit fix
talonchandler Sep 26, 2024
17da054
delete unused function
talonchandler Sep 26, 2024
ef0ed41
Merge branch 'main' into mp_utils_port
talonchandler Sep 26, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion iohub/convert.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
from tqdm.contrib.logging import logging_redirect_tqdm

from iohub._version import version as iohub_version
from iohub.ngff import Position, TransformationMeta, open_ome_zarr
from iohub.ngff.models import TransformationMeta
from iohub.ngff.nodes import Position, open_ome_zarr
from iohub.reader import MMStack, NDTiffDataset, read_images

__all__ = ["TIFFConverter"]
Expand Down
10 changes: 10 additions & 0 deletions iohub/ngff/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
from iohub.ngff.models import TransformationMeta
from iohub.ngff.nodes import ImageArray, Plate, Position, open_ome_zarr

__all__ = [
"ImageArray",
"open_ome_zarr",
"Plate",
"Position",
"TransformationMeta",
]
20 changes: 11 additions & 9 deletions iohub/display_utils.py → iohub/ngff/display.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
""" Utility functions for displaying data """
"""OME-Zarr display settings (OMERO metadata)"""

import numpy as np
from PIL.ImageColor import colormap

from iohub.ngff_meta import ChannelMeta, WindowDict
from iohub.ngff.models import ChannelMeta, WindowDict

""" Dictionary with key works and most popular fluorescent probes """
CHANNEL_COLORS = {
Expand All @@ -25,8 +25,10 @@
# emission around 440 - 460 nmm
"blue": ["Blue", "DAPI", "BFP", "Hoechst"],
"red": ["Red"],
"yellow": ["Yellow", "Cy3"], # Emission around 540-570 nm
"orange": ["Orange", "Cy5", "Y5"], # emission around 650-680 nm
# Emission around 540-570 nm
"yellow": ["Yellow", "Cy3"],
# emission around 650-680 nm
"orange": ["Orange", "Cy5", "Y5"],
}


Expand All @@ -49,12 +51,12 @@ def color_to_hex(color: str) -> str:

def channel_display_settings(
chan_name: str,
clim: tuple[float, float, float, float] = None,
clim: tuple[float, float, float, float] | None = None,
first_chan: bool = False,
):
"""This will create a dictionary used for OME-zarr metadata.
Allows custom contrast limits and channel.
names for display. Defaults everything to grayscale.
"""This will create a dictionary used for OME-Zarr metadata.
Allows custom contrast limits and channel names for display.
Defaults everything to grayscale.

Parameters
----------
Expand Down Expand Up @@ -85,7 +87,7 @@ def channel_display_settings(
"S3": (-1.0, 1.0, -10.0, -10.0),
"Other": (0, U16_FMAX, 0.0, U16_FMAX),
}
if not clim:
if clim is None:
if chan_name in channel_settings.keys():
clim = channel_settings[chan_name]
else:
Expand Down
Loading
Loading