image2image-reg 0.1.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.
- image2image_reg-0.1.10/.github/ISSUE_TEMPLATE.md +15 -0
- image2image_reg-0.1.10/.github/TEST_FAIL_TEMPLATE.md +12 -0
- image2image_reg-0.1.10/.github/dependabot.yml +10 -0
- image2image_reg-0.1.10/.github/workflows/ci.yml +117 -0
- image2image_reg-0.1.10/.pre-commit-config.yaml +50 -0
- image2image_reg-0.1.10/LICENSE +29 -0
- image2image_reg-0.1.10/MANIFEST.in +16 -0
- image2image_reg-0.1.10/Makefile +33 -0
- image2image_reg-0.1.10/PKG-INFO +150 -0
- image2image_reg-0.1.10/README.md +100 -0
- image2image_reg-0.1.10/pyproject.toml +196 -0
- image2image_reg-0.1.10/setup.cfg +4 -0
- image2image_reg-0.1.10/src/image2image_reg/__init__.py +15 -0
- image2image_reg-0.1.10/src/image2image_reg/__main__.py +19 -0
- image2image_reg-0.1.10/src/image2image_reg/_typing.py +114 -0
- image2image_reg-0.1.10/src/image2image_reg/_version.py +21 -0
- image2image_reg-0.1.10/src/image2image_reg/cli/__init__.py +121 -0
- image2image_reg-0.1.10/src/image2image_reg/cli/_common.py +352 -0
- image2image_reg-0.1.10/src/image2image_reg/cli/elastix.py +1335 -0
- image2image_reg-0.1.10/src/image2image_reg/cli/merge.py +113 -0
- image2image_reg-0.1.10/src/image2image_reg/cli/simple_valis.py +160 -0
- image2image_reg-0.1.10/src/image2image_reg/cli/valis.py +764 -0
- image2image_reg-0.1.10/src/image2image_reg/elastix/__init__.py +0 -0
- image2image_reg-0.1.10/src/image2image_reg/elastix/convert.py +90 -0
- image2image_reg-0.1.10/src/image2image_reg/elastix/figures.py +210 -0
- image2image_reg-0.1.10/src/image2image_reg/elastix/registration.py +114 -0
- image2image_reg-0.1.10/src/image2image_reg/elastix/registration_map.py +964 -0
- image2image_reg-0.1.10/src/image2image_reg/elastix/registration_utils.py +234 -0
- image2image_reg-0.1.10/src/image2image_reg/elastix/transform.py +706 -0
- image2image_reg-0.1.10/src/image2image_reg/elastix/transform_sequence.py +827 -0
- image2image_reg-0.1.10/src/image2image_reg/elastix/transform_utils.py +899 -0
- image2image_reg-0.1.10/src/image2image_reg/elastix/transformation_map.py +94 -0
- image2image_reg-0.1.10/src/image2image_reg/elastix/visuals.py +333 -0
- image2image_reg-0.1.10/src/image2image_reg/elastix/wsireg.py +62 -0
- image2image_reg-0.1.10/src/image2image_reg/enums.py +157 -0
- image2image_reg-0.1.10/src/image2image_reg/models/__init__.py +14 -0
- image2image_reg-0.1.10/src/image2image_reg/models/bbox.py +158 -0
- image2image_reg-0.1.10/src/image2image_reg/models/export.py +39 -0
- image2image_reg-0.1.10/src/image2image_reg/models/modality.py +91 -0
- image2image_reg-0.1.10/src/image2image_reg/models/preprocessing.py +489 -0
- image2image_reg-0.1.10/src/image2image_reg/preprocessing/__init__.py +0 -0
- image2image_reg-0.1.10/src/image2image_reg/preprocessing/convert.py +52 -0
- image2image_reg-0.1.10/src/image2image_reg/preprocessing/mixin.py +74 -0
- image2image_reg-0.1.10/src/image2image_reg/preprocessing/step.py +345 -0
- image2image_reg-0.1.10/src/image2image_reg/preprocessing/utilities.py +438 -0
- image2image_reg-0.1.10/src/image2image_reg/preprocessing/workflow.py +45 -0
- image2image_reg-0.1.10/src/image2image_reg/py.typed +0 -0
- image2image_reg-0.1.10/src/image2image_reg/utils/__init__.py +0 -0
- image2image_reg-0.1.10/src/image2image_reg/utils/_test.py +110 -0
- image2image_reg-0.1.10/src/image2image_reg/utils/affine.py +114 -0
- image2image_reg-0.1.10/src/image2image_reg/utils/preprocessing.py +781 -0
- image2image_reg-0.1.10/src/image2image_reg/utils/transform_utils.py +361 -0
- image2image_reg-0.1.10/src/image2image_reg/utils/utilities.py +87 -0
- image2image_reg-0.1.10/src/image2image_reg/utils/visuals.py +319 -0
- image2image_reg-0.1.10/src/image2image_reg/valis/__init__.py +0 -0
- image2image_reg-0.1.10/src/image2image_reg/valis/detect.py +280 -0
- image2image_reg-0.1.10/src/image2image_reg/valis/matcher.py +1016 -0
- image2image_reg-0.1.10/src/image2image_reg/valis/preprocessing.py +338 -0
- image2image_reg-0.1.10/src/image2image_reg/valis/slide_io.py +80 -0
- image2image_reg-0.1.10/src/image2image_reg/valis/transform.py +656 -0
- image2image_reg-0.1.10/src/image2image_reg/valis/utilities.py +315 -0
- image2image_reg-0.1.10/src/image2image_reg/workflows/__init__.py +6 -0
- image2image_reg-0.1.10/src/image2image_reg/workflows/_base.py +915 -0
- image2image_reg-0.1.10/src/image2image_reg/workflows/elastix.py +2118 -0
- image2image_reg-0.1.10/src/image2image_reg/workflows/merge.py +64 -0
- image2image_reg-0.1.10/src/image2image_reg/workflows/transform.py +91 -0
- image2image_reg-0.1.10/src/image2image_reg/workflows/valis.py +975 -0
- image2image_reg-0.1.10/src/image2image_reg/wrapper.py +308 -0
- image2image_reg-0.1.10/src/image2image_reg.egg-info/PKG-INFO +150 -0
- image2image_reg-0.1.10/src/image2image_reg.egg-info/SOURCES.txt +87 -0
- image2image_reg-0.1.10/src/image2image_reg.egg-info/dependency_links.txt +1 -0
- image2image_reg-0.1.10/src/image2image_reg.egg-info/entry_points.txt +3 -0
- image2image_reg-0.1.10/src/image2image_reg.egg-info/requires.txt +32 -0
- image2image_reg-0.1.10/src/image2image_reg.egg-info/top_level.txt +1 -0
- image2image_reg-0.1.10/tests/_test_data/complex_linear_reg_transform.json +241 -0
- image2image_reg-0.1.10/tests/_test_data/config.json +332 -0
- image2image_reg-0.1.10/tests/_test_data/ellipse_affine.json +17 -0
- image2image_reg-0.1.10/tests/_test_data/ellipse_mask.tiff +0 -0
- image2image_reg-0.1.10/tests/_test_data/ellipse_moving.tiff +0 -0
- image2image_reg-0.1.10/tests/_test_data/ellipse_target.tiff +0 -0
- image2image_reg-0.1.10/tests/_test_data/no_initial_n=2_transformations.json +163 -0
- image2image_reg-0.1.10/tests/_test_data/polygon_moving.tiff +0 -0
- image2image_reg-0.1.10/tests/_test_data/polygon_target.tiff +0 -0
- image2image_reg-0.1.10/tests/_test_data/polygons.geojson +1 -0
- image2image_reg-0.1.10/tests/test_cli.py +188 -0
- image2image_reg-0.1.10/tests/test_models.py +157 -0
- image2image_reg-0.1.10/tests/test_preprocessing.py +238 -0
- image2image_reg-0.1.10/tests/test_register.py +129 -0
- image2image_reg-0.1.10/tests/test_transform_sequence.py +32 -0
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
* image2image-reg version:
|
|
2
|
+
* Python version:
|
|
3
|
+
* Operating System:
|
|
4
|
+
|
|
5
|
+
### Description
|
|
6
|
+
|
|
7
|
+
Describe what you were trying to get done.
|
|
8
|
+
Tell us what happened, what went wrong, and what you expected to happen.
|
|
9
|
+
|
|
10
|
+
### What I Did
|
|
11
|
+
|
|
12
|
+
```
|
|
13
|
+
Paste the command(s) you ran and the output.
|
|
14
|
+
If there was a crash, please include the traceback here.
|
|
15
|
+
```
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "{{ env.TITLE }}"
|
|
3
|
+
labels: [bug]
|
|
4
|
+
---
|
|
5
|
+
The {{ workflow }} workflow failed on {{ date | date("YYYY-MM-DD HH:mm") }} UTC
|
|
6
|
+
|
|
7
|
+
The most recent failing test was on {{ env.PLATFORM }} py{{ env.PYTHON }}
|
|
8
|
+
with commit: {{ sha }}
|
|
9
|
+
|
|
10
|
+
Full run: https://github.com/{{ repo }}/actions/runs/{{ env.RUN_ID }}
|
|
11
|
+
|
|
12
|
+
(This post will be updated if another test fails, as long as this issue remains open.)
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
|
|
2
|
+
|
|
3
|
+
version: 2
|
|
4
|
+
updates:
|
|
5
|
+
- package-ecosystem: "github-actions"
|
|
6
|
+
directory: "/"
|
|
7
|
+
schedule:
|
|
8
|
+
interval: "weekly"
|
|
9
|
+
commit-message:
|
|
10
|
+
prefix: "ci(dependabot):"
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- main
|
|
7
|
+
tags:
|
|
8
|
+
- "v*"
|
|
9
|
+
pull_request:
|
|
10
|
+
workflow_dispatch:
|
|
11
|
+
schedule:
|
|
12
|
+
- cron: "0 0 * * 0" # every week (for --pre release tests)
|
|
13
|
+
|
|
14
|
+
concurrency:
|
|
15
|
+
group: ${{ github.workflow }}-${{ github.ref }}
|
|
16
|
+
cancel-in-progress: true
|
|
17
|
+
|
|
18
|
+
jobs:
|
|
19
|
+
check-manifest:
|
|
20
|
+
runs-on: ubuntu-latest
|
|
21
|
+
steps:
|
|
22
|
+
- uses: actions/checkout@v4
|
|
23
|
+
- run: pipx run check-manifest
|
|
24
|
+
|
|
25
|
+
test:
|
|
26
|
+
uses: pyapp-kit/workflows/.github/workflows/test-pyrepo.yml@v2
|
|
27
|
+
secrets: inherit
|
|
28
|
+
with:
|
|
29
|
+
os: ${{ matrix.os }}
|
|
30
|
+
python-version: ${{ matrix.python-version }}
|
|
31
|
+
pip-install-pre-release: ${{ github.event_name == 'schedule' }}
|
|
32
|
+
report-failures: ${{ github.event_name == 'schedule' }}
|
|
33
|
+
extras: 'test'
|
|
34
|
+
# changing this to "artifact" prevents uploading to codecov here,
|
|
35
|
+
# instead it uploads an artifact with the coverage data
|
|
36
|
+
coverage-upload: artifact
|
|
37
|
+
strategy:
|
|
38
|
+
fail-fast: false
|
|
39
|
+
matrix:
|
|
40
|
+
os: [ubuntu-latest, windows-latest]
|
|
41
|
+
python-version: ["3.10", "3.11", "3.12"]#, "3.13"]
|
|
42
|
+
include:
|
|
43
|
+
- python-version: "3.9"
|
|
44
|
+
os: ubuntu-latest
|
|
45
|
+
- python-version: "3.9"
|
|
46
|
+
os: macos-13
|
|
47
|
+
- python-version: "3.11"
|
|
48
|
+
os: macos-latest
|
|
49
|
+
- python-version: "3.12"
|
|
50
|
+
os: macos-latest
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
# now add another job to combine and upload the coverage
|
|
54
|
+
upload_coverage:
|
|
55
|
+
if: always()
|
|
56
|
+
needs: [test]
|
|
57
|
+
uses: pyapp-kit/workflows/.github/workflows/upload-coverage.yml@v2
|
|
58
|
+
secrets:
|
|
59
|
+
codecov_token: ${{ secrets.CODECOV_TOKEN }}
|
|
60
|
+
|
|
61
|
+
deploy_test:
|
|
62
|
+
name: Deploy to PyPI (test)
|
|
63
|
+
needs: [check-manifest, test]
|
|
64
|
+
if: success() && startsWith(github.ref, 'refs/tags/') && github.event_name != 'schedule'
|
|
65
|
+
runs-on: ubuntu-latest
|
|
66
|
+
|
|
67
|
+
steps:
|
|
68
|
+
- uses: actions/checkout@v4
|
|
69
|
+
|
|
70
|
+
- name: Set up Python
|
|
71
|
+
uses: actions/setup-python@v5
|
|
72
|
+
with:
|
|
73
|
+
python-version: "3.x"
|
|
74
|
+
|
|
75
|
+
- name: install
|
|
76
|
+
run: |
|
|
77
|
+
pip install -U pip build twine
|
|
78
|
+
python -m build
|
|
79
|
+
twine check dist/*
|
|
80
|
+
|
|
81
|
+
- name: Build and publish
|
|
82
|
+
run: twine upload --repository testpypi dist/*
|
|
83
|
+
env:
|
|
84
|
+
TWINE_USERNAME: __token__
|
|
85
|
+
TWINE_PASSWORD: ${{ secrets.TEST_PYPI_TOKEN }}
|
|
86
|
+
|
|
87
|
+
deploy:
|
|
88
|
+
name: Deploy
|
|
89
|
+
needs: [check-manifest, test, deploy_test]
|
|
90
|
+
if: success() && startsWith(github.ref, 'refs/tags/') && github.event_name != 'schedule'
|
|
91
|
+
runs-on: ubuntu-latest
|
|
92
|
+
|
|
93
|
+
steps:
|
|
94
|
+
- uses: actions/checkout@v4
|
|
95
|
+
|
|
96
|
+
- name: Set up Python
|
|
97
|
+
uses: actions/setup-python@v5
|
|
98
|
+
with:
|
|
99
|
+
python-version: "3.x"
|
|
100
|
+
|
|
101
|
+
- name: install
|
|
102
|
+
run: |
|
|
103
|
+
git tag
|
|
104
|
+
pip install -U pip build twine
|
|
105
|
+
python -m build
|
|
106
|
+
twine check dist/*
|
|
107
|
+
ls -lh dist
|
|
108
|
+
|
|
109
|
+
- name: Build and publish
|
|
110
|
+
run: twine upload dist/*
|
|
111
|
+
env:
|
|
112
|
+
TWINE_USERNAME: __token__
|
|
113
|
+
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
|
|
114
|
+
|
|
115
|
+
- uses: softprops/action-gh-release@v2
|
|
116
|
+
with:
|
|
117
|
+
generate_release_notes: true
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
ci:
|
|
2
|
+
autoupdate_schedule: monthly
|
|
3
|
+
autofix_commit_msg: "style(pre-commit.ci): auto fixes [...]"
|
|
4
|
+
autoupdate_commit_msg: "ci(pre-commit.ci): autoupdate"
|
|
5
|
+
|
|
6
|
+
default_install_hook_types: [pre-commit, commit-msg]
|
|
7
|
+
|
|
8
|
+
repos:
|
|
9
|
+
# - repo: https://github.com/pre-commit/pre-commit-hooks
|
|
10
|
+
# rev: v4.4.0
|
|
11
|
+
# hooks:
|
|
12
|
+
# - id: no-commit-to-branch
|
|
13
|
+
# args: ['--branch', 'master', "--branch", "main"]
|
|
14
|
+
|
|
15
|
+
- repo: https://github.com/MarcoGorelli/absolufy-imports
|
|
16
|
+
rev: v0.3.1
|
|
17
|
+
hooks:
|
|
18
|
+
- id: absolufy-imports
|
|
19
|
+
exclude: _vendor|vendored
|
|
20
|
+
|
|
21
|
+
- repo: https://github.com/hadialqattan/pycln
|
|
22
|
+
rev: v2.1.3
|
|
23
|
+
hooks:
|
|
24
|
+
- id: pycln
|
|
25
|
+
|
|
26
|
+
- repo: https://github.com/abravalheri/validate-pyproject
|
|
27
|
+
rev: v0.12.1
|
|
28
|
+
hooks:
|
|
29
|
+
- id: validate-pyproject
|
|
30
|
+
|
|
31
|
+
- repo: https://github.com/psf/black
|
|
32
|
+
rev: 23.1.0
|
|
33
|
+
hooks:
|
|
34
|
+
- id: black
|
|
35
|
+
pass_filenames: true
|
|
36
|
+
|
|
37
|
+
- repo: https://github.com/charliermarsh/ruff-pre-commit
|
|
38
|
+
rev: v0.0.252
|
|
39
|
+
hooks:
|
|
40
|
+
- id: ruff
|
|
41
|
+
args: [--fix]
|
|
42
|
+
|
|
43
|
+
# - repo: https://github.com/pre-commit/mirrors-mypy
|
|
44
|
+
# rev: v1.0.1
|
|
45
|
+
# hooks:
|
|
46
|
+
# - id: mypy
|
|
47
|
+
# files: "^src/"
|
|
48
|
+
# # # you have to add the things you want to type check against here
|
|
49
|
+
# # additional_dependencies:
|
|
50
|
+
# # - numpy
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
BSD License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2023, Lukasz G. Migas
|
|
4
|
+
All rights reserved.
|
|
5
|
+
|
|
6
|
+
Redistribution and use in source and binary forms, with or without
|
|
7
|
+
modification, are permitted provided that the following conditions are met:
|
|
8
|
+
|
|
9
|
+
1. Redistributions of source code must retain the above copyright notice, this
|
|
10
|
+
list of conditions and the following disclaimer.
|
|
11
|
+
|
|
12
|
+
2. Redistributions in binary form must reproduce the above copyright notice,
|
|
13
|
+
this list of conditions and the following disclaimer in the documentation
|
|
14
|
+
and/or other materials provided with the distribution.
|
|
15
|
+
|
|
16
|
+
3. Neither the name of the copyright holder nor the names of its
|
|
17
|
+
contributors may be used to endorse or promote products derived from
|
|
18
|
+
this software without specific prior written permission.
|
|
19
|
+
|
|
20
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
21
|
+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
22
|
+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
23
|
+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
24
|
+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
25
|
+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
26
|
+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
27
|
+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
28
|
+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
29
|
+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# Things to always exclude
|
|
2
|
+
global-exclude .git*
|
|
3
|
+
global-exclude .ipynb_checkpoints
|
|
4
|
+
global-exclude *.py[co]
|
|
5
|
+
recursive-exclude * __pycache__
|
|
6
|
+
recursive-exclude * *.py[co]
|
|
7
|
+
|
|
8
|
+
# Top-level config
|
|
9
|
+
include MANIFEST.in
|
|
10
|
+
include LICENSE
|
|
11
|
+
recursive-include tests *
|
|
12
|
+
recursive-include src *.typed
|
|
13
|
+
|
|
14
|
+
# Always include
|
|
15
|
+
global-include *.pyx
|
|
16
|
+
global-include *.c
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
.PHONY: pre watch dist settings-schema untrack
|
|
2
|
+
|
|
3
|
+
# note: much faster to run mypy as daemon,
|
|
4
|
+
# dmypy run -- ...
|
|
5
|
+
# https://mypy.readthedocs.io/en/stable/mypy_daemon.html
|
|
6
|
+
typecheck:
|
|
7
|
+
tox -e mypy
|
|
8
|
+
|
|
9
|
+
check-manifest:
|
|
10
|
+
pip install -U check-manifest
|
|
11
|
+
check-manifest
|
|
12
|
+
|
|
13
|
+
dist: check-manifest
|
|
14
|
+
pip install -U build
|
|
15
|
+
python -m build
|
|
16
|
+
|
|
17
|
+
pre:
|
|
18
|
+
pre-commit run -a
|
|
19
|
+
|
|
20
|
+
# If the first argument is "watch"...
|
|
21
|
+
ifeq (watch,$(firstword $(MAKECMDGOALS)))
|
|
22
|
+
# use the rest as arguments for "watch"
|
|
23
|
+
WATCH_ARGS := $(wordlist 2,$(words $(MAKECMDGOALS)),$(MAKECMDGOALS))
|
|
24
|
+
# ...and turn them into do-nothing targets
|
|
25
|
+
$(eval $(WATCH_ARGS):;@:)
|
|
26
|
+
endif
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
.PHONY: untrack
|
|
30
|
+
untrack:
|
|
31
|
+
git rm -r --cached .
|
|
32
|
+
git add .
|
|
33
|
+
git commit -m ".gitignore fix"
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: image2image-reg
|
|
3
|
+
Version: 0.1.10
|
|
4
|
+
Summary: Whole slide image registration using elastix.
|
|
5
|
+
Author-email: "Lukasz G. Migas" <lukas.migas@yahoo.com>
|
|
6
|
+
License: BSD 3-Clause License
|
|
7
|
+
Project-URL: homepage, https://github.com/vandeplaslab/image2image-reg
|
|
8
|
+
Project-URL: repository, https://github.com/vandeplaslab/image2image-reg
|
|
9
|
+
Classifier: Development Status :: 3 - Alpha
|
|
10
|
+
Classifier: License :: OSI Approved :: BSD License
|
|
11
|
+
Classifier: Natural Language :: English
|
|
12
|
+
Classifier: Programming Language :: Python :: 3
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.8
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
16
|
+
Classifier: Typing :: Typed
|
|
17
|
+
Requires-Python: >=3.8
|
|
18
|
+
Description-Content-Type: text/markdown
|
|
19
|
+
License-File: LICENSE
|
|
20
|
+
Requires-Dist: pydantic>=2
|
|
21
|
+
Requires-Dist: numpy
|
|
22
|
+
Requires-Dist: itk-elastix
|
|
23
|
+
Requires-Dist: opencv-python
|
|
24
|
+
Requires-Dist: SimpleITK
|
|
25
|
+
Requires-Dist: scikit-image
|
|
26
|
+
Requires-Dist: click-groups
|
|
27
|
+
Requires-Dist: mpire
|
|
28
|
+
Requires-Dist: colour-science>=0.4.1
|
|
29
|
+
Requires-Dist: tabulate
|
|
30
|
+
Requires-Dist: loguru
|
|
31
|
+
Requires-Dist: image2image-io
|
|
32
|
+
Provides-Extra: valis
|
|
33
|
+
Requires-Dist: valis-wsi; extra == "valis"
|
|
34
|
+
Requires-Dist: opencv-contrib-python; extra == "valis"
|
|
35
|
+
Requires-Dist: fastcluster; extra == "valis"
|
|
36
|
+
Requires-Dist: scikit-learn; extra == "valis"
|
|
37
|
+
Provides-Extra: test
|
|
38
|
+
Requires-Dist: pytest>=6.0; extra == "test"
|
|
39
|
+
Requires-Dist: pytest-cov; extra == "test"
|
|
40
|
+
Provides-Extra: dev
|
|
41
|
+
Requires-Dist: black; extra == "dev"
|
|
42
|
+
Requires-Dist: ipython; extra == "dev"
|
|
43
|
+
Requires-Dist: mypy; extra == "dev"
|
|
44
|
+
Requires-Dist: pdbpp; extra == "dev"
|
|
45
|
+
Requires-Dist: pre-commit; extra == "dev"
|
|
46
|
+
Requires-Dist: rich; extra == "dev"
|
|
47
|
+
Requires-Dist: ruff; extra == "dev"
|
|
48
|
+
Requires-Dist: image2image-reg[test]; extra == "dev"
|
|
49
|
+
Dynamic: license-file
|
|
50
|
+
|
|
51
|
+
# image2image-reg
|
|
52
|
+
|
|
53
|
+
[](https://github.com/vandeplaslab/image2image-reg/raw/main/LICENSE)
|
|
54
|
+
[](https://pypi.org/project/image2image-reg)
|
|
55
|
+
[](https://python.org)
|
|
56
|
+
[](https://github.com/vandeplaslab/image2image-reg/actions/workflows/ci.yml)
|
|
57
|
+
[](https://codecov.io/gh/vandeplaslab/image2image-reg)
|
|
58
|
+
|
|
59
|
+
Whole slide image registration using elastix and/or Valis-WSI.
|
|
60
|
+
|
|
61
|
+
## Overview
|
|
62
|
+
|
|
63
|
+
`image2image-reg` is a library for whole-slide image registration. It provides a command-line interface for performing
|
|
64
|
+
registration, transformation and evaluation of whole-slide image registrations. The library is inspired by `wsireg` and
|
|
65
|
+
`valis`. In fact, the registration workflow is a complete rewrite of the `wsireg` library to provide more flexibility
|
|
66
|
+
and control over the registration process.
|
|
67
|
+
|
|
68
|
+
## Differences from `wsireg`
|
|
69
|
+
|
|
70
|
+
- [DONE] Registrations are organized into `projects`. Project is a collection of configuration, logs, visualisations and images.
|
|
71
|
+
This should provide a more structured way of organizing your images and not cluttering the working directory.
|
|
72
|
+
- [WIP] Registrations can be initialized with `affine` matrix (to get a good starting point) - this will allow for faster
|
|
73
|
+
registration and hopefully better results.
|
|
74
|
+
- [WIP] Registrations can be focused on specific region of interest (mask) - while it's possible to do this in `wsireg`,
|
|
75
|
+
it's not as straightforward as it should be.
|
|
76
|
+
- [DONE] Better support for point and GeoJSON data.
|
|
77
|
+
- [DONE] Better CLI interface - more structured and easier to use.
|
|
78
|
+
- [DONE] Better logging - more informative and easier to debug.
|
|
79
|
+
- [DONE] Reusable registrations - since all registration data is contained within the project, it's much easier to re-run
|
|
80
|
+
certain tasks (such as export images) without having to re-run the registration process.
|
|
81
|
+
|
|
82
|
+
## Planned features:
|
|
83
|
+
|
|
84
|
+
- [WIP] Better support for `Valis` registrations.
|
|
85
|
+
- [WIP] Better support for masks.
|
|
86
|
+
- Add better measures and means of testing effectiveness of registration.
|
|
87
|
+
- Add better multi-processing support.
|
|
88
|
+
- Add 3D module for elastiX registrations.
|
|
89
|
+
|
|
90
|
+
## Getting started
|
|
91
|
+
|
|
92
|
+
The library provides a command-line interface which can be invoked:
|
|
93
|
+
|
|
94
|
+
```bash
|
|
95
|
+
i2reg --help
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
Will generate output like this:
|
|
99
|
+
|
|
100
|
+
```bash
|
|
101
|
+
Usage: i2reg [OPTIONS] COMMAND1 [ARGS]... [COMMAND2 [ARGS]...]...
|
|
102
|
+
|
|
103
|
+
Launch registration app.
|
|
104
|
+
|
|
105
|
+
Options:
|
|
106
|
+
--version Show the version and exit.
|
|
107
|
+
--dev Flat to indicate that CLI should run in development mode and catch all errors.
|
|
108
|
+
--no_color Flag to disable colored logs (essential when logging to file).
|
|
109
|
+
-q, --quiet Minimal output - only errors and exceptions will be shown.
|
|
110
|
+
--debug Maximum output - all messages will be shown.
|
|
111
|
+
-v, --verbose Verbose output. This is additive flag so `-vvv` will print `INFO` messages and -vvvv will print
|
|
112
|
+
`DEBUG` information.
|
|
113
|
+
--log FILE Write logs to file (specify log path).
|
|
114
|
+
-h, --help Show this message and exit.
|
|
115
|
+
|
|
116
|
+
Project:
|
|
117
|
+
new Create a new project.
|
|
118
|
+
about Print information about the registration...
|
|
119
|
+
validate Validate project configuration.
|
|
120
|
+
add-image Add images to the project.
|
|
121
|
+
add-path Specify the registration path between the...
|
|
122
|
+
add-attachment Add attachment image to registered modality.
|
|
123
|
+
add-points Add attachment points (csv/tsv/txt) to...
|
|
124
|
+
add-shape Add attachment shape (GeoJSON) to...
|
|
125
|
+
add-merge Specify how (if) images should be merged.
|
|
126
|
+
|
|
127
|
+
Execute:
|
|
128
|
+
preprocess Preprocess images.
|
|
129
|
+
register Register images.
|
|
130
|
+
clear Clear project data...
|
|
131
|
+
export Export images.
|
|
132
|
+
|
|
133
|
+
Valis:
|
|
134
|
+
valis-init Initialize Valis configuration file.
|
|
135
|
+
valis-register Register images using the Valis algorithm.
|
|
136
|
+
|
|
137
|
+
Utility:
|
|
138
|
+
merge Export images.
|
|
139
|
+
convert Convert images to pyramidal OME-TIFF.
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
## Contributing
|
|
143
|
+
|
|
144
|
+
Contributions are always welcome. Please feel free to submit PRs with new features, bug fixes, or documentation improvements.
|
|
145
|
+
|
|
146
|
+
```bash
|
|
147
|
+
git clone https://github.com/vandeplaslab/image2image-reg.git
|
|
148
|
+
|
|
149
|
+
pip install -e .[dev]
|
|
150
|
+
```
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
# image2image-reg
|
|
2
|
+
|
|
3
|
+
[](https://github.com/vandeplaslab/image2image-reg/raw/main/LICENSE)
|
|
4
|
+
[](https://pypi.org/project/image2image-reg)
|
|
5
|
+
[](https://python.org)
|
|
6
|
+
[](https://github.com/vandeplaslab/image2image-reg/actions/workflows/ci.yml)
|
|
7
|
+
[](https://codecov.io/gh/vandeplaslab/image2image-reg)
|
|
8
|
+
|
|
9
|
+
Whole slide image registration using elastix and/or Valis-WSI.
|
|
10
|
+
|
|
11
|
+
## Overview
|
|
12
|
+
|
|
13
|
+
`image2image-reg` is a library for whole-slide image registration. It provides a command-line interface for performing
|
|
14
|
+
registration, transformation and evaluation of whole-slide image registrations. The library is inspired by `wsireg` and
|
|
15
|
+
`valis`. In fact, the registration workflow is a complete rewrite of the `wsireg` library to provide more flexibility
|
|
16
|
+
and control over the registration process.
|
|
17
|
+
|
|
18
|
+
## Differences from `wsireg`
|
|
19
|
+
|
|
20
|
+
- [DONE] Registrations are organized into `projects`. Project is a collection of configuration, logs, visualisations and images.
|
|
21
|
+
This should provide a more structured way of organizing your images and not cluttering the working directory.
|
|
22
|
+
- [WIP] Registrations can be initialized with `affine` matrix (to get a good starting point) - this will allow for faster
|
|
23
|
+
registration and hopefully better results.
|
|
24
|
+
- [WIP] Registrations can be focused on specific region of interest (mask) - while it's possible to do this in `wsireg`,
|
|
25
|
+
it's not as straightforward as it should be.
|
|
26
|
+
- [DONE] Better support for point and GeoJSON data.
|
|
27
|
+
- [DONE] Better CLI interface - more structured and easier to use.
|
|
28
|
+
- [DONE] Better logging - more informative and easier to debug.
|
|
29
|
+
- [DONE] Reusable registrations - since all registration data is contained within the project, it's much easier to re-run
|
|
30
|
+
certain tasks (such as export images) without having to re-run the registration process.
|
|
31
|
+
|
|
32
|
+
## Planned features:
|
|
33
|
+
|
|
34
|
+
- [WIP] Better support for `Valis` registrations.
|
|
35
|
+
- [WIP] Better support for masks.
|
|
36
|
+
- Add better measures and means of testing effectiveness of registration.
|
|
37
|
+
- Add better multi-processing support.
|
|
38
|
+
- Add 3D module for elastiX registrations.
|
|
39
|
+
|
|
40
|
+
## Getting started
|
|
41
|
+
|
|
42
|
+
The library provides a command-line interface which can be invoked:
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
i2reg --help
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
Will generate output like this:
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
Usage: i2reg [OPTIONS] COMMAND1 [ARGS]... [COMMAND2 [ARGS]...]...
|
|
52
|
+
|
|
53
|
+
Launch registration app.
|
|
54
|
+
|
|
55
|
+
Options:
|
|
56
|
+
--version Show the version and exit.
|
|
57
|
+
--dev Flat to indicate that CLI should run in development mode and catch all errors.
|
|
58
|
+
--no_color Flag to disable colored logs (essential when logging to file).
|
|
59
|
+
-q, --quiet Minimal output - only errors and exceptions will be shown.
|
|
60
|
+
--debug Maximum output - all messages will be shown.
|
|
61
|
+
-v, --verbose Verbose output. This is additive flag so `-vvv` will print `INFO` messages and -vvvv will print
|
|
62
|
+
`DEBUG` information.
|
|
63
|
+
--log FILE Write logs to file (specify log path).
|
|
64
|
+
-h, --help Show this message and exit.
|
|
65
|
+
|
|
66
|
+
Project:
|
|
67
|
+
new Create a new project.
|
|
68
|
+
about Print information about the registration...
|
|
69
|
+
validate Validate project configuration.
|
|
70
|
+
add-image Add images to the project.
|
|
71
|
+
add-path Specify the registration path between the...
|
|
72
|
+
add-attachment Add attachment image to registered modality.
|
|
73
|
+
add-points Add attachment points (csv/tsv/txt) to...
|
|
74
|
+
add-shape Add attachment shape (GeoJSON) to...
|
|
75
|
+
add-merge Specify how (if) images should be merged.
|
|
76
|
+
|
|
77
|
+
Execute:
|
|
78
|
+
preprocess Preprocess images.
|
|
79
|
+
register Register images.
|
|
80
|
+
clear Clear project data...
|
|
81
|
+
export Export images.
|
|
82
|
+
|
|
83
|
+
Valis:
|
|
84
|
+
valis-init Initialize Valis configuration file.
|
|
85
|
+
valis-register Register images using the Valis algorithm.
|
|
86
|
+
|
|
87
|
+
Utility:
|
|
88
|
+
merge Export images.
|
|
89
|
+
convert Convert images to pyramidal OME-TIFF.
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
## Contributing
|
|
93
|
+
|
|
94
|
+
Contributions are always welcome. Please feel free to submit PRs with new features, bug fixes, or documentation improvements.
|
|
95
|
+
|
|
96
|
+
```bash
|
|
97
|
+
git clone https://github.com/vandeplaslab/image2image-reg.git
|
|
98
|
+
|
|
99
|
+
pip install -e .[dev]
|
|
100
|
+
```
|