Project

General

Profile

Actions

Bug #3091

closed

Message in Terminal when calculating DVH values

Added by Andrew Miller 2 months ago. Updated about 1 month ago.

Status:
Closed
Priority:
Normal
Assignee:
Start date:
30/05/2026
Due date:
% Done:

0%

Estimated time:

Description

An example of the repeating message provided while calculating the DVH:

2026-05-30 13:37:33,936 - WARNING - The value length (19) exceeds the maximum length of 16 allowed for VR DS. Please see <https://dicom.nema.org/medical/dicom/current/output/html/part05.html#table_6.2-1> for allowed values for each VR.

The DVH calculates properly.

Does this indicate a problem that should be fixed?

Actions #1

Updated by ashley maher about 2 months ago

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.

Actions #2

Updated by Andrew Miller about 2 months ago

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

Actions #3

Updated by ashley maher about 1 month ago

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.

Actions #4

Updated by Andrew Miller about 1 month ago

  • Status changed from New to Closed
Actions

Also available in: Atom PDF