Skip to content

Volume dtype restriction#409

Closed
mccle wants to merge 8 commits into
masterfrom
volume_dtype_restriction
Closed

Volume dtype restriction#409
mccle wants to merge 8 commits into
masterfrom
volume_dtype_restriction

Conversation

@mccle
Copy link
Copy Markdown
Collaborator

@mccle mccle commented May 18, 2026

Added checks to the volume init and setter methods to ensure volumes have float, integer, or bool types. A new test was added to verify that volumes cannot be instantiated with an array of an unsupported data type nor changed after instantiation to a new data type that is unsupported.

CPBridge and others added 8 commits November 6, 2025 20:42
Add import_optional_dependency util function
* Remove packaging version specifier

* Update packaging dependency version in pyproject.toml

---------

Co-authored-by: Mason C. Cleveland <104479423+mccle@users.noreply.github.com>
* Add import_optional_dependency util function

* Update optional import function.

* Reformat code

* Add module version compatibility check.

* Move version incompatibility error raise location and update error message

* Update src/highdicom/utils.py

Co-authored-by: Chris Bridge <chrisbridge44@googlemail.com>

* Update src/highdicom/utils.py

Co-authored-by: Chris Bridge <chrisbridge44@googlemail.com>

* Update src/highdicom/utils.py

Co-authored-by: Chris Bridge <chrisbridge44@googlemail.com>

* Update src/highdicom/utils.py

Co-authored-by: Chris Bridge <chrisbridge44@googlemail.com>

* Update src/highdicom/utils.py

Co-authored-by: Chris Bridge <chrisbridge44@googlemail.com>

* Move to new utils file

* Add packaging to requirements

* add itk and sitk conversions

* Add frame_of_reference_uid and coordinate_system arguments; update docstrings; reformat strings

* remove channel argument

* add noqa to work with flake8

* update type hints, minor tweaks to bool retyping

* sync changes

* flake8

* Add tests for sitk

* flake8

* skip sitk test on failed import

* fix url syntax

* Fix itk conversion and add tests

* Update .github/workflows/run_unit_tests.yml

Co-authored-by: Chris Bridge <chrisbridge44@googlemail.com>

* Replace common url elements

* Update docstrings and error messages

* Update volume docs file

* Update dtype tests with array equality and random values

* Apply suggestion from @CPBridge

Co-authored-by: Chris Bridge <chrisbridge44@googlemail.com>

* Reorganize and update docs files

* Update docstrings

* Fix multichannel check and add tests

---------

Co-authored-by: Chris Bridge <chrisbridge44@googlemail.com>
@mccle mccle closed this May 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants