patchworks 1.4.1__tar.gz → 1.4.3__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.3}/PKG-INFO +1 -1
- {patchworks-1.4.1 → patchworks-1.4.3}/src/patchworks/plugins/ome_zarr.py +18 -0
- {patchworks-1.4.1 → patchworks-1.4.3}/tests/test_ome_zarr.py +8 -2
- {patchworks-1.4.1 → patchworks-1.4.3}/.github/workflows/docs.yml +0 -0
- {patchworks-1.4.1 → patchworks-1.4.3}/.github/workflows/lint.yml +0 -0
- {patchworks-1.4.1 → patchworks-1.4.3}/.github/workflows/release.yml +0 -0
- {patchworks-1.4.1 → patchworks-1.4.3}/.gitignore +0 -0
- {patchworks-1.4.1 → patchworks-1.4.3}/.markdownlint-cli2.yaml +0 -0
- {patchworks-1.4.1 → patchworks-1.4.3}/LICENSE +0 -0
- {patchworks-1.4.1 → patchworks-1.4.3}/README.md +0 -0
- {patchworks-1.4.1 → patchworks-1.4.3}/cliff.toml +0 -0
- {patchworks-1.4.1 → patchworks-1.4.3}/docs/api/chunks.md +0 -0
- {patchworks-1.4.1 → patchworks-1.4.3}/docs/api/cluster.md +0 -0
- {patchworks-1.4.1 → patchworks-1.4.3}/docs/api/io.md +0 -0
- {patchworks-1.4.1 → patchworks-1.4.3}/docs/api/merge_tile_labels.md +0 -0
- {patchworks-1.4.1 → patchworks-1.4.3}/docs/api/plugins/cellpose.md +0 -0
- {patchworks-1.4.1 → patchworks-1.4.3}/docs/api/plugins/dog.md +0 -0
- {patchworks-1.4.1 → patchworks-1.4.3}/docs/api/plugins/napari.md +0 -0
- {patchworks-1.4.1 → patchworks-1.4.3}/docs/api/plugins/ome_zarr.md +0 -0
- {patchworks-1.4.1 → patchworks-1.4.3}/docs/api/postprocess.md +0 -0
- {patchworks-1.4.1 → patchworks-1.4.3}/docs/api/relabel.md +0 -0
- {patchworks-1.4.1 → patchworks-1.4.3}/docs/api/tile_process.md +0 -0
- {patchworks-1.4.1 → patchworks-1.4.3}/docs/assets/logo.png +0 -0
- {patchworks-1.4.1 → patchworks-1.4.3}/docs/examples/cellpose_2d.md +0 -0
- {patchworks-1.4.1 → patchworks-1.4.3}/docs/examples/cellpose_2d.py +0 -0
- {patchworks-1.4.1 → patchworks-1.4.3}/docs/examples/cellpose_3d.md +0 -0
- {patchworks-1.4.1 → patchworks-1.4.3}/docs/examples/cellpose_3d.py +0 -0
- {patchworks-1.4.1 → patchworks-1.4.3}/docs/examples/custom.md +0 -0
- {patchworks-1.4.1 → patchworks-1.4.3}/docs/examples/custom_method.py +0 -0
- {patchworks-1.4.1 → patchworks-1.4.3}/docs/examples/dog.md +0 -0
- {patchworks-1.4.1 → patchworks-1.4.3}/docs/examples/dog.py +0 -0
- {patchworks-1.4.1 → patchworks-1.4.3}/docs/examples/standalone_merge.md +0 -0
- {patchworks-1.4.1 → patchworks-1.4.3}/docs/examples/stardist.md +0 -0
- {patchworks-1.4.1 → patchworks-1.4.3}/docs/examples/stardist_2d.py +0 -0
- {patchworks-1.4.1 → patchworks-1.4.3}/docs/getting_started.md +0 -0
- {patchworks-1.4.1 → patchworks-1.4.3}/docs/guide/custom_segmentation.md +0 -0
- {patchworks-1.4.1 → patchworks-1.4.3}/docs/guide/gpu_distributed.md +0 -0
- {patchworks-1.4.1 → patchworks-1.4.3}/docs/guide/label_relations.md +0 -0
- {patchworks-1.4.1 → patchworks-1.4.3}/docs/guide/measurements.md +0 -0
- {patchworks-1.4.1 → patchworks-1.4.3}/docs/guide/merging.md +0 -0
- {patchworks-1.4.1 → patchworks-1.4.3}/docs/guide/ome_zarr_napari.md +0 -0
- {patchworks-1.4.1 → patchworks-1.4.3}/docs/guide/performance.md +0 -0
- {patchworks-1.4.1 → patchworks-1.4.3}/docs/guide/pitfalls.md +0 -0
- {patchworks-1.4.1 → patchworks-1.4.3}/docs/guide/skip_empty.md +0 -0
- {patchworks-1.4.1 → patchworks-1.4.3}/docs/guide/snakemake.md +0 -0
- {patchworks-1.4.1 → patchworks-1.4.3}/docs/guide/tiling.md +0 -0
- {patchworks-1.4.1 → patchworks-1.4.3}/docs/index.md +0 -0
- {patchworks-1.4.1 → patchworks-1.4.3}/mkdocs.yml +0 -0
- {patchworks-1.4.1 → patchworks-1.4.3}/pyproject.toml +0 -0
- {patchworks-1.4.1 → patchworks-1.4.3}/src/patchworks/__init__.py +0 -0
- {patchworks-1.4.1 → patchworks-1.4.3}/src/patchworks/_chunks.py +0 -0
- {patchworks-1.4.1 → patchworks-1.4.3}/src/patchworks/_cluster.py +0 -0
- {patchworks-1.4.1 → patchworks-1.4.3}/src/patchworks/_core.py +0 -0
- {patchworks-1.4.1 → patchworks-1.4.3}/src/patchworks/_distributed.py +0 -0
- {patchworks-1.4.1 → patchworks-1.4.3}/src/patchworks/_io.py +0 -0
- {patchworks-1.4.1 → patchworks-1.4.3}/src/patchworks/_merge.py +0 -0
- {patchworks-1.4.1 → patchworks-1.4.3}/src/patchworks/_postprocess.py +0 -0
- {patchworks-1.4.1 → patchworks-1.4.3}/src/patchworks/_relabel.py +0 -0
- {patchworks-1.4.1 → patchworks-1.4.3}/src/patchworks/_relations.py +0 -0
- {patchworks-1.4.1 → patchworks-1.4.3}/src/patchworks/plugins/__init__.py +0 -0
- {patchworks-1.4.1 → patchworks-1.4.3}/src/patchworks/plugins/cellpose.py +0 -0
- {patchworks-1.4.1 → patchworks-1.4.3}/src/patchworks/plugins/dog.py +0 -0
- {patchworks-1.4.1 → patchworks-1.4.3}/src/patchworks/plugins/napari.py +0 -0
- {patchworks-1.4.1 → patchworks-1.4.3}/tests/test_core.py +0 -0
- {patchworks-1.4.1 → patchworks-1.4.3}/tests/test_distributed.py +0 -0
- {patchworks-1.4.1 → patchworks-1.4.3}/tests/test_dog.py +0 -0
- {patchworks-1.4.1 → patchworks-1.4.3}/tests/test_napari.py +0 -0
- {patchworks-1.4.1 → patchworks-1.4.3}/tests/test_postprocess.py +0 -0
- {patchworks-1.4.1 → patchworks-1.4.3}/tests/test_relations.py +0 -0
- {patchworks-1.4.1 → patchworks-1.4.3}/workflow/README.md +0 -0
- {patchworks-1.4.1 → patchworks-1.4.3}/workflow/Snakefile +0 -0
- {patchworks-1.4.1 → patchworks-1.4.3}/workflow/config/config.yaml +0 -0
- {patchworks-1.4.1 → patchworks-1.4.3}/workflow/config/config_cilia.yaml +0 -0
- {patchworks-1.4.1 → patchworks-1.4.3}/workflow/config/config_cyto.yaml +0 -0
- {patchworks-1.4.1 → patchworks-1.4.3}/workflow/config/config_nuclei.yaml +0 -0
- {patchworks-1.4.1 → patchworks-1.4.3}/workflow/config/multi.yaml +0 -0
- {patchworks-1.4.1 → patchworks-1.4.3}/workflow/pixi.toml +0 -0
- {patchworks-1.4.1 → patchworks-1.4.3}/workflow/profile/slurm/config.yaml +0 -0
- {patchworks-1.4.1 → patchworks-1.4.3}/workflow/rules/common.smk +0 -0
- {patchworks-1.4.1 → patchworks-1.4.3}/workflow/rules/convert.smk +0 -0
- {patchworks-1.4.1 → patchworks-1.4.3}/workflow/rules/merge.smk +0 -0
- {patchworks-1.4.1 → patchworks-1.4.3}/workflow/rules/segment.smk +0 -0
- {patchworks-1.4.1 → patchworks-1.4.3}/workflow/scripts/_pw.py +0 -0
- {patchworks-1.4.1 → patchworks-1.4.3}/workflow/scripts/convert.py +0 -0
- {patchworks-1.4.1 → patchworks-1.4.3}/workflow/scripts/fetch_model.py +0 -0
- {patchworks-1.4.1 → patchworks-1.4.3}/workflow/scripts/merge.py +0 -0
- {patchworks-1.4.1 → patchworks-1.4.3}/workflow/scripts/prepare_tiles.py +0 -0
- {patchworks-1.4.1 → patchworks-1.4.3}/workflow/scripts/run_multi.py +0 -0
- {patchworks-1.4.1 → patchworks-1.4.3}/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.3
|
|
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,25 @@ 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 singleton dims — leading, trailing, or both (e.g. a stray
|
|
731
|
+
# page or samples-per-pixel axis) — even for a plain single-page TIFF.
|
|
732
|
+
# Drop whichever ones are singleton so one file maps to exactly (y, x).
|
|
733
|
+
chunkshape = tifffile.imread(ts[0]).shape
|
|
734
|
+
keep_chunk = [i for i, s in enumerate(chunkshape) if s != 1]
|
|
735
|
+
if len(keep_chunk) != 2:
|
|
736
|
+
raise ValueError(
|
|
737
|
+
f"expected single 2D (y, x) planes per file, got shape "
|
|
738
|
+
f"{chunkshape} for {ts[0]!r}"
|
|
739
|
+
)
|
|
740
|
+
|
|
728
741
|
arr = da.from_zarr(zarr.open(store=ts.aszarr()))
|
|
742
|
+
n_seq = len(ts.axes)
|
|
743
|
+
index = tuple(
|
|
744
|
+
slice(None) if i in keep_chunk else 0 for i in range(len(chunkshape))
|
|
745
|
+
)
|
|
746
|
+
arr = arr[(slice(None),) * n_seq + index]
|
|
729
747
|
full_axes = ts.axes.lower() + "yx"
|
|
730
748
|
|
|
731
749
|
# 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
|