# W: ContourData (3006,0050) violates maximum VR length in ContourSequence

**URL:** <https://discourse.slicer.org/t/w-contourdata-3006-0050-violates-maximum-vr-length-in-contoursequence/43565>\
**Category:** Feature requests\
**Tags:** dicom\
**Created:** [July 1, 2025, 6:03pm UTC](https://discourse.slicer.org/t/w-contourdata-3006-0050-violates-maximum-vr-length-in-contoursequence/43565 "2025-07-01T18:03:40Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ferhue](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/ferhue/32/82557_2.png) [@ferhue](https://discourse.slicer.org/u/ferhue)\
**Post date:** [July 1, 2025, 6:03pm UTC](https://discourse.slicer.org/t/w-contourdata-3006-0050-violates-maximum-vr-length-in-contoursequence/43565/1 "2025-07-01T18:03:40Z")

</div>

Hello,

When loading in Slicer, I get the following warning printed many times:  
`W: ContourData (3006,0050) violates maximum VR length in ContourSequence`

I do not fully understand this, since the largest sequence contains about 32000 characters, and I thought that it would support until 65000 bytes.

I am generating these RTstruct using pydicom.  
Is there a trick to tell pydicom to remove decimal places in the floating points to make it fit into the maximum VR length? Or is this rather a bug in dcmtk? I set ExplicitVRLittleEndian, not sure if that is relevant.

Note that Slicer seems to load the file and visualize it correctly, the only problem are the warnings in the log (of severity critical)

CT Files and RTstruct are here: [Consigna UV - Arreplegant fitxer](https://consigna.uv.es/?recoge:ca:5266_8206_2288_7250)

I am using 3DSlicer 5.8.1

fyi @lassoan

---

<div class="post-metadata">

**Author:** ![issakomi](https://avatars.discourse-cdn.com/v4/letter/i/b9e5f3/32.png) [@issakomi](https://discourse.slicer.org/u/issakomi)\
**Post date:** [July 3, 2025, 2:10am UTC](https://discourse.slicer.org/t/w-contourdata-3006-0050-violates-maximum-vr-length-in-contoursequence/43565/2 "2025-07-03T02:10:30Z")

</div>

> `W: ContourData (3006,0050) violates maximum VR length in ContourSequence`

`dciodvfy` also complains about it, e.g.

`Error - Value invalid for this VR - (0x3006,0x0050) DS Contour Data DS [3] = <-1087.5608163265306> - Length invalid for this VR = 19, expected <= 16`

There are very many such warnings.  
But it is related to individual DS entries, DS should be max. 16 bytes. BTW, with most programs this is usually not a problem.

> I set ExplicitVRLittleEndian, not sure if that is relevant.

It may be relevant for large contours, but it is not relevant in this particular case. S. [Tables 7.1-1, 7.1-2 and 7.1-3](https://dicom.nema.org/medical/dicom/current/output/chtml/part05/chapter_7.html#table_7.1-1). For explicit TS + VR::DS the value length field of the data element is _uint16_. For implicit it is always _uint32_. It is also mentioned here s. DS in the [Table 6.2-1](https://dicom.nema.org/medical/dicom/current/output/chtml/part05/sect_6.2.html#table_6.2-1)

---

<div class="post-metadata">

**Author:** ![ferhue](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/ferhue/32/82557_2.png) [@ferhue](https://discourse.slicer.org/u/ferhue)\
**Post date:** [July 3, 2025, 5:47am UTC](https://discourse.slicer.org/t/w-contourdata-3006-0050-violates-maximum-vr-length-in-contoursequence/43565/3 "2025-07-03T05:47:39Z")

</div>

> [@issakomi](#):
>
> DS should be max. 16 bytes.

Thanks a lot for the reply. So this issue might surely come from [Strings with Value Representation DS are too long · Issue #1264 · pydicom/pydicom · GitHub](https://github.com/pydicom/pydicom/issues/1264) and it seems easy to change.
