vIQA 2.2.1__tar.gz → 2.2.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.
Files changed (138) hide show
  1. {viqa-2.2.1 → viqa-2.2.2}/.github/ISSUE_TEMPLATE/bug_report.md +1 -2
  2. {viqa-2.2.1 → viqa-2.2.2}/.github/workflows/build_and_push_docker_images.yaml +2 -2
  3. {viqa-2.2.1 → viqa-2.2.2}/.github/workflows/release.yaml +2 -2
  4. {viqa-2.2.1 → viqa-2.2.2}/.pre-commit-config.yaml +9 -9
  5. {viqa-2.2.1 → viqa-2.2.2}/CHANGELOG.md +44 -8
  6. {viqa-2.2.1 → viqa-2.2.2}/PKG-INFO +2 -2
  7. {viqa-2.2.1 → viqa-2.2.2}/containers/dh-image-quality-notebook/Dockerfile +1 -1
  8. {viqa-2.2.1 → viqa-2.2.2}/containers/jh-image-quality-notebook/Dockerfile +1 -1
  9. {viqa-2.2.1 → viqa-2.2.2}/docs/source/user_guide.rst +1 -1
  10. {viqa-2.2.1 → viqa-2.2.2}/pyproject.toml +3 -1
  11. {viqa-2.2.1 → viqa-2.2.2}/requirements/cd.txt +1 -1
  12. {viqa-2.2.1 → viqa-2.2.2}/src/viqa/__init__.py +1 -1
  13. {viqa-2.2.1 → viqa-2.2.2}/src/viqa/multiple.py +33 -2
  14. {viqa-2.2.1 → viqa-2.2.2}/src/viqa/utils/export.py +5 -1
  15. {viqa-2.2.1 → viqa-2.2.2}/src/viqa/utils/loading.py +18 -2
  16. {viqa-2.2.1 → viqa-2.2.2}/.github/ISSUE_TEMPLATE/feature_request.md +0 -0
  17. {viqa-2.2.1 → viqa-2.2.2}/.github/PULL_REQUEST_TEMPLATE.md +0 -0
  18. {viqa-2.2.1 → viqa-2.2.2}/.github/workflows/documentation.yaml +0 -0
  19. {viqa-2.2.1 → viqa-2.2.2}/.github/workflows/lint.yaml +0 -0
  20. {viqa-2.2.1 → viqa-2.2.2}/.gitignore +0 -0
  21. {viqa-2.2.1 → viqa-2.2.2}/.gitmodules +0 -0
  22. {viqa-2.2.1 → viqa-2.2.2}/.rstcheck.cfg +0 -0
  23. {viqa-2.2.1 → viqa-2.2.2}/.yamllint.yaml +0 -0
  24. {viqa-2.2.1 → viqa-2.2.2}/CITATION.cff +0 -0
  25. {viqa-2.2.1 → viqa-2.2.2}/CODE_OF_CONDUCT.md +0 -0
  26. {viqa-2.2.1 → viqa-2.2.2}/CONTRIBUTING.md +0 -0
  27. {viqa-2.2.1 → viqa-2.2.2}/LICENSE.txt +0 -0
  28. {viqa-2.2.1 → viqa-2.2.2}/README.md +0 -0
  29. {viqa-2.2.1 → viqa-2.2.2}/branding/logo/Logo_vIQA_wo-text.svg +0 -0
  30. {viqa-2.2.1 → viqa-2.2.2}/containers/config/jp_app_launcher/jp_app_launcher.yaml +0 -0
  31. {viqa-2.2.1 → viqa-2.2.2}/containers/dh-image-quality-notebook/.dockerignore +0 -0
  32. {viqa-2.2.1 → viqa-2.2.2}/containers/dh-image-quality-notebook/README.md +0 -0
  33. {viqa-2.2.1 → viqa-2.2.2}/containers/jh-image-quality-notebook/.dockerignore +0 -0
  34. {viqa-2.2.1 → viqa-2.2.2}/containers/jh-image-quality-notebook/README.md +0 -0
  35. {viqa-2.2.1 → viqa-2.2.2}/docs/Makefile +0 -0
  36. {viqa-2.2.1 → viqa-2.2.2}/docs/make.bat +0 -0
  37. {viqa-2.2.1 → viqa-2.2.2}/docs/source/_metrics.rst +0 -0
  38. {viqa-2.2.1 → viqa-2.2.2}/docs/source/_multiple.rst +0 -0
  39. {viqa-2.2.1 → viqa-2.2.2}/docs/source/_templates/autosummary/class.rst +0 -0
  40. {viqa-2.2.1 → viqa-2.2.2}/docs/source/api_reference.rst +0 -0
  41. {viqa-2.2.1 → viqa-2.2.2}/docs/source/changelog.rst +0 -0
  42. {viqa-2.2.1 → viqa-2.2.2}/docs/source/conf.py +0 -0
  43. {viqa-2.2.1 → viqa-2.2.2}/docs/source/developer_guide.rst +0 -0
  44. {viqa-2.2.1 → viqa-2.2.2}/docs/source/fr_metrics/fsim.rst +0 -0
  45. {viqa-2.2.1 → viqa-2.2.2}/docs/source/fr_metrics/gsm.rst +0 -0
  46. {viqa-2.2.1 → viqa-2.2.2}/docs/source/fr_metrics/mad.rst +0 -0
  47. {viqa-2.2.1 → viqa-2.2.2}/docs/source/fr_metrics/msssim.rst +0 -0
  48. {viqa-2.2.1 → viqa-2.2.2}/docs/source/fr_metrics/psnr.rst +0 -0
  49. {viqa-2.2.1 → viqa-2.2.2}/docs/source/fr_metrics/rmse.rst +0 -0
  50. {viqa-2.2.1 → viqa-2.2.2}/docs/source/fr_metrics/ssim.rst +0 -0
  51. {viqa-2.2.1 → viqa-2.2.2}/docs/source/fr_metrics/uqi.rst +0 -0
  52. {viqa-2.2.1 → viqa-2.2.2}/docs/source/fr_metrics/vif.rst +0 -0
  53. {viqa-2.2.1 → viqa-2.2.2}/docs/source/fr_metrics/vsi.rst +0 -0
  54. {viqa-2.2.1 → viqa-2.2.2}/docs/source/fr_metrics.rst +0 -0
  55. {viqa-2.2.1 → viqa-2.2.2}/docs/source/fusion.rst +0 -0
  56. {viqa-2.2.1 → viqa-2.2.2}/docs/source/getting_started.rst +0 -0
  57. {viqa-2.2.1 → viqa-2.2.2}/docs/source/index.rst +0 -0
  58. {viqa-2.2.1 → viqa-2.2.2}/docs/source/internal_api_reference.rst +0 -0
  59. {viqa-2.2.1 → viqa-2.2.2}/docs/source/multiple.rst +0 -0
  60. {viqa-2.2.1 → viqa-2.2.2}/docs/source/nr_metrics/cnr.rst +0 -0
  61. {viqa-2.2.1 → viqa-2.2.2}/docs/source/nr_metrics/qmeasure.rst +0 -0
  62. {viqa-2.2.1 → viqa-2.2.2}/docs/source/nr_metrics/snr.rst +0 -0
  63. {viqa-2.2.1 → viqa-2.2.2}/docs/source/nr_metrics.rst +0 -0
  64. {viqa-2.2.1 → viqa-2.2.2}/docs/source/utils/ImageArray.rst +0 -0
  65. {viqa-2.2.1 → viqa-2.2.2}/docs/source/utils.rst +0 -0
  66. {viqa-2.2.1 → viqa-2.2.2}/meson.build +0 -0
  67. {viqa-2.2.1 → viqa-2.2.2}/notebooks/Image_Comparison.ipynb +0 -0
  68. {viqa-2.2.1 → viqa-2.2.2}/notebooks/Image_Comparison_batch.ipynb +0 -0
  69. {viqa-2.2.1 → viqa-2.2.2}/requirements/README.md +0 -0
  70. {viqa-2.2.1 → viqa-2.2.2}/requirements/book.txt +0 -0
  71. {viqa-2.2.1 → viqa-2.2.2}/requirements/build.txt +0 -0
  72. {viqa-2.2.1 → viqa-2.2.2}/requirements/default.txt +0 -0
  73. {viqa-2.2.1 → viqa-2.2.2}/requirements/dev.txt +0 -0
  74. {viqa-2.2.1 → viqa-2.2.2}/requirements/docs.txt +0 -0
  75. {viqa-2.2.1 → viqa-2.2.2}/requirements/lint.txt +0 -0
  76. {viqa-2.2.1 → viqa-2.2.2}/requirements/tests.txt +0 -0
  77. {viqa-2.2.1 → viqa-2.2.2}/requirements.txt +0 -0
  78. {viqa-2.2.1 → viqa-2.2.2}/src/scripts/combine_stack.py +0 -0
  79. {viqa-2.2.1 → viqa-2.2.2}/src/scripts/crop_image.py +0 -0
  80. {viqa-2.2.1 → viqa-2.2.2}/src/scripts/reduce_projections.py +0 -0
  81. {viqa-2.2.1 → viqa-2.2.2}/src/scripts/write_to_csv.py +0 -0
  82. {viqa-2.2.1 → viqa-2.2.2}/src/scripts/write_to_mat.py +0 -0
  83. {viqa-2.2.1 → viqa-2.2.2}/src/viqa/_metrics.py +0 -0
  84. {viqa-2.2.1 → viqa-2.2.2}/src/viqa/fr_metrics/__init__.py +0 -0
  85. {viqa-2.2.1 → viqa-2.2.2}/src/viqa/fr_metrics/fsim.py +0 -0
  86. {viqa-2.2.1 → viqa-2.2.2}/src/viqa/fr_metrics/gsm.py +0 -0
  87. {viqa-2.2.1 → viqa-2.2.2}/src/viqa/fr_metrics/mad.py +0 -0
  88. {viqa-2.2.1 → viqa-2.2.2}/src/viqa/fr_metrics/meson.build +0 -0
  89. {viqa-2.2.1 → viqa-2.2.2}/src/viqa/fr_metrics/msssim.py +0 -0
  90. {viqa-2.2.1 → viqa-2.2.2}/src/viqa/fr_metrics/psnr.py +0 -0
  91. {viqa-2.2.1 → viqa-2.2.2}/src/viqa/fr_metrics/rmse.py +0 -0
  92. {viqa-2.2.1 → viqa-2.2.2}/src/viqa/fr_metrics/ssim.py +0 -0
  93. {viqa-2.2.1 → viqa-2.2.2}/src/viqa/fr_metrics/stat_utils/meson.build +0 -0
  94. {viqa-2.2.1 → viqa-2.2.2}/src/viqa/fr_metrics/stat_utils/statisticscalc.pyi +0 -0
  95. {viqa-2.2.1 → viqa-2.2.2}/src/viqa/fr_metrics/stat_utils/statisticsmodule.c +0 -0
  96. {viqa-2.2.1 → viqa-2.2.2}/src/viqa/fr_metrics/stat_utils/statisticsmodule.h +0 -0
  97. {viqa-2.2.1 → viqa-2.2.2}/src/viqa/fr_metrics/uqi.py +0 -0
  98. {viqa-2.2.1 → viqa-2.2.2}/src/viqa/fr_metrics/vif.py +0 -0
  99. {viqa-2.2.1 → viqa-2.2.2}/src/viqa/fr_metrics/vsi.py +0 -0
  100. {viqa-2.2.1 → viqa-2.2.2}/src/viqa/fusion.py +0 -0
  101. {viqa-2.2.1 → viqa-2.2.2}/src/viqa/kernels.py +0 -0
  102. {viqa-2.2.1 → viqa-2.2.2}/src/viqa/meson.build +0 -0
  103. {viqa-2.2.1 → viqa-2.2.2}/src/viqa/nr_metrics/__init__.py +0 -0
  104. {viqa-2.2.1 → viqa-2.2.2}/src/viqa/nr_metrics/cnr.py +0 -0
  105. {viqa-2.2.1 → viqa-2.2.2}/src/viqa/nr_metrics/meson.build +0 -0
  106. {viqa-2.2.1 → viqa-2.2.2}/src/viqa/nr_metrics/qmeasure.py +0 -0
  107. {viqa-2.2.1 → viqa-2.2.2}/src/viqa/nr_metrics/qmeasure_utils/meson.build +0 -0
  108. {viqa-2.2.1 → viqa-2.2.2}/src/viqa/nr_metrics/qmeasure_utils/qmeasure/CITATION.cff +0 -0
  109. {viqa-2.2.1 → viqa-2.2.2}/src/viqa/nr_metrics/qmeasure_utils/qmeasure/LICENSE +0 -0
  110. {viqa-2.2.1 → viqa-2.2.2}/src/viqa/nr_metrics/qmeasure_utils/qmeasure/README.md +0 -0
  111. {viqa-2.2.1 → viqa-2.2.2}/src/viqa/nr_metrics/qmeasure_utils/qmeasure/src/ImageHistogram.cpp +0 -0
  112. {viqa-2.2.1 → viqa-2.2.2}/src/viqa/nr_metrics/qmeasure_utils/qmeasure/src/ImageHistogram.h +0 -0
  113. {viqa-2.2.1 → viqa-2.2.2}/src/viqa/nr_metrics/qmeasure_utils/qmeasure/src/QMeasureCalculation.cpp +0 -0
  114. {viqa-2.2.1 → viqa-2.2.2}/src/viqa/nr_metrics/qmeasure_utils/qmeasure/src/QMeasureCalculation.h +0 -0
  115. {viqa-2.2.1 → viqa-2.2.2}/src/viqa/nr_metrics/qmeasure_utils/qmeasurecalc.pyi +0 -0
  116. {viqa-2.2.1 → viqa-2.2.2}/src/viqa/nr_metrics/qmeasure_utils/qmeasurecalcmodule.cpp +0 -0
  117. {viqa-2.2.1 → viqa-2.2.2}/src/viqa/nr_metrics/qmeasure_utils/qmeasurecalcmodule.h +0 -0
  118. {viqa-2.2.1 → viqa-2.2.2}/src/viqa/nr_metrics/snr.py +0 -0
  119. {viqa-2.2.1 → viqa-2.2.2}/src/viqa/utils/__init__.py +0 -0
  120. {viqa-2.2.1 → viqa-2.2.2}/src/viqa/utils/_build/get_numpy_path.py +0 -0
  121. {viqa-2.2.1 → viqa-2.2.2}/src/viqa/utils/_build/version.py +0 -0
  122. {viqa-2.2.1 → viqa-2.2.2}/src/viqa/utils/_module.py +0 -0
  123. {viqa-2.2.1 → viqa-2.2.2}/src/viqa/utils/deprecation.py +0 -0
  124. {viqa-2.2.1 → viqa-2.2.2}/src/viqa/utils/meson.build +0 -0
  125. {viqa-2.2.1 → viqa-2.2.2}/src/viqa/utils/misc.py +0 -0
  126. {viqa-2.2.1 → viqa-2.2.2}/src/viqa/utils/visualization.py +0 -0
  127. {viqa-2.2.1 → viqa-2.2.2}/templates/CHANGELOG.md.j2 +0 -0
  128. {viqa-2.2.1 → viqa-2.2.2}/tests/__init__.py +0 -0
  129. {viqa-2.2.1 → viqa-2.2.2}/tests/conftest.py +0 -0
  130. {viqa-2.2.1 → viqa-2.2.2}/tests/test_cnr_pytest.py +0 -0
  131. {viqa-2.2.1 → viqa-2.2.2}/tests/test_fsim_pytest.py +0 -0
  132. {viqa-2.2.1 → viqa-2.2.2}/tests/test_mad_pytest.py +0 -0
  133. {viqa-2.2.1 → viqa-2.2.2}/tests/test_mad_utils_pytest.py +0 -0
  134. {viqa-2.2.1 → viqa-2.2.2}/tests/test_psnr_pytest.py +0 -0
  135. {viqa-2.2.1 → viqa-2.2.2}/tests/test_rmse_pytest.py +0 -0
  136. {viqa-2.2.1 → viqa-2.2.2}/tests/test_snr_pytest.py +0 -0
  137. {viqa-2.2.1 → viqa-2.2.2}/tests/test_ssim_pytest.py +0 -0
  138. {viqa-2.2.1 → viqa-2.2.2}/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
- * Browser Name and version:
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
@@ -113,7 +113,7 @@ jobs:
113
113
 
114
114
  - name: Python Semantic Release
115
115
  id: release
116
- uses: python-semantic-release/python-semantic-release@v9.12.0
116
+ uses: python-semantic-release/python-semantic-release@v9.21.0
117
117
  with:
118
118
  github_token: ${{ secrets.GITHUB_TOKEN }}
119
119
  git_committer_name: "github-actions"
@@ -328,7 +328,7 @@ jobs:
328
328
  ./dist/*.whl
329
329
 
330
330
  - name: Publish package distributions to GitHub Releases
331
- uses: python-semantic-release/publish-action@v9.12.0
331
+ uses: python-semantic-release/publish-action@v9.21.0
332
332
  with:
333
333
  github_token: ${{ secrets.GITHUB_TOKEN }}
334
334
 
@@ -2,9 +2,9 @@
2
2
  # Install pre-commit hooks via
3
3
  # pre-commit install
4
4
  ci:
5
- autofix_prs: false
5
+ autofix_prs: true
6
6
  autoupdate_schedule: 'quarterly'
7
- autoupdate_commit_msg: 'chore: pre-commit autoupdate\n\nAutomatically generated by pre-commit.ci'
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.0
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.23
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.22.1
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.6
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.35.1
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.3.0
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.14.1
109
+ rev: v1.15.0
110
110
  hooks:
111
111
  - id: mypy
112
112
  additional_dependencies:
@@ -2,6 +2,43 @@
2
2
 
3
3
 
4
4
 
5
+ ## v2.2.2 (2025-04-09)
6
+
7
+ ### Bug fixes
8
+
9
+ * fix: fix semantic release exclude commit pattern ([`b24070e`](https://github.com/3dct/vIQA/commit/b24070ec67f74d68d0915524d77bfa11a828bcc3))
10
+
11
+ * fix: fix rois in BatchMetrics.report when exporting images ([`88c8931`](https://github.com/3dct/vIQA/commit/88c89317ae9735685f16953a5b2338e72fe2a74c))
12
+
13
+ * fix: enable rois in BatchMetrics
14
+
15
+ closes #11 ([`c2b0ce5`](https://github.com/3dct/vIQA/commit/c2b0ce5102aec6ee9ce9434bfc9d3ea8eabdbc12))
16
+
17
+ * fix: add check for image dimensions during loading (#15)
18
+
19
+ * fix: add check for image dimensions during loading
20
+
21
+ closes #14
22
+
23
+ * [pre-commit.ci] auto fixes from pre-commit.com hooks
24
+
25
+ for more information, see https://pre-commit.ci
26
+
27
+ * refactor: refactor to comply with ruff
28
+
29
+ * docs(load_data): add Exception to function docstring
30
+
31
+ ---------
32
+
33
+ Co-authored-by: Lukas Nepelius <p42940@fhooe.at>
34
+ Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
35
+ Co-authored-by: lukasbehammer <lukas.behammer@fh-wels.at> ([`a120ade`](https://github.com/3dct/vIQA/commit/a120adea9a19fa1e19b4f82cbf95232482fa7be4))
36
+
37
+ ### Documentation
38
+
39
+ * docs: refactor user guide ([`c423f57`](https://github.com/3dct/vIQA/commit/c423f573db92326e4e96f815690ce50866a59a01))
40
+
41
+
5
42
  ## v2.2.1 (2025-04-02)
6
43
 
7
44
  ### Bug fixes
@@ -109,12 +146,6 @@ fix csv delimiter sniffing, add support for tsv and txt files during loading of
109
146
 
110
147
  ## v2.0.0 (2024-10-22)
111
148
 
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
149
  ### Bug fixes
119
150
 
120
151
  * fix: convert rgb images to grayscale before binarization ([`f258f96`](https://github.com/3dct/vIQA/commit/f258f96d38efd6acc56fca9f1dcd823987703058))
@@ -169,6 +200,12 @@ update documentation, refactor definition of variable truncate ([`851521b`](http
169
200
 
170
201
  make sure that an ImageArray is returned via numpy ufunc ([`31524fb`](https://github.com/3dct/vIQA/commit/31524fbff81ff0cf52c9be7dc2e22b116c7dd286))
171
202
 
203
+ ### Refactoring
204
+
205
+ * refactor!: move utility modules to utils subpackage
206
+
207
+ BREAKING CHANGE: major refactoring of utility functions ([`d3945b4`](https://github.com/3dct/vIQA/commit/d3945b47b710c471973296c70c93c272cc0f9552))
208
+
172
209
 
173
210
  ## v1.13.0 (2024-09-24)
174
211
 
@@ -509,9 +546,8 @@ function writes custom parameters and package version to a .txt file ([`5b8e607`
509
546
 
510
547
  ## v1.0.0 (2024-08-05)
511
548
 
512
- ### Breaking
549
+ ### Features
513
550
 
514
551
  * feat(ImageArray)!: add class for images
515
552
 
516
553
  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.1
3
+ Version: 2.2.2
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.12.0; extra == "cd"
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>4.8.0
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>4.8.0
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.12.0",
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(?:\\([^)]*?\\))?: .+",
@@ -1,4 +1,4 @@
1
1
  # Generated via tools/generate_requirements.py and pre-commit hook.
2
2
  # Do not edit this file; modify pyproject.toml instead.
3
- python-semantic-release ==9.12.0
3
+ python-semantic-release ==9.21.0
4
4
  cibuildwheel ==2.19.2
@@ -5,7 +5,7 @@ The package provides a set of metrics to assess the quality of volumetric images
5
5
  It can be used for 2D and 3D images.
6
6
  """
7
7
 
8
- __version__ = "2.2.1"
8
+ __version__ = "2.2.2"
9
9
  __author__ = "Lukas Behammer"
10
10
  __all__ = [
11
11
  "FSIM",
@@ -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 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