vIQA 2.2.1__tar.gz → 2.2.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.
- {viqa-2.2.1 → viqa-2.2.3}/.github/ISSUE_TEMPLATE/bug_report.md +1 -2
- {viqa-2.2.1 → viqa-2.2.3}/.github/workflows/build_and_push_docker_images.yaml +2 -2
- {viqa-2.2.1 → viqa-2.2.3}/.github/workflows/release.yaml +51 -32
- {viqa-2.2.1 → viqa-2.2.3}/.pre-commit-config.yaml +9 -9
- {viqa-2.2.1 → viqa-2.2.3}/CHANGELOG.md +51 -8
- {viqa-2.2.1 → viqa-2.2.3}/PKG-INFO +2 -2
- {viqa-2.2.1 → viqa-2.2.3}/containers/dh-image-quality-notebook/Dockerfile +1 -1
- {viqa-2.2.1 → viqa-2.2.3}/containers/jh-image-quality-notebook/Dockerfile +1 -1
- {viqa-2.2.1 → viqa-2.2.3}/docs/source/user_guide.rst +1 -1
- {viqa-2.2.1 → viqa-2.2.3}/pyproject.toml +3 -1
- {viqa-2.2.1 → viqa-2.2.3}/requirements/cd.txt +1 -1
- {viqa-2.2.1 → viqa-2.2.3}/src/viqa/__init__.py +1 -1
- {viqa-2.2.1 → viqa-2.2.3}/src/viqa/multiple.py +33 -2
- {viqa-2.2.1 → viqa-2.2.3}/src/viqa/utils/export.py +5 -1
- {viqa-2.2.1 → viqa-2.2.3}/src/viqa/utils/loading.py +18 -2
- {viqa-2.2.1 → viqa-2.2.3}/.github/ISSUE_TEMPLATE/feature_request.md +0 -0
- {viqa-2.2.1 → viqa-2.2.3}/.github/PULL_REQUEST_TEMPLATE.md +0 -0
- {viqa-2.2.1 → viqa-2.2.3}/.github/workflows/documentation.yaml +0 -0
- {viqa-2.2.1 → viqa-2.2.3}/.github/workflows/lint.yaml +0 -0
- {viqa-2.2.1 → viqa-2.2.3}/.gitignore +0 -0
- {viqa-2.2.1 → viqa-2.2.3}/.gitmodules +0 -0
- {viqa-2.2.1 → viqa-2.2.3}/.rstcheck.cfg +0 -0
- {viqa-2.2.1 → viqa-2.2.3}/.yamllint.yaml +0 -0
- {viqa-2.2.1 → viqa-2.2.3}/CITATION.cff +0 -0
- {viqa-2.2.1 → viqa-2.2.3}/CODE_OF_CONDUCT.md +0 -0
- {viqa-2.2.1 → viqa-2.2.3}/CONTRIBUTING.md +0 -0
- {viqa-2.2.1 → viqa-2.2.3}/LICENSE.txt +0 -0
- {viqa-2.2.1 → viqa-2.2.3}/README.md +0 -0
- {viqa-2.2.1 → viqa-2.2.3}/branding/logo/Logo_vIQA_wo-text.svg +0 -0
- {viqa-2.2.1 → viqa-2.2.3}/containers/config/jp_app_launcher/jp_app_launcher.yaml +0 -0
- {viqa-2.2.1 → viqa-2.2.3}/containers/dh-image-quality-notebook/.dockerignore +0 -0
- {viqa-2.2.1 → viqa-2.2.3}/containers/dh-image-quality-notebook/README.md +0 -0
- {viqa-2.2.1 → viqa-2.2.3}/containers/jh-image-quality-notebook/.dockerignore +0 -0
- {viqa-2.2.1 → viqa-2.2.3}/containers/jh-image-quality-notebook/README.md +0 -0
- {viqa-2.2.1 → viqa-2.2.3}/docs/Makefile +0 -0
- {viqa-2.2.1 → viqa-2.2.3}/docs/make.bat +0 -0
- {viqa-2.2.1 → viqa-2.2.3}/docs/source/_metrics.rst +0 -0
- {viqa-2.2.1 → viqa-2.2.3}/docs/source/_multiple.rst +0 -0
- {viqa-2.2.1 → viqa-2.2.3}/docs/source/_templates/autosummary/class.rst +0 -0
- {viqa-2.2.1 → viqa-2.2.3}/docs/source/api_reference.rst +0 -0
- {viqa-2.2.1 → viqa-2.2.3}/docs/source/changelog.rst +0 -0
- {viqa-2.2.1 → viqa-2.2.3}/docs/source/conf.py +0 -0
- {viqa-2.2.1 → viqa-2.2.3}/docs/source/developer_guide.rst +0 -0
- {viqa-2.2.1 → viqa-2.2.3}/docs/source/fr_metrics/fsim.rst +0 -0
- {viqa-2.2.1 → viqa-2.2.3}/docs/source/fr_metrics/gsm.rst +0 -0
- {viqa-2.2.1 → viqa-2.2.3}/docs/source/fr_metrics/mad.rst +0 -0
- {viqa-2.2.1 → viqa-2.2.3}/docs/source/fr_metrics/msssim.rst +0 -0
- {viqa-2.2.1 → viqa-2.2.3}/docs/source/fr_metrics/psnr.rst +0 -0
- {viqa-2.2.1 → viqa-2.2.3}/docs/source/fr_metrics/rmse.rst +0 -0
- {viqa-2.2.1 → viqa-2.2.3}/docs/source/fr_metrics/ssim.rst +0 -0
- {viqa-2.2.1 → viqa-2.2.3}/docs/source/fr_metrics/uqi.rst +0 -0
- {viqa-2.2.1 → viqa-2.2.3}/docs/source/fr_metrics/vif.rst +0 -0
- {viqa-2.2.1 → viqa-2.2.3}/docs/source/fr_metrics/vsi.rst +0 -0
- {viqa-2.2.1 → viqa-2.2.3}/docs/source/fr_metrics.rst +0 -0
- {viqa-2.2.1 → viqa-2.2.3}/docs/source/fusion.rst +0 -0
- {viqa-2.2.1 → viqa-2.2.3}/docs/source/getting_started.rst +0 -0
- {viqa-2.2.1 → viqa-2.2.3}/docs/source/index.rst +0 -0
- {viqa-2.2.1 → viqa-2.2.3}/docs/source/internal_api_reference.rst +0 -0
- {viqa-2.2.1 → viqa-2.2.3}/docs/source/multiple.rst +0 -0
- {viqa-2.2.1 → viqa-2.2.3}/docs/source/nr_metrics/cnr.rst +0 -0
- {viqa-2.2.1 → viqa-2.2.3}/docs/source/nr_metrics/qmeasure.rst +0 -0
- {viqa-2.2.1 → viqa-2.2.3}/docs/source/nr_metrics/snr.rst +0 -0
- {viqa-2.2.1 → viqa-2.2.3}/docs/source/nr_metrics.rst +0 -0
- {viqa-2.2.1 → viqa-2.2.3}/docs/source/utils/ImageArray.rst +0 -0
- {viqa-2.2.1 → viqa-2.2.3}/docs/source/utils.rst +0 -0
- {viqa-2.2.1 → viqa-2.2.3}/meson.build +0 -0
- {viqa-2.2.1 → viqa-2.2.3}/notebooks/Image_Comparison.ipynb +0 -0
- {viqa-2.2.1 → viqa-2.2.3}/notebooks/Image_Comparison_batch.ipynb +0 -0
- {viqa-2.2.1 → viqa-2.2.3}/requirements/README.md +0 -0
- {viqa-2.2.1 → viqa-2.2.3}/requirements/book.txt +0 -0
- {viqa-2.2.1 → viqa-2.2.3}/requirements/build.txt +0 -0
- {viqa-2.2.1 → viqa-2.2.3}/requirements/default.txt +0 -0
- {viqa-2.2.1 → viqa-2.2.3}/requirements/dev.txt +0 -0
- {viqa-2.2.1 → viqa-2.2.3}/requirements/docs.txt +0 -0
- {viqa-2.2.1 → viqa-2.2.3}/requirements/lint.txt +0 -0
- {viqa-2.2.1 → viqa-2.2.3}/requirements/tests.txt +0 -0
- {viqa-2.2.1 → viqa-2.2.3}/requirements.txt +0 -0
- {viqa-2.2.1 → viqa-2.2.3}/src/scripts/combine_stack.py +0 -0
- {viqa-2.2.1 → viqa-2.2.3}/src/scripts/crop_image.py +0 -0
- {viqa-2.2.1 → viqa-2.2.3}/src/scripts/reduce_projections.py +0 -0
- {viqa-2.2.1 → viqa-2.2.3}/src/scripts/write_to_csv.py +0 -0
- {viqa-2.2.1 → viqa-2.2.3}/src/scripts/write_to_mat.py +0 -0
- {viqa-2.2.1 → viqa-2.2.3}/src/viqa/_metrics.py +0 -0
- {viqa-2.2.1 → viqa-2.2.3}/src/viqa/fr_metrics/__init__.py +0 -0
- {viqa-2.2.1 → viqa-2.2.3}/src/viqa/fr_metrics/fsim.py +0 -0
- {viqa-2.2.1 → viqa-2.2.3}/src/viqa/fr_metrics/gsm.py +0 -0
- {viqa-2.2.1 → viqa-2.2.3}/src/viqa/fr_metrics/mad.py +0 -0
- {viqa-2.2.1 → viqa-2.2.3}/src/viqa/fr_metrics/meson.build +0 -0
- {viqa-2.2.1 → viqa-2.2.3}/src/viqa/fr_metrics/msssim.py +0 -0
- {viqa-2.2.1 → viqa-2.2.3}/src/viqa/fr_metrics/psnr.py +0 -0
- {viqa-2.2.1 → viqa-2.2.3}/src/viqa/fr_metrics/rmse.py +0 -0
- {viqa-2.2.1 → viqa-2.2.3}/src/viqa/fr_metrics/ssim.py +0 -0
- {viqa-2.2.1 → viqa-2.2.3}/src/viqa/fr_metrics/stat_utils/meson.build +0 -0
- {viqa-2.2.1 → viqa-2.2.3}/src/viqa/fr_metrics/stat_utils/statisticscalc.pyi +0 -0
- {viqa-2.2.1 → viqa-2.2.3}/src/viqa/fr_metrics/stat_utils/statisticsmodule.c +0 -0
- {viqa-2.2.1 → viqa-2.2.3}/src/viqa/fr_metrics/stat_utils/statisticsmodule.h +0 -0
- {viqa-2.2.1 → viqa-2.2.3}/src/viqa/fr_metrics/uqi.py +0 -0
- {viqa-2.2.1 → viqa-2.2.3}/src/viqa/fr_metrics/vif.py +0 -0
- {viqa-2.2.1 → viqa-2.2.3}/src/viqa/fr_metrics/vsi.py +0 -0
- {viqa-2.2.1 → viqa-2.2.3}/src/viqa/fusion.py +0 -0
- {viqa-2.2.1 → viqa-2.2.3}/src/viqa/kernels.py +0 -0
- {viqa-2.2.1 → viqa-2.2.3}/src/viqa/meson.build +0 -0
- {viqa-2.2.1 → viqa-2.2.3}/src/viqa/nr_metrics/__init__.py +0 -0
- {viqa-2.2.1 → viqa-2.2.3}/src/viqa/nr_metrics/cnr.py +0 -0
- {viqa-2.2.1 → viqa-2.2.3}/src/viqa/nr_metrics/meson.build +0 -0
- {viqa-2.2.1 → viqa-2.2.3}/src/viqa/nr_metrics/qmeasure.py +0 -0
- {viqa-2.2.1 → viqa-2.2.3}/src/viqa/nr_metrics/qmeasure_utils/meson.build +0 -0
- {viqa-2.2.1 → viqa-2.2.3}/src/viqa/nr_metrics/qmeasure_utils/qmeasure/CITATION.cff +0 -0
- {viqa-2.2.1 → viqa-2.2.3}/src/viqa/nr_metrics/qmeasure_utils/qmeasure/LICENSE +0 -0
- {viqa-2.2.1 → viqa-2.2.3}/src/viqa/nr_metrics/qmeasure_utils/qmeasure/README.md +0 -0
- {viqa-2.2.1 → viqa-2.2.3}/src/viqa/nr_metrics/qmeasure_utils/qmeasure/src/ImageHistogram.cpp +0 -0
- {viqa-2.2.1 → viqa-2.2.3}/src/viqa/nr_metrics/qmeasure_utils/qmeasure/src/ImageHistogram.h +0 -0
- {viqa-2.2.1 → viqa-2.2.3}/src/viqa/nr_metrics/qmeasure_utils/qmeasure/src/QMeasureCalculation.cpp +0 -0
- {viqa-2.2.1 → viqa-2.2.3}/src/viqa/nr_metrics/qmeasure_utils/qmeasure/src/QMeasureCalculation.h +0 -0
- {viqa-2.2.1 → viqa-2.2.3}/src/viqa/nr_metrics/qmeasure_utils/qmeasurecalc.pyi +0 -0
- {viqa-2.2.1 → viqa-2.2.3}/src/viqa/nr_metrics/qmeasure_utils/qmeasurecalcmodule.cpp +0 -0
- {viqa-2.2.1 → viqa-2.2.3}/src/viqa/nr_metrics/qmeasure_utils/qmeasurecalcmodule.h +0 -0
- {viqa-2.2.1 → viqa-2.2.3}/src/viqa/nr_metrics/snr.py +0 -0
- {viqa-2.2.1 → viqa-2.2.3}/src/viqa/utils/__init__.py +0 -0
- {viqa-2.2.1 → viqa-2.2.3}/src/viqa/utils/_build/get_numpy_path.py +0 -0
- {viqa-2.2.1 → viqa-2.2.3}/src/viqa/utils/_build/version.py +0 -0
- {viqa-2.2.1 → viqa-2.2.3}/src/viqa/utils/_module.py +0 -0
- {viqa-2.2.1 → viqa-2.2.3}/src/viqa/utils/deprecation.py +0 -0
- {viqa-2.2.1 → viqa-2.2.3}/src/viqa/utils/meson.build +0 -0
- {viqa-2.2.1 → viqa-2.2.3}/src/viqa/utils/misc.py +0 -0
- {viqa-2.2.1 → viqa-2.2.3}/src/viqa/utils/visualization.py +0 -0
- {viqa-2.2.1 → viqa-2.2.3}/templates/CHANGELOG.md.j2 +0 -0
- {viqa-2.2.1 → viqa-2.2.3}/tests/__init__.py +0 -0
- {viqa-2.2.1 → viqa-2.2.3}/tests/conftest.py +0 -0
- {viqa-2.2.1 → viqa-2.2.3}/tests/test_cnr_pytest.py +0 -0
- {viqa-2.2.1 → viqa-2.2.3}/tests/test_fsim_pytest.py +0 -0
- {viqa-2.2.1 → viqa-2.2.3}/tests/test_mad_pytest.py +0 -0
- {viqa-2.2.1 → viqa-2.2.3}/tests/test_mad_utils_pytest.py +0 -0
- {viqa-2.2.1 → viqa-2.2.3}/tests/test_psnr_pytest.py +0 -0
- {viqa-2.2.1 → viqa-2.2.3}/tests/test_rmse_pytest.py +0 -0
- {viqa-2.2.1 → viqa-2.2.3}/tests/test_snr_pytest.py +0 -0
- {viqa-2.2.1 → viqa-2.2.3}/tests/test_ssim_pytest.py +0 -0
- {viqa-2.2.1 → viqa-2.2.3}/tools/generate_requirements.py +0 -0
|
@@ -37,6 +37,5 @@ Please search on the [issue tracker](https://github.com/3dct/vIQA/issues) before
|
|
|
37
37
|
## Your Environment
|
|
38
38
|
<!--- Include as many relevant details about the environment you experienced the bug in -->
|
|
39
39
|
* Version used:
|
|
40
|
-
*
|
|
41
|
-
* Operating System and version (desktop or mobile):
|
|
40
|
+
* Operating System and version:
|
|
42
41
|
* Link to your project:
|
|
@@ -33,13 +33,13 @@ jobs:
|
|
|
33
33
|
description: This is a custom image for volumetric image quality assessment in daskhub.
|
|
34
34
|
source: https://github.com/3dct/vIQA/tree/main/containers/dh-image-quality-notebook/Dockerfile
|
|
35
35
|
documentation: https://github.com/3dct/vIQA/tree/main/containers/dh-image-quality-notebook/README.md
|
|
36
|
-
prefix: dh
|
|
36
|
+
prefix: dh-
|
|
37
37
|
- dockerfile: ./containers/jh-image-quality-notebook/Dockerfile
|
|
38
38
|
title: volumetric Image Quality Assessment Notebook - JupyterHub
|
|
39
39
|
description: This is a custom image for volumetric image quality assessment in jupyterhub.
|
|
40
40
|
source: https://github.com/3dct/vIQA/tree/main/containers/jh-image-quality-notebook/Dockerfile
|
|
41
41
|
documentation: https://github.com/3dct/vIQA/tree/main/containers/jh-image-quality-notebook/README.md
|
|
42
|
-
prefix: jh
|
|
42
|
+
prefix: jh-
|
|
43
43
|
|
|
44
44
|
permissions:
|
|
45
45
|
contents: read
|
|
@@ -8,6 +8,12 @@ on:
|
|
|
8
8
|
branches:
|
|
9
9
|
- main
|
|
10
10
|
- dev
|
|
11
|
+
pull_request:
|
|
12
|
+
branches:
|
|
13
|
+
- main
|
|
14
|
+
- dev
|
|
15
|
+
paths-ignore:
|
|
16
|
+
- .github/*
|
|
11
17
|
|
|
12
18
|
jobs:
|
|
13
19
|
changes:
|
|
@@ -93,7 +99,12 @@ jobs:
|
|
|
93
99
|
name: Semantic Release
|
|
94
100
|
runs-on: ubuntu-latest
|
|
95
101
|
needs: [lint]
|
|
96
|
-
if:
|
|
102
|
+
if: >-
|
|
103
|
+
${{
|
|
104
|
+
github.ref == 'refs/heads/main' &&
|
|
105
|
+
github.repository == '3dct/viqa' &&
|
|
106
|
+
github.event_name != 'pull_request' && !cancelled()
|
|
107
|
+
}}
|
|
97
108
|
permissions:
|
|
98
109
|
id-token: write
|
|
99
110
|
contents: write
|
|
@@ -113,7 +124,7 @@ jobs:
|
|
|
113
124
|
|
|
114
125
|
- name: Python Semantic Release
|
|
115
126
|
id: release
|
|
116
|
-
uses: python-semantic-release/python-semantic-release@v9.
|
|
127
|
+
uses: python-semantic-release/python-semantic-release@v9.21.0
|
|
117
128
|
with:
|
|
118
129
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
119
130
|
git_committer_name: "github-actions"
|
|
@@ -123,10 +134,12 @@ jobs:
|
|
|
123
134
|
name: Build wheels on ${{ matrix.os }}
|
|
124
135
|
runs-on: ${{ matrix.os }}
|
|
125
136
|
needs: [changes, semantic_release]
|
|
126
|
-
if:
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
137
|
+
if: >-
|
|
138
|
+
${{
|
|
139
|
+
(needs.changes.outputs.build-changes == 'true' ||
|
|
140
|
+
needs.changes.outputs.src-changes == 'true' ||
|
|
141
|
+
needs.changes.outputs.ci-changes == 'true') && !cancelled()
|
|
142
|
+
}}
|
|
130
143
|
strategy:
|
|
131
144
|
fail-fast: false
|
|
132
145
|
matrix:
|
|
@@ -171,10 +184,12 @@ jobs:
|
|
|
171
184
|
name: Build source distribution
|
|
172
185
|
runs-on: ubuntu-24.04
|
|
173
186
|
needs: [changes, semantic_release]
|
|
174
|
-
if:
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
187
|
+
if: >-
|
|
188
|
+
${{
|
|
189
|
+
(needs.changes.outputs.build-changes == 'true' ||
|
|
190
|
+
needs.changes.outputs.src-changes == 'true' ||
|
|
191
|
+
needs.changes.outputs.ci-changes == 'true') && !cancelled()
|
|
192
|
+
}}
|
|
178
193
|
steps:
|
|
179
194
|
- name: Checkout code
|
|
180
195
|
uses: actions/checkout@v4
|
|
@@ -194,9 +209,11 @@ jobs:
|
|
|
194
209
|
upload_testpypi:
|
|
195
210
|
name: Upload to Test PyPI
|
|
196
211
|
needs: [semantic_release, build_wheels, build_sdist]
|
|
197
|
-
if:
|
|
198
|
-
|
|
199
|
-
|
|
212
|
+
if: >-
|
|
213
|
+
${{
|
|
214
|
+
(github.ref == 'refs/heads/dev' && startsWith(github.ref, 'refs/tags/v')) ||
|
|
215
|
+
(github.ref == 'refs/heads/main' && needs.semantic_release.outputs.released == 'true')
|
|
216
|
+
}}
|
|
200
217
|
runs-on: ubuntu-latest
|
|
201
218
|
environment:
|
|
202
219
|
name: testpypi
|
|
@@ -269,11 +286,13 @@ jobs:
|
|
|
269
286
|
name: Upload to PyPI
|
|
270
287
|
needs: [semantic_release, build_wheels, build_sdist, upload_testpypi, test_install]
|
|
271
288
|
runs-on: ubuntu-latest
|
|
272
|
-
if:
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
289
|
+
if: >-
|
|
290
|
+
${{
|
|
291
|
+
needs.semantic_release.outputs.released == 'true' &&
|
|
292
|
+
needs.semantic_release.outputs.is_prerelease == 'false' &&
|
|
293
|
+
needs.test_install.outputs.tested == 'true' &&
|
|
294
|
+
needs.test_install.outputs.tested_windows == 'true'
|
|
295
|
+
}}
|
|
277
296
|
environment:
|
|
278
297
|
name: pypi
|
|
279
298
|
url: https://pypi.org/project/vIQA/
|
|
@@ -296,11 +315,13 @@ jobs:
|
|
|
296
315
|
name: Upload to GitHub Releases
|
|
297
316
|
needs: [semantic_release, build_wheels, build_sdist, test_install]
|
|
298
317
|
runs-on: ubuntu-latest
|
|
299
|
-
if:
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
318
|
+
if: >-
|
|
319
|
+
${{
|
|
320
|
+
needs.semantic_release.outputs.released == 'true' &&
|
|
321
|
+
needs.semantic_release.outputs.is_prerelease == 'false' &&
|
|
322
|
+
needs.test_install.outputs.tested == 'true' &&
|
|
323
|
+
needs.test_install.outputs.tested_windows == 'true'
|
|
324
|
+
}}
|
|
304
325
|
permissions:
|
|
305
326
|
id-token: write
|
|
306
327
|
contents: write
|
|
@@ -328,16 +349,14 @@ jobs:
|
|
|
328
349
|
./dist/*.whl
|
|
329
350
|
|
|
330
351
|
- name: Publish package distributions to GitHub Releases
|
|
331
|
-
uses: python-semantic-release/publish-action@v9.
|
|
352
|
+
uses: python-semantic-release/publish-action@v9.21.0
|
|
332
353
|
with:
|
|
333
354
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
334
355
|
|
|
335
356
|
prepare_publish_input:
|
|
336
357
|
name: Check if published
|
|
337
358
|
runs-on: ubuntu-latest
|
|
338
|
-
if:
|
|
339
|
-
(needs.changes.outputs.doc-changes == 'true' ||
|
|
340
|
-
needs.changes.outputs.docker-changes == 'true') && always()
|
|
359
|
+
if: ${{ !cancelled() }}
|
|
341
360
|
outputs:
|
|
342
361
|
docs_publish: ${{ steps.check_docs_publish.outputs.publish }}
|
|
343
362
|
image_publish: ${{ steps.check_image_publish.outputs.publish }}
|
|
@@ -345,7 +364,7 @@ jobs:
|
|
|
345
364
|
steps:
|
|
346
365
|
- name: Check if documentation should be published
|
|
347
366
|
id: check_docs_publish
|
|
348
|
-
if: needs.changes.outputs.doc-changes == 'true'
|
|
367
|
+
if: ${{ needs.changes.outputs.doc-changes == 'true' }}
|
|
349
368
|
run: |
|
|
350
369
|
# If either the PyPI or GitHub release was successful, publish the docs
|
|
351
370
|
if ${{ needs.upload_github.result == 'success' }} || ${{ needs.upload_pypi.result == 'success' }}; then
|
|
@@ -360,10 +379,10 @@ jobs:
|
|
|
360
379
|
fi
|
|
361
380
|
- name: Check if Docker images should be published
|
|
362
381
|
id: check_image_publish
|
|
363
|
-
if: needs.changes.outputs.docker-changes == 'true'
|
|
382
|
+
if: ${{ needs.changes.outputs.docker-changes == 'true' }}
|
|
364
383
|
run: |
|
|
365
384
|
# If either the PyPI or GitHub release was successful, publish the Docker images
|
|
366
|
-
if ${{ needs.upload_github.result == 'success'
|
|
385
|
+
if ${{ needs.upload_github.result }} == 'success' || ${{ needs.upload_pypi.result }} == 'success'; then
|
|
367
386
|
echo "publish=true" >> $GITHUB_OUTPUT
|
|
368
387
|
else
|
|
369
388
|
echo "publish=false" >> $GITHUB_OUTPUT
|
|
@@ -373,7 +392,7 @@ jobs:
|
|
|
373
392
|
name: Build and deploy documentation
|
|
374
393
|
uses: ./.github/workflows/documentation.yaml
|
|
375
394
|
needs: [changes, prepare_publish_input]
|
|
376
|
-
if: github.repository == '3dct/viqa' && needs.changes.outputs.doc-changes == 'true'
|
|
395
|
+
if: ${{ github.repository == '3dct/viqa' && needs.changes.outputs.doc-changes == 'true' }}
|
|
377
396
|
with:
|
|
378
397
|
publish: ${{ needs.prepare_publish_input.outputs.docs_publish }}
|
|
379
398
|
|
|
@@ -381,7 +400,7 @@ jobs:
|
|
|
381
400
|
name: Build and push Docker Images
|
|
382
401
|
uses: ./.github/workflows/build_and_push_docker_images.yaml
|
|
383
402
|
needs: [changes, semantic_release, prepare_publish_input]
|
|
384
|
-
if: github.repository == '3dct/viqa' && needs.changes.outputs.docker-changes == 'true'
|
|
403
|
+
if: ${{ github.repository == '3dct/viqa' && needs.changes.outputs.docker-changes == 'true' }}
|
|
385
404
|
with:
|
|
386
405
|
version: ${{ needs.semantic_release.outputs.version }}
|
|
387
406
|
publish: ${{ needs.prepare_publish_input.outputs.image_publish }}
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
# Install pre-commit hooks via
|
|
3
3
|
# pre-commit install
|
|
4
4
|
ci:
|
|
5
|
-
autofix_prs:
|
|
5
|
+
autofix_prs: true
|
|
6
6
|
autoupdate_schedule: 'quarterly'
|
|
7
|
-
autoupdate_commit_msg: 'chore: pre-commit autoupdate
|
|
7
|
+
autoupdate_commit_msg: 'chore: pre-commit autoupdate\\n\\nAutomatically generated by pre-commit.ci'
|
|
8
8
|
skip: ['build-docs', 'mypy']
|
|
9
9
|
submodules: true
|
|
10
10
|
repos:
|
|
@@ -40,7 +40,7 @@ repos:
|
|
|
40
40
|
|
|
41
41
|
- repo: https://github.com/astral-sh/ruff-pre-commit
|
|
42
42
|
# Ruff version.
|
|
43
|
-
rev: v0.11.
|
|
43
|
+
rev: v0.11.4
|
|
44
44
|
hooks:
|
|
45
45
|
# Run the linter.
|
|
46
46
|
- id: ruff
|
|
@@ -50,7 +50,7 @@ repos:
|
|
|
50
50
|
args: [--config=pyproject.toml]
|
|
51
51
|
|
|
52
52
|
- repo: https://github.com/abravalheri/validate-pyproject
|
|
53
|
-
rev: v0.
|
|
53
|
+
rev: v0.24.1
|
|
54
54
|
hooks:
|
|
55
55
|
- id: validate-pyproject
|
|
56
56
|
name: Validate pyproject.toml
|
|
@@ -61,7 +61,7 @@ repos:
|
|
|
61
61
|
- id: pyupgrade
|
|
62
62
|
|
|
63
63
|
- repo: https://github.com/gitleaks/gitleaks
|
|
64
|
-
rev: v8.
|
|
64
|
+
rev: v8.24.2
|
|
65
65
|
hooks:
|
|
66
66
|
- id: gitleaks
|
|
67
67
|
|
|
@@ -84,18 +84,18 @@ repos:
|
|
|
84
84
|
stages: [pre-push]
|
|
85
85
|
|
|
86
86
|
- repo: https://github.com/rhysd/actionlint
|
|
87
|
-
rev: v1.7.
|
|
87
|
+
rev: v1.7.7
|
|
88
88
|
hooks:
|
|
89
89
|
- id: actionlint
|
|
90
90
|
|
|
91
91
|
- repo: https://github.com/adrienverge/yamllint
|
|
92
|
-
rev: v1.
|
|
92
|
+
rev: v1.37.0
|
|
93
93
|
hooks:
|
|
94
94
|
- id: yamllint
|
|
95
95
|
args: ["--strict", "--config-file=.yamllint.yaml"]
|
|
96
96
|
|
|
97
97
|
- repo: https://github.com/codespell-project/codespell
|
|
98
|
-
rev: v2.
|
|
98
|
+
rev: v2.4.1
|
|
99
99
|
hooks:
|
|
100
100
|
- id: codespell
|
|
101
101
|
files: ^.*\.(py|c|cpp|h|m|md|rst|yml|yaml)$
|
|
@@ -106,7 +106,7 @@ repos:
|
|
|
106
106
|
)
|
|
107
107
|
|
|
108
108
|
- repo: https://github.com/pre-commit/mirrors-mypy
|
|
109
|
-
rev: v1.
|
|
109
|
+
rev: v1.15.0
|
|
110
110
|
hooks:
|
|
111
111
|
- id: mypy
|
|
112
112
|
additional_dependencies:
|
|
@@ -2,6 +2,50 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
+
## v2.2.3 (2025-04-10)
|
|
6
|
+
|
|
7
|
+
### Bug fixes
|
|
8
|
+
|
|
9
|
+
* fix: fix using Class attribute rois when not using the same roi for all images in BatchMetrics ([`e98b15a`](https://github.com/3dct/vIQA/commit/e98b15a1de544022061c4643a95a84f8c9d5dc3e))
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
## v2.2.2 (2025-04-09)
|
|
13
|
+
|
|
14
|
+
### Bug fixes
|
|
15
|
+
|
|
16
|
+
* fix: fix semantic release exclude commit pattern ([`b24070e`](https://github.com/3dct/vIQA/commit/b24070ec67f74d68d0915524d77bfa11a828bcc3))
|
|
17
|
+
|
|
18
|
+
* fix: fix rois in BatchMetrics.report when exporting images ([`88c8931`](https://github.com/3dct/vIQA/commit/88c89317ae9735685f16953a5b2338e72fe2a74c))
|
|
19
|
+
|
|
20
|
+
* fix: enable rois in BatchMetrics
|
|
21
|
+
|
|
22
|
+
closes #11 ([`c2b0ce5`](https://github.com/3dct/vIQA/commit/c2b0ce5102aec6ee9ce9434bfc9d3ea8eabdbc12))
|
|
23
|
+
|
|
24
|
+
* fix: add check for image dimensions during loading (#15)
|
|
25
|
+
|
|
26
|
+
* fix: add check for image dimensions during loading
|
|
27
|
+
|
|
28
|
+
closes #14
|
|
29
|
+
|
|
30
|
+
* [pre-commit.ci] auto fixes from pre-commit.com hooks
|
|
31
|
+
|
|
32
|
+
for more information, see https://pre-commit.ci
|
|
33
|
+
|
|
34
|
+
* refactor: refactor to comply with ruff
|
|
35
|
+
|
|
36
|
+
* docs(load_data): add Exception to function docstring
|
|
37
|
+
|
|
38
|
+
---------
|
|
39
|
+
|
|
40
|
+
Co-authored-by: Lukas Nepelius <p42940@fhooe.at>
|
|
41
|
+
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
|
|
42
|
+
Co-authored-by: lukasbehammer <lukas.behammer@fh-wels.at> ([`a120ade`](https://github.com/3dct/vIQA/commit/a120adea9a19fa1e19b4f82cbf95232482fa7be4))
|
|
43
|
+
|
|
44
|
+
### Documentation
|
|
45
|
+
|
|
46
|
+
* docs: refactor user guide ([`c423f57`](https://github.com/3dct/vIQA/commit/c423f573db92326e4e96f815690ce50866a59a01))
|
|
47
|
+
|
|
48
|
+
|
|
5
49
|
## v2.2.1 (2025-04-02)
|
|
6
50
|
|
|
7
51
|
### Bug fixes
|
|
@@ -109,12 +153,6 @@ fix csv delimiter sniffing, add support for tsv and txt files during loading of
|
|
|
109
153
|
|
|
110
154
|
## v2.0.0 (2024-10-22)
|
|
111
155
|
|
|
112
|
-
### Breaking
|
|
113
|
-
|
|
114
|
-
* refactor!: move utility modules to utils subpackage
|
|
115
|
-
|
|
116
|
-
BREAKING CHANGE: major refactoring of utility functions ([`d3945b4`](https://github.com/3dct/vIQA/commit/d3945b47b710c471973296c70c93c272cc0f9552))
|
|
117
|
-
|
|
118
156
|
### Bug fixes
|
|
119
157
|
|
|
120
158
|
* fix: convert rgb images to grayscale before binarization ([`f258f96`](https://github.com/3dct/vIQA/commit/f258f96d38efd6acc56fca9f1dcd823987703058))
|
|
@@ -169,6 +207,12 @@ update documentation, refactor definition of variable truncate ([`851521b`](http
|
|
|
169
207
|
|
|
170
208
|
make sure that an ImageArray is returned via numpy ufunc ([`31524fb`](https://github.com/3dct/vIQA/commit/31524fbff81ff0cf52c9be7dc2e22b116c7dd286))
|
|
171
209
|
|
|
210
|
+
### Refactoring
|
|
211
|
+
|
|
212
|
+
* refactor!: move utility modules to utils subpackage
|
|
213
|
+
|
|
214
|
+
BREAKING CHANGE: major refactoring of utility functions ([`d3945b4`](https://github.com/3dct/vIQA/commit/d3945b47b710c471973296c70c93c272cc0f9552))
|
|
215
|
+
|
|
172
216
|
|
|
173
217
|
## v1.13.0 (2024-09-24)
|
|
174
218
|
|
|
@@ -509,9 +553,8 @@ function writes custom parameters and package version to a .txt file ([`5b8e607`
|
|
|
509
553
|
|
|
510
554
|
## v1.0.0 (2024-08-05)
|
|
511
555
|
|
|
512
|
-
###
|
|
556
|
+
### Features
|
|
513
557
|
|
|
514
558
|
* feat(ImageArray)!: add class for images
|
|
515
559
|
|
|
516
560
|
subclass of np.ndarray, calculates image statistics ([`40f0d02`](https://github.com/3dct/vIQA/commit/40f0d029ad416747135f79e8716de040335da592))
|
|
517
|
-
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: vIQA
|
|
3
|
-
Version: 2.2.
|
|
3
|
+
Version: 2.2.3
|
|
4
4
|
Summary: A Python package for volumetric image quality assessment.
|
|
5
5
|
Keywords: IQA,image quality assessment,volumetric data,image comparison,CT,computed tomography
|
|
6
6
|
Author-Email: Lukas Behammer <lukas.behammer@fh-wels.at>
|
|
@@ -50,7 +50,7 @@ Requires-Dist: sphinx_github_changelog>=1.4.0; extra == "docs"
|
|
|
50
50
|
Requires-Dist: sphinx-last-updated-by-git>=0.3.8; extra == "docs"
|
|
51
51
|
Requires-Dist: viqa[tests]; extra == "docs"
|
|
52
52
|
Provides-Extra: cd
|
|
53
|
-
Requires-Dist: python-semantic-release==9.
|
|
53
|
+
Requires-Dist: python-semantic-release==9.21.0; extra == "cd"
|
|
54
54
|
Requires-Dist: cibuildwheel==2.19.2; extra == "cd"
|
|
55
55
|
Provides-Extra: build
|
|
56
56
|
Requires-Dist: meson-python>=0.16.0; extra == "build"
|
|
@@ -17,7 +17,7 @@ USER ${NB_UID}
|
|
|
17
17
|
RUN pip install viqa
|
|
18
18
|
RUN pip install jupyter_app_launcher
|
|
19
19
|
RUN pip install jupyterlab-git
|
|
20
|
-
RUN pip install pexpect
|
|
20
|
+
RUN pip install pexpect==4.9.0
|
|
21
21
|
|
|
22
22
|
COPY notebooks /usr/share/jupyter/jupyter_app_launcher/notebooks
|
|
23
23
|
COPY containers/config/jp_app_launcher/jp_app_launcher.yaml /usr/share/jupyter/jupyter_app_launcher/jp_app_launcher.yaml
|
|
@@ -17,7 +17,7 @@ USER ${NB_UID}
|
|
|
17
17
|
RUN pip install viqa
|
|
18
18
|
RUN pip install jupyter_app_launcher
|
|
19
19
|
RUN pip install jupyterlab-git
|
|
20
|
-
RUN pip install pexpect
|
|
20
|
+
RUN pip install pexpect==4.9.0
|
|
21
21
|
|
|
22
22
|
COPY notebooks /usr/share/jupyter/jupyter_app_launcher/notebooks
|
|
23
23
|
COPY containers/config/jp_app_launcher/jp_app_launcher.yaml /usr/share/jupyter/jupyter_app_launcher/jp_app_launcher.yaml
|
|
@@ -111,4 +111,4 @@ Possible, but worse (recommended only if you want to calculate a single metric):
|
|
|
111
111
|
The current recommended usage files are the Jupyter Notebooks on the `Github page`_.
|
|
112
112
|
Additional information can be found in the documentation of the individual metrics under :doc:`api_reference`.
|
|
113
113
|
|
|
114
|
-
.. _Github page: https://github.com/3dct/vIQA
|
|
114
|
+
.. _Github page: https://github.com/3dct/vIQA
|
|
@@ -68,7 +68,7 @@ docs = [
|
|
|
68
68
|
"viqa[tests]",
|
|
69
69
|
]
|
|
70
70
|
cd = [
|
|
71
|
-
"python-semantic-release ==9.
|
|
71
|
+
"python-semantic-release ==9.21.0",
|
|
72
72
|
"cibuildwheel ==2.19.2",
|
|
73
73
|
]
|
|
74
74
|
build = [
|
|
@@ -254,6 +254,8 @@ changelog_file = "CHANGELOG.md"
|
|
|
254
254
|
exclude_commit_patterns = [
|
|
255
255
|
".*\\n\\nAutomatically generated by python-semantic-release",
|
|
256
256
|
"chore: pre-commit autoupdate\n\nAutomatically generated by pre-commit.ci",
|
|
257
|
+
"chore: pre-commit autoupdate\\n\\nAutomatically generated by pre-commit.ci",
|
|
258
|
+
"\\[pre-commit\\.ci\\].*",
|
|
257
259
|
"chore(?:\\([^)]*?\\))?: .+",
|
|
258
260
|
"ci(?:\\([^)]*?\\))?: .+",
|
|
259
261
|
"refactor(?:\\([^)]*?\\))?: .+",
|
|
@@ -155,6 +155,11 @@ class BatchMetrics(_MultipleInterface):
|
|
|
155
155
|
List of metric instances. Each instance must be of type :py:class:`Metric`.
|
|
156
156
|
metrics_parameters : list
|
|
157
157
|
List of dictionaries containing the parameters for the metrics.
|
|
158
|
+
rois : list[list[tuple]], optional
|
|
159
|
+
A list of lists of tuples. Each tuple has the start and
|
|
160
|
+
end coordinates of the ROI in the format (x_start, x_end). Each tuple is
|
|
161
|
+
for one coordinate. Each entry of the outer list is
|
|
162
|
+
for one image pair.
|
|
158
163
|
|
|
159
164
|
Raises
|
|
160
165
|
------
|
|
@@ -164,6 +169,7 @@ class BatchMetrics(_MultipleInterface):
|
|
|
164
169
|
If the parameters list contains non-dictionary objects
|
|
165
170
|
If the pairs file does not contain the columns 'reference_image' and
|
|
166
171
|
'modified_image'.
|
|
172
|
+
If the length of the pairs and ROIs is not equal.
|
|
167
173
|
|
|
168
174
|
Notes
|
|
169
175
|
-----
|
|
@@ -192,13 +198,19 @@ class BatchMetrics(_MultipleInterface):
|
|
|
192
198
|
>>> batch.export_results(file_path='path/to/results', file_name='results.csv')
|
|
193
199
|
"""
|
|
194
200
|
|
|
195
|
-
def __init__(self, file_dir, pairs_file, metrics, metrics_parameters):
|
|
201
|
+
def __init__(self, file_dir, pairs_file, metrics, metrics_parameters, rois=None):
|
|
196
202
|
"""Construct method."""
|
|
197
203
|
super().__init__(metrics, metrics_parameters)
|
|
198
204
|
|
|
199
205
|
self.file_dir = file_dir
|
|
200
206
|
self.pairs_file = pairs_file
|
|
201
207
|
self.pairs = _read_pairs(self.pairs_file)
|
|
208
|
+
if rois and len(self.pairs) != len(rois):
|
|
209
|
+
raise ValueError(
|
|
210
|
+
"The number of pairs and ROIs must be equal. "
|
|
211
|
+
f"Got {len(self.pairs)} pairs and {len(rois)} ROIs."
|
|
212
|
+
)
|
|
213
|
+
self.rois = rois
|
|
202
214
|
|
|
203
215
|
def calculate(self, **kwargs):
|
|
204
216
|
"""Calculate the metrics in batch mode.
|
|
@@ -213,6 +225,9 @@ class BatchMetrics(_MultipleInterface):
|
|
|
213
225
|
scaling_order : int, default=1
|
|
214
226
|
Order of the spline interpolation used for image resizing. Default is 1.
|
|
215
227
|
Passed to :py:func:`skimage.transform.resize`.
|
|
228
|
+
roi : list[tuple], optional
|
|
229
|
+
Region of interest to use for the calculation of all images. Overrides the
|
|
230
|
+
`rois` Class attribute.
|
|
216
231
|
|
|
217
232
|
Returns
|
|
218
233
|
-------
|
|
@@ -223,7 +238,17 @@ class BatchMetrics(_MultipleInterface):
|
|
|
223
238
|
-----
|
|
224
239
|
UserWarning
|
|
225
240
|
If the images are the same as in the previous pair.
|
|
241
|
+
If the Class attribute `rois` is overwritten by the `roi` parameter.
|
|
226
242
|
"""
|
|
243
|
+
# Remove roi parameter from kwargs to avoid conflicts with loading
|
|
244
|
+
# Set None if not given to use either no roi or the class attribute rois
|
|
245
|
+
roi = kwargs.pop("roi", None)
|
|
246
|
+
self.global_roi = roi
|
|
247
|
+
if self.rois is not None and roi is not None:
|
|
248
|
+
warn(
|
|
249
|
+
"Class attribute `rois` is overwritten by the `roi` parameter.",
|
|
250
|
+
UserWarning,
|
|
251
|
+
)
|
|
227
252
|
scaling_order = kwargs.pop("scaling_order", 1)
|
|
228
253
|
reference_img = None
|
|
229
254
|
prev_ref_path = None
|
|
@@ -239,7 +264,6 @@ class BatchMetrics(_MultipleInterface):
|
|
|
239
264
|
warn("Skipping calculation for identical image pair.", UserWarning)
|
|
240
265
|
continue
|
|
241
266
|
# Load the images only once if it is the same for multiple pairs
|
|
242
|
-
roi = kwargs.pop("roi", None) # Remove roi parameter to avoid conflicts
|
|
243
267
|
if reference_path != prev_ref_path:
|
|
244
268
|
reference_img = load_data(reference_path, **kwargs)
|
|
245
269
|
prev_ref_path = reference_path
|
|
@@ -253,6 +277,9 @@ class BatchMetrics(_MultipleInterface):
|
|
|
253
277
|
else:
|
|
254
278
|
prev_result_modified = metric_results
|
|
255
279
|
|
|
280
|
+
if self.global_roi is None and self.rois is not None:
|
|
281
|
+
roi = self.rois[pair_num]
|
|
282
|
+
|
|
256
283
|
metric_results = _calc(
|
|
257
284
|
self.metrics,
|
|
258
285
|
self.metrics_parameters,
|
|
@@ -326,9 +353,12 @@ class BatchMetrics(_MultipleInterface):
|
|
|
326
353
|
),
|
|
327
354
|
)
|
|
328
355
|
if image:
|
|
356
|
+
roi = self.global_roi
|
|
329
357
|
for pair_num, pair in enumerate(tqdm(self.pairs)):
|
|
330
358
|
img_r = os.path.join(self.file_dir, pair["reference_image"])
|
|
331
359
|
img_m = os.path.join(self.file_dir, pair["modified_image"])
|
|
360
|
+
if self.global_roi is None and self.rois is not None:
|
|
361
|
+
roi = self.rois[pair_num]
|
|
332
362
|
export_image(
|
|
333
363
|
results=self.results[str(pair_num)],
|
|
334
364
|
img_r=img_r,
|
|
@@ -343,6 +373,7 @@ class BatchMetrics(_MultipleInterface):
|
|
|
343
373
|
x=x,
|
|
344
374
|
y=y,
|
|
345
375
|
z=z,
|
|
376
|
+
roi=roi,
|
|
346
377
|
)
|
|
347
378
|
|
|
348
379
|
def export_results(self, file_path=".", file_name="results.csv"):
|
|
@@ -47,7 +47,7 @@ from warnings import warn
|
|
|
47
47
|
import matplotlib.pyplot as plt
|
|
48
48
|
import numpy as np
|
|
49
49
|
|
|
50
|
-
from .loading import _check_imgs, _resize_image, load_data
|
|
50
|
+
from .loading import _check_imgs, _resize_image, crop_image, load_data
|
|
51
51
|
|
|
52
52
|
|
|
53
53
|
def export_results(metrics, output_path, filename, return_dict=False):
|
|
@@ -208,6 +208,7 @@ def export_image(
|
|
|
208
208
|
warn("No results to plot. Only the images are plotted.", UserWarning)
|
|
209
209
|
|
|
210
210
|
dpi = kwargs.pop("dpi", 300)
|
|
211
|
+
roi = kwargs.pop("roi", None)
|
|
211
212
|
|
|
212
213
|
img_r = load_data(img_r)
|
|
213
214
|
img_m = load_data(img_m)
|
|
@@ -216,6 +217,9 @@ def export_image(
|
|
|
216
217
|
raise ValueError("Images must have the same number of dimensions.")
|
|
217
218
|
scaling_order = kwargs.pop("scaling_order", 1)
|
|
218
219
|
img_m = _resize_image(img_r, img_m, scaling_order=scaling_order)
|
|
220
|
+
if roi is not None:
|
|
221
|
+
img_r = crop_image(img_r, *roi)
|
|
222
|
+
img_m = crop_image(img_m, *roi)
|
|
219
223
|
img_r, img_m = _check_imgs(img_r, img_m)
|
|
220
224
|
|
|
221
225
|
if img_r.ndim == 2 or (img_r.ndim == 3 and img_r.shape[-1] == 3):
|
|
@@ -655,7 +655,8 @@ def load_data(
|
|
|
655
655
|
------
|
|
656
656
|
ValueError
|
|
657
657
|
If input type is not supported \n
|
|
658
|
-
If ``data_range=None`` and ``normalize=True``
|
|
658
|
+
If ``data_range=None`` and ``normalize=True`` \n
|
|
659
|
+
If number of dimensions not 2 or 3
|
|
659
660
|
|
|
660
661
|
Warns
|
|
661
662
|
-----
|
|
@@ -738,6 +739,21 @@ def load_data(
|
|
|
738
739
|
"Input type not supported"
|
|
739
740
|
) # Raise exception if input type is not supported
|
|
740
741
|
|
|
742
|
+
if batch:
|
|
743
|
+
# TODO: Deprecate in version 4.0.0
|
|
744
|
+
for img_num, img in enumerate(img_arr):
|
|
745
|
+
if len(img.shape) > 3 or len(img.shape) < 2:
|
|
746
|
+
raise ValueError(
|
|
747
|
+
f"Number of dimensions of input image should be 2 or 3, got "
|
|
748
|
+
f"{len(img.shape)} for image number {img_num} in img_arr."
|
|
749
|
+
)
|
|
750
|
+
elif not isinstance(img_arr, list):
|
|
751
|
+
if len(img_arr.shape) > 3 or len(img_arr.shape) < 2:
|
|
752
|
+
raise ValueError(
|
|
753
|
+
f"Number of dimensions of input image should be 2 or 3, got "
|
|
754
|
+
f"{len(img_arr.shape)}."
|
|
755
|
+
)
|
|
756
|
+
|
|
741
757
|
# Normalize data
|
|
742
758
|
if normalize and data_range:
|
|
743
759
|
# TODO: Deprecate in version 4.0.0
|
|
@@ -929,7 +945,7 @@ def crop_image(
|
|
|
929
945
|
crop_shape = np.array((x[1] - x[0], y[1] - y[0], z[1] - z[0]))
|
|
930
946
|
if (crop_shape < img_shape).all(): # If cropping is smaller than original image
|
|
931
947
|
img_crop = img[x[0] : x[1], y[0] : y[1], z[0] : z[1]]
|
|
932
|
-
elif crop_shape == img_shape: # If image is already cropped
|
|
948
|
+
elif (crop_shape == img_shape).all(): # If image is already cropped
|
|
933
949
|
warn("Image is already cropped.", RuntimeWarning)
|
|
934
950
|
img_crop = img
|
|
935
951
|
else: # If cropping is larger than original image
|
|
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
|
|
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
|
{viqa-2.2.1 → viqa-2.2.3}/src/viqa/nr_metrics/qmeasure_utils/qmeasure/src/ImageHistogram.cpp
RENAMED
|
File without changes
|
|
File without changes
|
{viqa-2.2.1 → viqa-2.2.3}/src/viqa/nr_metrics/qmeasure_utils/qmeasure/src/QMeasureCalculation.cpp
RENAMED
|
File without changes
|
{viqa-2.2.1 → viqa-2.2.3}/src/viqa/nr_metrics/qmeasure_utils/qmeasure/src/QMeasureCalculation.h
RENAMED
|
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
|