ImagingDataCommons / highdicom

High-level DICOM abstractions for the Python programming language
https://highdicom.readthedocs.io
MIT License
164 stars 34 forks source link

Fixes to various VRs flagged by tests #239

Closed CPBridge closed 1 year ago

CPBridge commented 1 year ago

Pydicom 2.4.0 and 2.4.1 have stricter checks on value representations when pydicom.config.enforce_valid_values is True than previous versions of pydicom. Some of our code falls foul of these new checks and since we set pydicom.config/enforce_valid_values=True in our conftest.py, our tests are currently failing with pydicom>=2.4.0.

The type incompatibilities are related to either using a numpy integer type rather than a python built-in integer type, or using a tuple as a multivalue rather than a list.

This PR explicitly casts to appropriate types to fix all of the errors raised by our test suite.