Project

General

Profile

Actions

Bug #3091

open

Message in Terminal when calculating DVH values

Added by Andrew Miller 22 days ago. Updated 1 day ago.

Status:
New
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 6 days 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 1 day 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

Also available in: Atom PDF