3.1.0#
Changes#
- DICOM dictionary updated to 2024d. 
- Prefer using pylibjpeg over GDCM when encoding RLE Lossless. 
- Prefer using Pillow when decoding JPEG Baseline 8-bit and JPEG Extended 12-bit 
- Improvements made to communications with the plugins when decoding and encoding pixel data and correcting for inter-frame decoding variations in multi-frame datasets (#2262). 
- The metadata returned by - Decoder.as_bufferis now a- dictcontaining the per-frame metadata to help account for inter-frame variations in frame properties when decoding.
Fixes#
- Changed logging of missing plugin imports to use - logging.DEBUG(#2128).
- Include all - examplesmodule datasets with the package (#2128, #2131).
- Fixed an invalid VR value in the private data dictionary (#2132). 
- Fixed checking for Bits Stored when converting Float Pixel Data and Double Float Pixel Data using the - pixelsbackend (#2135).
- Fixed decoding of pixel data for images with Bits Allocated of 1 when frame boundaries are not aligned with byte boundaries (#2134). 
- Fixed a number of issues with decoding pixel data on big endian systems such as s390x (#2147). 
- Fixed being unable to pickle datasets containing LUT descriptor elements such as LUT Descriptor and Red Palette Color LUT Descriptor (#2160). 
- Fixed - decompress()and- compress()changing the SOP Instance UID when not required (#2171).
- Make sure the value of multi-valued tags is always returned as an instance of - MultiValue.
- Make sure that no download of examples is attempted on importing examples if the example data is not found locally (#2223). 
- Add mitigation and better error messaging for SWIG errors when using GDCM to decompress datasets with more than 2**31 - 1 bytes (#2227). 
- Use the setting - writing_validation_modealso for writing values with VRs supporting only ASCII characters (#2243).
- Correctly handle empty values represented as empty strings in json while converting them to a dataset (#2221). 
- Correctly handle empty LUT data (#2238). 
- Fixed data in the “unused” bits above Bits Stored sometimes being included in the returned pixel data for JPEG 2000 and JPEG-LS (#2260). 
Enhancements#
- Python 3.12, 3.13 and 3.14 are now supported. 
- Added the option to pass a - boolndarray to- set_pixel_data()to store with Bits Allocated of- 1using bit-packing (#2141).
- Added a check to - set_pixel_data()to ensure that the pixel data length doesn’t exceed the allowed maximum.
- Added the - Dataset.is_decompressedconvenience property for determining whether a dataset uses a compressed transfer syntax or not (#2155).
- Updated UIDs to version 2024d of the DICOM Standard 
- The following UID constants have been added: 
- Added ability to specify tag numbers in the CLI commands (allows private tags to be specified) 
- Removed exec and eval from tests, CLI, and scripts for improved security (#2193) 
- Added support for up to 16-bit input images to - convert_color_space()
- Added support for - YBR_PARTIAL_420and- YBR_PARTIAL_422to- convert_color_space()(#2210)
- Added support for compressing and decompressing Deflated Image Frame Compression (#2213) 
- Suggest an element keyword when an unknown camel case dataset attribute is used. 
- Added enhanced exception notes (Python >= 3.11) giving a pseudo-code path to the DICOM object where an error occurred. Activated using with dataset: context; already used internally in key locations (#2168) 
- Added support for adding unknown public transfer syntaxes to - register_transfer_syntax()
- When decoding JPEG pixel data use Pillow’s color transformations rather than - convert_color_space()where applicable (#2228)
- Take the color space information from an Adobe APP14 marker into account when decoding pixel data for JPEG transfer syntaxes. 
