# Read DICOM-RT to obtain structure volumes as arrays

**URL:** <https://discourse.itk.org/t/read-dicom-rt-to-obtain-structure-volumes-as-arrays/4860>\
**Category:** Beginner Questions\
**Created:** [March 13, 2022, 7:17am UTC](https://discourse.itk.org/t/read-dicom-rt-to-obtain-structure-volumes-as-arrays/4860 "2022-03-13T07:17:54Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![RT\_newbie](https://discourse.itk.org/letter_avatar_proxy/v4/letter/r/f17d59/32.png) [@RT\_newbie](https://discourse.itk.org/u/RT_newbie)\
**Post date:** [March 13, 2022, 7:17am UTC](https://discourse.itk.org/t/read-dicom-rt-to-obtain-structure-volumes-as-arrays/4860/1 "2022-03-13T07:17:54Z")

</div>

Hi all,

What I want to do is overwriting HU value of a contoured structure in a CT image.  
Starting point is a CT image as DICOM sequence and a DICOM RT file for the structure set.

I know how to read in the CT image and get the array - now I need a binary array of the structure volume, which I want to overwrite. However, I am failing to read in the structure set file. Is there a way to do this with sITK?

I already saw [this discussion](https://discourse.itk.org/t/reading-dicom-rt-files/960), however I am looking for a solution for a python script, as this is only one step within a longer workflow.

Thanks for your help!

---

<div class="post-metadata">

**Author:** ![zivy](https://discourse.itk.org/user_avatar/discourse.itk.org/zivy/32/1726_2.png) [@zivy](https://discourse.itk.org/u/zivy)\
**Post date:** [March 13, 2022, 1:23pm UTC](https://discourse.itk.org/t/read-dicom-rt-to-obtain-structure-volumes-as-arrays/4860/2 "2022-03-13T13:23:30Z")

</div>

Hello @RT_newbie,

SimpleITK does not support DICOM RT.

[This code](https://github.com/dave3d/dicomrt_tools/tree/812627ad1e126f4f4fe0f461028b8a58191b1c09) written by @dchen which uses pydicom and vtk may be relevant.
