Bug #3091
closed
When exporting DVH data, the software was writing numerical values with up to 17 decimal digits of precision. The international DICOM standard (which governs how radiotherapy files are stored and exchanged) imposes a strict 16-character limit on numerical fields of this type. The software was silently violating that limit, which could cause other DICOM-compliant systems (treatment planning systems, record-and-verify systems, etc.) to reject or misread the exported file.
Values are now formatted to 6 significant figures before being written to the file.
Six significant figures corresponds to a maximum rounding error of 0.0001% (1 part in 1,000,000). For dose bin widths, this is negligible. For voxel counts, any count up to 999,999 is stored exactly. No previously computed DVH values change; only the representation written to the export file is affected.
Thank you, the old message has gone to be replaced by a new one!
2026-06-19 15:39:26,928 - WARNING - The 'pydicom.pixel_data_handlers' module will be removed in v4.0, please use 'from pydicom.pixels.utils import pixel_dtype' instead
The call chain is:
1. OnkoDICOM calls dicompylercore to do DVH calculations
2. dicompylercore/dicomparser.py line 16 imports pixel_dtype from the old path pydicom.pixel_data_handlers.util
3. pydicom 3.x moved that to pydicom.pixels.utils and emits the deprecation warning
Nothing in the OnkoDICOM source uses pixel_data_handlers directly. The fix belongs in dicompyler-core, not OnkoDICOM.
The warnings can be suppressed, but it is absolutely not recommended.
- Status changed from New to Closed
Also available in: Atom
PDF