patchworks 0.11.8__tar.gz → 0.11.10__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-0.11.8 → patchworks-0.11.10}/PKG-INFO +11 -1
- {patchworks-0.11.8 → patchworks-0.11.10}/README.md +4 -0
- patchworks-0.11.10/docs/assets/logo.png +0 -0
- {patchworks-0.11.8 → patchworks-0.11.10}/docs/index.md +4 -0
- {patchworks-0.11.8 → patchworks-0.11.10}/mkdocs.yml +2 -0
- {patchworks-0.11.8 → patchworks-0.11.10}/pyproject.toml +10 -1
- {patchworks-0.11.8 → patchworks-0.11.10}/src/patchworks/plugins/napari.py +25 -2
- {patchworks-0.11.8 → patchworks-0.11.10}/.github/workflows/docs.yml +0 -0
- {patchworks-0.11.8 → patchworks-0.11.10}/.github/workflows/lint.yml +0 -0
- {patchworks-0.11.8 → patchworks-0.11.10}/.github/workflows/release.yml +0 -0
- {patchworks-0.11.8 → patchworks-0.11.10}/.gitignore +0 -0
- {patchworks-0.11.8 → patchworks-0.11.10}/.markdownlint-cli2.yaml +0 -0
- {patchworks-0.11.8 → patchworks-0.11.10}/cliff.toml +0 -0
- {patchworks-0.11.8 → patchworks-0.11.10}/docs/api/chunks.md +0 -0
- {patchworks-0.11.8 → patchworks-0.11.10}/docs/api/cluster.md +0 -0
- {patchworks-0.11.8 → patchworks-0.11.10}/docs/api/io.md +0 -0
- {patchworks-0.11.8 → patchworks-0.11.10}/docs/api/merge_tile_labels.md +0 -0
- {patchworks-0.11.8 → patchworks-0.11.10}/docs/api/plugins/cellpose.md +0 -0
- {patchworks-0.11.8 → patchworks-0.11.10}/docs/api/plugins/napari.md +0 -0
- {patchworks-0.11.8 → patchworks-0.11.10}/docs/api/plugins/ome_zarr.md +0 -0
- {patchworks-0.11.8 → patchworks-0.11.10}/docs/api/relabel.md +0 -0
- {patchworks-0.11.8 → patchworks-0.11.10}/docs/api/tile_process.md +0 -0
- {patchworks-0.11.8 → patchworks-0.11.10}/docs/examples/cellpose_2d.md +0 -0
- {patchworks-0.11.8 → patchworks-0.11.10}/docs/examples/cellpose_2d.py +0 -0
- {patchworks-0.11.8 → patchworks-0.11.10}/docs/examples/cellpose_3d.md +0 -0
- {patchworks-0.11.8 → patchworks-0.11.10}/docs/examples/cellpose_3d.py +0 -0
- {patchworks-0.11.8 → patchworks-0.11.10}/docs/examples/custom.md +0 -0
- {patchworks-0.11.8 → patchworks-0.11.10}/docs/examples/custom_method.py +0 -0
- {patchworks-0.11.8 → patchworks-0.11.10}/docs/examples/standalone_merge.md +0 -0
- {patchworks-0.11.8 → patchworks-0.11.10}/docs/examples/stardist.md +0 -0
- {patchworks-0.11.8 → patchworks-0.11.10}/docs/examples/stardist_2d.py +0 -0
- {patchworks-0.11.8 → patchworks-0.11.10}/docs/getting_started.md +0 -0
- {patchworks-0.11.8 → patchworks-0.11.10}/docs/guide/gpu_distributed.md +0 -0
- {patchworks-0.11.8 → patchworks-0.11.10}/docs/guide/merging.md +0 -0
- {patchworks-0.11.8 → patchworks-0.11.10}/docs/guide/ome_zarr_napari.md +0 -0
- {patchworks-0.11.8 → patchworks-0.11.10}/docs/guide/performance.md +0 -0
- {patchworks-0.11.8 → patchworks-0.11.10}/docs/guide/pitfalls.md +0 -0
- {patchworks-0.11.8 → patchworks-0.11.10}/docs/guide/skip_empty.md +0 -0
- {patchworks-0.11.8 → patchworks-0.11.10}/docs/guide/snakemake.md +0 -0
- {patchworks-0.11.8 → patchworks-0.11.10}/docs/guide/tiling.md +0 -0
- {patchworks-0.11.8 → patchworks-0.11.10}/src/patchworks/__init__.py +0 -0
- {patchworks-0.11.8 → patchworks-0.11.10}/src/patchworks/_chunks.py +0 -0
- {patchworks-0.11.8 → patchworks-0.11.10}/src/patchworks/_cluster.py +0 -0
- {patchworks-0.11.8 → patchworks-0.11.10}/src/patchworks/_core.py +0 -0
- {patchworks-0.11.8 → patchworks-0.11.10}/src/patchworks/_distributed.py +0 -0
- {patchworks-0.11.8 → patchworks-0.11.10}/src/patchworks/_io.py +0 -0
- {patchworks-0.11.8 → patchworks-0.11.10}/src/patchworks/_merge.py +0 -0
- {patchworks-0.11.8 → patchworks-0.11.10}/src/patchworks/_relabel.py +0 -0
- {patchworks-0.11.8 → patchworks-0.11.10}/src/patchworks/plugins/__init__.py +0 -0
- {patchworks-0.11.8 → patchworks-0.11.10}/src/patchworks/plugins/cellpose.py +0 -0
- {patchworks-0.11.8 → patchworks-0.11.10}/src/patchworks/plugins/ome_zarr.py +0 -0
- {patchworks-0.11.8 → patchworks-0.11.10}/tests/test_core.py +0 -0
- {patchworks-0.11.8 → patchworks-0.11.10}/tests/test_distributed.py +0 -0
- {patchworks-0.11.8 → patchworks-0.11.10}/tests/test_napari.py +0 -0
- {patchworks-0.11.8 → patchworks-0.11.10}/tests/test_ome_zarr.py +0 -0
- {patchworks-0.11.8 → patchworks-0.11.10}/workflow/README.md +0 -0
- {patchworks-0.11.8 → patchworks-0.11.10}/workflow/Snakefile +0 -0
- {patchworks-0.11.8 → patchworks-0.11.10}/workflow/config/config.yaml +0 -0
- {patchworks-0.11.8 → patchworks-0.11.10}/workflow/pixi.toml +0 -0
- {patchworks-0.11.8 → patchworks-0.11.10}/workflow/profile/slurm/config.yaml +0 -0
- {patchworks-0.11.8 → patchworks-0.11.10}/workflow/rules/common.smk +0 -0
- {patchworks-0.11.8 → patchworks-0.11.10}/workflow/rules/convert.smk +0 -0
- {patchworks-0.11.8 → patchworks-0.11.10}/workflow/rules/merge.smk +0 -0
- {patchworks-0.11.8 → patchworks-0.11.10}/workflow/rules/segment.smk +0 -0
- {patchworks-0.11.8 → patchworks-0.11.10}/workflow/scripts/_pw.py +0 -0
- {patchworks-0.11.8 → patchworks-0.11.10}/workflow/scripts/convert.py +0 -0
- {patchworks-0.11.8 → patchworks-0.11.10}/workflow/scripts/fetch_model.py +0 -0
- {patchworks-0.11.8 → patchworks-0.11.10}/workflow/scripts/merge.py +0 -0
- {patchworks-0.11.8 → patchworks-0.11.10}/workflow/scripts/prepare_tiles.py +0 -0
- {patchworks-0.11.8 → patchworks-0.11.10}/workflow/scripts/segment_tile.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: patchworks
|
|
3
|
-
Version: 0.11.
|
|
3
|
+
Version: 0.11.10
|
|
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
|
|
@@ -29,9 +29,12 @@ Requires-Dist: bioio-lif; extra == 'all'
|
|
|
29
29
|
Requires-Dist: bioio-nd2; extra == 'all'
|
|
30
30
|
Requires-Dist: bioio-ome-tiff; extra == 'all'
|
|
31
31
|
Requires-Dist: bioio-tifffile; extra == 'all'
|
|
32
|
+
Requires-Dist: glasbey; extra == 'all'
|
|
32
33
|
Requires-Dist: imaris-ims-file-reader; extra == 'all'
|
|
34
|
+
Requires-Dist: ipykernel<7; extra == 'all'
|
|
33
35
|
Requires-Dist: lxml-html-clean; extra == 'all'
|
|
34
36
|
Requires-Dist: napari[all]>=0.5.5; extra == 'all'
|
|
37
|
+
Requires-Dist: numpy<2.5; extra == 'all'
|
|
35
38
|
Requires-Dist: nvidia-ml-py; extra == 'all'
|
|
36
39
|
Requires-Dist: psutil; extra == 'all'
|
|
37
40
|
Requires-Dist: scikit-image; extra == 'all'
|
|
@@ -63,13 +66,20 @@ Provides-Extra: io
|
|
|
63
66
|
Requires-Dist: psutil; extra == 'io'
|
|
64
67
|
Requires-Dist: tqdm; extra == 'io'
|
|
65
68
|
Provides-Extra: napari
|
|
69
|
+
Requires-Dist: glasbey; extra == 'napari'
|
|
70
|
+
Requires-Dist: ipykernel<7; extra == 'napari'
|
|
66
71
|
Requires-Dist: lxml-html-clean; extra == 'napari'
|
|
67
72
|
Requires-Dist: napari[all]>=0.5.5; extra == 'napari'
|
|
73
|
+
Requires-Dist: numpy<2.5; extra == 'napari'
|
|
68
74
|
Provides-Extra: workflow
|
|
69
75
|
Requires-Dist: snakemake-executor-plugin-slurm; extra == 'workflow'
|
|
70
76
|
Requires-Dist: snakemake>=8; extra == 'workflow'
|
|
71
77
|
Description-Content-Type: text/markdown
|
|
72
78
|
|
|
79
|
+
<p align="center">
|
|
80
|
+
<img src="docs/assets/logo.png" alt="patchworks logo" width="220">
|
|
81
|
+
</p>
|
|
82
|
+
|
|
73
83
|
# patchworks
|
|
74
84
|
|
|
75
85
|
[](https://pypi.org/project/patchworks/)
|
|
Binary file
|
|
@@ -59,9 +59,18 @@ imaris = ["imaris-ims-file-reader"]
|
|
|
59
59
|
# napari enables the interactive viewer plugin.
|
|
60
60
|
# - napari >= 0.5: NumPy 2.0 compatible (older 0.4.x uses np.array(copy=False),
|
|
61
61
|
# which raises under NumPy 2 -> ValidationError on Viewer()).
|
|
62
|
+
# - numpy < 2.5: napari/numba don't support numpy 2.5 yet.
|
|
63
|
+
# - ipykernel < 7: napari-console requires ipykernel < 7.
|
|
62
64
|
# - lxml-html-clean: napari's notebook_display imports lxml.html.clean, split
|
|
63
65
|
# into a separate package in lxml >= 5.2 (else ImportError on Viewer()).
|
|
64
|
-
|
|
66
|
+
# - glasbey: distinct high-contrast label LUTs for view_in_napari.
|
|
67
|
+
napari = [
|
|
68
|
+
"napari[all]>=0.5.5",
|
|
69
|
+
"numpy<2.5",
|
|
70
|
+
"ipykernel<7",
|
|
71
|
+
"lxml-html-clean",
|
|
72
|
+
"glasbey",
|
|
73
|
+
]
|
|
65
74
|
# workflow runs the Snakemake pipeline (per-tile SLURM jobs across GPUs).
|
|
66
75
|
workflow = ["snakemake>=8", "snakemake-executor-plugin-slurm"]
|
|
67
76
|
dev = ["pytest", "pytest-cov", "scikit-image", "psutil", "tqdm"]
|
|
@@ -199,6 +199,7 @@ def view_in_napari(
|
|
|
199
199
|
labels_component: str = "labels",
|
|
200
200
|
image_name: str = "image",
|
|
201
201
|
labels_name: str = "labels",
|
|
202
|
+
glasbey: bool = True,
|
|
202
203
|
show: bool = True,
|
|
203
204
|
**add_image_kwargs: Any,
|
|
204
205
|
):
|
|
@@ -223,6 +224,11 @@ def view_in_napari(
|
|
|
223
224
|
matching ``tile_process``'s ``output_component``).
|
|
224
225
|
image_name, labels_name : str, optional
|
|
225
226
|
Layer names shown in napari.
|
|
227
|
+
glasbey : bool, optional
|
|
228
|
+
Colour the labels with a glasbey palette (many distinct, high-contrast
|
|
229
|
+
colours, tuned to read on the dark canvas) instead of napari's default.
|
|
230
|
+
Default ``True``. Needs the ``glasbey`` package (ships with
|
|
231
|
+
``patchworks[napari]``).
|
|
226
232
|
show : bool, optional
|
|
227
233
|
Start the napari event loop (blocking). Set ``False`` in scripts/tests
|
|
228
234
|
that manage the loop themselves.
|
|
@@ -250,9 +256,24 @@ def view_in_napari(
|
|
|
250
256
|
**add_image_kwargs,
|
|
251
257
|
)
|
|
252
258
|
|
|
259
|
+
label_kwargs: dict[str, Any] = {}
|
|
260
|
+
if glasbey:
|
|
261
|
+
try:
|
|
262
|
+
import glasbey as _glasbey
|
|
263
|
+
|
|
264
|
+
# bias lighter so colours read on napari's dark canvas
|
|
265
|
+
label_kwargs["colormap"] = _glasbey.create_palette(
|
|
266
|
+
256, lightness_bounds=(40, 100)
|
|
267
|
+
)
|
|
268
|
+
except ImportError:
|
|
269
|
+
logger.warning(
|
|
270
|
+
"glasbey not installed; using napari's default label colours "
|
|
271
|
+
"(pip install glasbey, or it ships with patchworks[napari])."
|
|
272
|
+
)
|
|
273
|
+
|
|
253
274
|
if labels is not None:
|
|
254
275
|
lab = _resolve_labels(labels, labels_component)
|
|
255
|
-
viewer.add_labels(lab, name=labels_name)
|
|
276
|
+
viewer.add_labels(lab, name=labels_name, **label_kwargs)
|
|
256
277
|
elif _is_zarr(image):
|
|
257
278
|
# No labels given → auto-overlay every label image stored inside the
|
|
258
279
|
# OME-ZARR under labels/<name>/ (the default place tile_process writes
|
|
@@ -260,7 +281,9 @@ def view_in_napari(
|
|
|
260
281
|
for name in _inner_label_names(image):
|
|
261
282
|
levels = _multiscale_levels(f"{image}/labels/{name}", None)
|
|
262
283
|
lab = [lvl.astype("int32") for lvl in levels]
|
|
263
|
-
viewer.add_labels(
|
|
284
|
+
viewer.add_labels(
|
|
285
|
+
lab if len(lab) > 1 else lab[0], name=name, **label_kwargs
|
|
286
|
+
)
|
|
264
287
|
logger.info("auto-loaded labels/%s from %s", name, image)
|
|
265
288
|
|
|
266
289
|
if show:
|
|
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
|