patchworks 1.4.1__tar.gz → 1.4.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {patchworks-1.4.1 → patchworks-1.4.2}/PKG-INFO +1 -1
- {patchworks-1.4.1 → patchworks-1.4.2}/src/patchworks/plugins/ome_zarr.py +14 -0
- {patchworks-1.4.1 → patchworks-1.4.2}/tests/test_ome_zarr.py +8 -2
- {patchworks-1.4.1 → patchworks-1.4.2}/.github/workflows/docs.yml +0 -0
- {patchworks-1.4.1 → patchworks-1.4.2}/.github/workflows/lint.yml +0 -0
- {patchworks-1.4.1 → patchworks-1.4.2}/.github/workflows/release.yml +0 -0
- {patchworks-1.4.1 → patchworks-1.4.2}/.gitignore +0 -0
- {patchworks-1.4.1 → patchworks-1.4.2}/.markdownlint-cli2.yaml +0 -0
- {patchworks-1.4.1 → patchworks-1.4.2}/LICENSE +0 -0
- {patchworks-1.4.1 → patchworks-1.4.2}/README.md +0 -0
- {patchworks-1.4.1 → patchworks-1.4.2}/cliff.toml +0 -0
- {patchworks-1.4.1 → patchworks-1.4.2}/docs/api/chunks.md +0 -0
- {patchworks-1.4.1 → patchworks-1.4.2}/docs/api/cluster.md +0 -0
- {patchworks-1.4.1 → patchworks-1.4.2}/docs/api/io.md +0 -0
- {patchworks-1.4.1 → patchworks-1.4.2}/docs/api/merge_tile_labels.md +0 -0
- {patchworks-1.4.1 → patchworks-1.4.2}/docs/api/plugins/cellpose.md +0 -0
- {patchworks-1.4.1 → patchworks-1.4.2}/docs/api/plugins/dog.md +0 -0
- {patchworks-1.4.1 → patchworks-1.4.2}/docs/api/plugins/napari.md +0 -0
- {patchworks-1.4.1 → patchworks-1.4.2}/docs/api/plugins/ome_zarr.md +0 -0
- {patchworks-1.4.1 → patchworks-1.4.2}/docs/api/postprocess.md +0 -0
- {patchworks-1.4.1 → patchworks-1.4.2}/docs/api/relabel.md +0 -0
- {patchworks-1.4.1 → patchworks-1.4.2}/docs/api/tile_process.md +0 -0
- {patchworks-1.4.1 → patchworks-1.4.2}/docs/assets/logo.png +0 -0
- {patchworks-1.4.1 → patchworks-1.4.2}/docs/examples/cellpose_2d.md +0 -0
- {patchworks-1.4.1 → patchworks-1.4.2}/docs/examples/cellpose_2d.py +0 -0
- {patchworks-1.4.1 → patchworks-1.4.2}/docs/examples/cellpose_3d.md +0 -0
- {patchworks-1.4.1 → patchworks-1.4.2}/docs/examples/cellpose_3d.py +0 -0
- {patchworks-1.4.1 → patchworks-1.4.2}/docs/examples/custom.md +0 -0
- {patchworks-1.4.1 → patchworks-1.4.2}/docs/examples/custom_method.py +0 -0
- {patchworks-1.4.1 → patchworks-1.4.2}/docs/examples/dog.md +0 -0
- {patchworks-1.4.1 → patchworks-1.4.2}/docs/examples/dog.py +0 -0
- {patchworks-1.4.1 → patchworks-1.4.2}/docs/examples/standalone_merge.md +0 -0
- {patchworks-1.4.1 → patchworks-1.4.2}/docs/examples/stardist.md +0 -0
- {patchworks-1.4.1 → patchworks-1.4.2}/docs/examples/stardist_2d.py +0 -0
- {patchworks-1.4.1 → patchworks-1.4.2}/docs/getting_started.md +0 -0
- {patchworks-1.4.1 → patchworks-1.4.2}/docs/guide/custom_segmentation.md +0 -0
- {patchworks-1.4.1 → patchworks-1.4.2}/docs/guide/gpu_distributed.md +0 -0
- {patchworks-1.4.1 → patchworks-1.4.2}/docs/guide/label_relations.md +0 -0
- {patchworks-1.4.1 → patchworks-1.4.2}/docs/guide/measurements.md +0 -0
- {patchworks-1.4.1 → patchworks-1.4.2}/docs/guide/merging.md +0 -0
- {patchworks-1.4.1 → patchworks-1.4.2}/docs/guide/ome_zarr_napari.md +0 -0
- {patchworks-1.4.1 → patchworks-1.4.2}/docs/guide/performance.md +0 -0
- {patchworks-1.4.1 → patchworks-1.4.2}/docs/guide/pitfalls.md +0 -0
- {patchworks-1.4.1 → patchworks-1.4.2}/docs/guide/skip_empty.md +0 -0
- {patchworks-1.4.1 → patchworks-1.4.2}/docs/guide/snakemake.md +0 -0
- {patchworks-1.4.1 → patchworks-1.4.2}/docs/guide/tiling.md +0 -0
- {patchworks-1.4.1 → patchworks-1.4.2}/docs/index.md +0 -0
- {patchworks-1.4.1 → patchworks-1.4.2}/mkdocs.yml +0 -0
- {patchworks-1.4.1 → patchworks-1.4.2}/pyproject.toml +0 -0
- {patchworks-1.4.1 → patchworks-1.4.2}/src/patchworks/__init__.py +0 -0
- {patchworks-1.4.1 → patchworks-1.4.2}/src/patchworks/_chunks.py +0 -0
- {patchworks-1.4.1 → patchworks-1.4.2}/src/patchworks/_cluster.py +0 -0
- {patchworks-1.4.1 → patchworks-1.4.2}/src/patchworks/_core.py +0 -0
- {patchworks-1.4.1 → patchworks-1.4.2}/src/patchworks/_distributed.py +0 -0
- {patchworks-1.4.1 → patchworks-1.4.2}/src/patchworks/_io.py +0 -0
- {patchworks-1.4.1 → patchworks-1.4.2}/src/patchworks/_merge.py +0 -0
- {patchworks-1.4.1 → patchworks-1.4.2}/src/patchworks/_postprocess.py +0 -0
- {patchworks-1.4.1 → patchworks-1.4.2}/src/patchworks/_relabel.py +0 -0
- {patchworks-1.4.1 → patchworks-1.4.2}/src/patchworks/_relations.py +0 -0
- {patchworks-1.4.1 → patchworks-1.4.2}/src/patchworks/plugins/__init__.py +0 -0
- {patchworks-1.4.1 → patchworks-1.4.2}/src/patchworks/plugins/cellpose.py +0 -0
- {patchworks-1.4.1 → patchworks-1.4.2}/src/patchworks/plugins/dog.py +0 -0
- {patchworks-1.4.1 → patchworks-1.4.2}/src/patchworks/plugins/napari.py +0 -0
- {patchworks-1.4.1 → patchworks-1.4.2}/tests/test_core.py +0 -0
- {patchworks-1.4.1 → patchworks-1.4.2}/tests/test_distributed.py +0 -0
- {patchworks-1.4.1 → patchworks-1.4.2}/tests/test_dog.py +0 -0
- {patchworks-1.4.1 → patchworks-1.4.2}/tests/test_napari.py +0 -0
- {patchworks-1.4.1 → patchworks-1.4.2}/tests/test_postprocess.py +0 -0
- {patchworks-1.4.1 → patchworks-1.4.2}/tests/test_relations.py +0 -0
- {patchworks-1.4.1 → patchworks-1.4.2}/workflow/README.md +0 -0
- {patchworks-1.4.1 → patchworks-1.4.2}/workflow/Snakefile +0 -0
- {patchworks-1.4.1 → patchworks-1.4.2}/workflow/config/config.yaml +0 -0
- {patchworks-1.4.1 → patchworks-1.4.2}/workflow/config/config_cilia.yaml +0 -0
- {patchworks-1.4.1 → patchworks-1.4.2}/workflow/config/config_cyto.yaml +0 -0
- {patchworks-1.4.1 → patchworks-1.4.2}/workflow/config/config_nuclei.yaml +0 -0
- {patchworks-1.4.1 → patchworks-1.4.2}/workflow/config/multi.yaml +0 -0
- {patchworks-1.4.1 → patchworks-1.4.2}/workflow/pixi.toml +0 -0
- {patchworks-1.4.1 → patchworks-1.4.2}/workflow/profile/slurm/config.yaml +0 -0
- {patchworks-1.4.1 → patchworks-1.4.2}/workflow/rules/common.smk +0 -0
- {patchworks-1.4.1 → patchworks-1.4.2}/workflow/rules/convert.smk +0 -0
- {patchworks-1.4.1 → patchworks-1.4.2}/workflow/rules/merge.smk +0 -0
- {patchworks-1.4.1 → patchworks-1.4.2}/workflow/rules/segment.smk +0 -0
- {patchworks-1.4.1 → patchworks-1.4.2}/workflow/scripts/_pw.py +0 -0
- {patchworks-1.4.1 → patchworks-1.4.2}/workflow/scripts/convert.py +0 -0
- {patchworks-1.4.1 → patchworks-1.4.2}/workflow/scripts/fetch_model.py +0 -0
- {patchworks-1.4.1 → patchworks-1.4.2}/workflow/scripts/merge.py +0 -0
- {patchworks-1.4.1 → patchworks-1.4.2}/workflow/scripts/prepare_tiles.py +0 -0
- {patchworks-1.4.1 → patchworks-1.4.2}/workflow/scripts/run_multi.py +0 -0
- {patchworks-1.4.1 → patchworks-1.4.2}/workflow/scripts/segment_tile.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: patchworks
|
|
3
|
-
Version: 1.4.
|
|
3
|
+
Version: 1.4.2
|
|
4
4
|
Summary: Tiled processing of arbitrarily large images with globally consistent labels
|
|
5
5
|
Project-URL: Homepage, https://github.com/imcf/patchworks
|
|
6
6
|
Project-URL: Issues, https://github.com/imcf/patchworks/issues
|
|
@@ -725,7 +725,21 @@ def _open_tiff_sequence(
|
|
|
725
725
|
) from exc
|
|
726
726
|
|
|
727
727
|
ts = tifffile.TiffSequence(pattern, pattern=sequence_pattern)
|
|
728
|
+
|
|
729
|
+
# Each file should be a single 2D (y, x) plane, but tifffile.imread can
|
|
730
|
+
# report extra leading singleton dims (e.g. a page/sample axis) even for
|
|
731
|
+
# a plain single-page TIFF — drop those so one file maps to exactly (y, x).
|
|
732
|
+
chunkshape = tifffile.imread(ts[0]).shape
|
|
733
|
+
lead = len(chunkshape) - 2
|
|
734
|
+
if lead < 0 or any(s != 1 for s in chunkshape[:lead]):
|
|
735
|
+
raise ValueError(
|
|
736
|
+
f"expected single 2D (y, x) planes per file, got shape "
|
|
737
|
+
f"{chunkshape} for {ts[0]!r}"
|
|
738
|
+
)
|
|
739
|
+
|
|
728
740
|
arr = da.from_zarr(zarr.open(store=ts.aszarr()))
|
|
741
|
+
if lead:
|
|
742
|
+
arr = arr[(slice(None),) * len(ts.axes) + (0,) * lead]
|
|
729
743
|
full_axes = ts.axes.lower() + "yx"
|
|
730
744
|
|
|
731
745
|
# Canonicalise to patchworks' tczyx axis order regardless of the order
|
|
@@ -122,12 +122,18 @@ def test_tiff_sequence_conversion(tmp_path):
|
|
|
122
122
|
|
|
123
123
|
|
|
124
124
|
def test_tiff_sequence_drops_singleton_time_axis(tmp_path):
|
|
125
|
-
"""A constant T in the pattern is dropped, keeping channel at axis 0.
|
|
125
|
+
"""A constant T in the pattern is dropped, keeping channel at axis 0.
|
|
126
|
+
|
|
127
|
+
Each file's own array has leading singleton dims (1, 1, y, x) — what
|
|
128
|
+
tifffile.imread reports even for a plain single-page TIFF in practice —
|
|
129
|
+
to make sure those get stripped instead of being mistaken for real
|
|
130
|
+
sequence axes.
|
|
131
|
+
"""
|
|
126
132
|
tifffile = pytest.importorskip("tifffile")
|
|
127
133
|
n_z, n_c, size = 2, 3, 8
|
|
128
134
|
for z in range(n_z):
|
|
129
135
|
for c in range(n_c):
|
|
130
|
-
img = np.full((size, size), z * 10 + c, dtype="uint16")
|
|
136
|
+
img = np.full((1, 1, size, size), z * 10 + c, dtype="uint16")
|
|
131
137
|
tifffile.imwrite(tmp_path / f"sample_T0_Z{z:03d}_C{c}_V0.tif", img)
|
|
132
138
|
|
|
133
139
|
out = tmp_path / "out.zarr"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|