# Convert 3D dose distribution to DICOM RT dose

**URL:** <https://discourse.slicer.org/t/convert-3d-dose-distribution-to-dicom-rt-dose/6930>\
**Category:** Support\
**Created:** [May 26, 2019, 2:06pm UTC](https://discourse.slicer.org/t/convert-3d-dose-distribution-to-dicom-rt-dose/6930 "2019-05-26T14:06:30Z")\
**Posts on this page:** 16\
**Page:** 2

<div class="post-metadata">

**Author:** ![ToufikDZ](https://avatars.discourse-cdn.com/v4/letter/t/7ea924/32.png) [@ToufikDZ](https://discourse.slicer.org/u/ToufikDZ)\
**Post date:** [May 28, 2019, 4:11pm UTC](https://discourse.slicer.org/t/convert-3d-dose-distribution-to-dicom-rt-dose/6930/21 "2019-05-28T16:11:18Z")

</div>

I send the links again. The first link is for voxel dose distribution, the second one is for 3D dose distribution.

> **[tallyVoxelDoseDistrib.dat](https://drive.google.com/file/d/1cUzDR1U-q-EDymA7Pf4DCoVgyBk-KRCq/view?usp=drive_open)**
>
> Google Drive file.

  
[https://drive.google.com/open?id=1joK-fOnqvwOIyTPEQg4I8CrH3hYJpakT](https://drive.google.com/open?id=1joK-fOnqvwOIyTPEQg4I8CrH3hYJpakT)

---

<div class="post-metadata">

**Author:** ![cpinter](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/cpinter/32/7995_2.png) [@cpinter](https://discourse.slicer.org/u/cpinter)\
**Post date:** [May 28, 2019, 5:31pm UTC](https://discourse.slicer.org/t/convert-3d-dose-distribution-to-dicom-rt-dose/6930/22 "2019-05-28T17:31:27Z")

</div>

Indeed the geometry is not contained by these files. You will probably need to export them seperately as @Hamburgerfinger mentioned above.

The files otherwise seem to be straightforward to load, it should be easy to write an importer.

---

<div class="post-metadata">

**Author:** ![ToufikDZ](https://avatars.discourse-cdn.com/v4/letter/t/7ea924/32.png) [@ToufikDZ](https://discourse.slicer.org/u/ToufikDZ)\
**Post date:** [May 28, 2019, 9:04pm UTC](https://discourse.slicer.org/t/convert-3d-dose-distribution-to-dicom-rt-dose/6930/23 "2019-05-28T21:04:59Z")

</div>

What do you mean by geometry, please? Is the geometry file (phantom) used for simulation? if so here is the link to it:

> **[Phantom.vox](https://drive.google.com/file/d/1CVy3LlQ-7O47Gcs8M8l59e0GWiHoVbPR/view?usp=drive_open)**
>
> Google Drive file.

I think the easiest way to plot the DVH is by using the DICOM RT dose file. My idea is to use the original DICOM RT dose file and replace the dose distribution by the data obtained from MC simulation. By the way, I use for simulation the code Penelope/penEasy.  
Is there a way to do that with Slicer, please?

---

<div class="post-metadata">

**Author:** ![Hamburgerfinger](https://avatars.discourse-cdn.com/v4/letter/h/eb9ed0/32.png) [@Hamburgerfinger](https://discourse.slicer.org/u/Hamburgerfinger)\
**Post date:** [May 28, 2019, 11:51pm UTC](https://discourse.slicer.org/t/convert-3d-dose-distribution-to-dicom-rt-dose/6930/24 "2019-05-28T23:51:55Z")

</div>

So it looks like you have the ‘region labels’ in the left column, where you have 5 different regions defined (it looks like they have been defined by thresholding of CT data), see Labelmap.png, attached. Here 5 is red, 4 is magenta, 3  
is blue, 2 is green, and 1 is yellow.

Then in the right column, you have the density in each voxel; see Density.png, attached.

So yes in principle this is the geometry you need to define as a segmentation in Slicer for DVH. One issue is, in your region label map, bone for instance mostly has a region label of ‘5’ but there are other non-bone structures that also  
have this label; soft tissue mostly has a region label of ‘4’ but there are other non-tissue structures with this label also; etc. So you could use these regions for DVH, but there will be some error due to the other non-tissue structure with the same labels  
in your dataset.

To fix this, you could import the data in the left column into Slicer as a segmentation, and edit it in the segment editor, and then use for DVH. Or you could import the density map (or, better, use the CT it was derived from) segment  
the regions of interest, and use that for DVH.

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/8/9/89cc2858cd18f7b049f406e95902a1f4e056dac2.png)

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/c/9/c9c27d769a3fbe2d4eaf05a58d2644ed370b5636.png)

---

<div class="post-metadata">

**Author:** ![ToufikDZ](https://avatars.discourse-cdn.com/v4/letter/t/7ea924/32.png) [@ToufikDZ](https://discourse.slicer.org/u/ToufikDZ)\
**Post date:** [May 30, 2019, 8:45pm UTC](https://discourse.slicer.org/t/convert-3d-dose-distribution-to-dicom-rt-dose/6930/25 "2019-05-30T20:45:01Z")

</div>

Thank you very much for these explanation.  
In fact the region of interest is a small volume in the soft tissue region defined in the DICOM files. I want to use this region for DVH. For that I want to convert my file to DICOM file.

---

<div class="post-metadata">

**Author:** ![cpinter](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/cpinter/32/7995_2.png) [@cpinter](https://discourse.slicer.org/u/cpinter)\
**Post date:** [May 30, 2019, 8:57pm UTC](https://discourse.slicer.org/t/convert-3d-dose-distribution-to-dicom-rt-dose/6930/26 "2019-05-30T20:57:25Z")

</div>

If you have means to convert this to any type of file that can be read from Slicer (nrrd, nifti, mha, etc.), then your problem is solved. Otherwise a reader needs to be implemented for this file format.

---

<div class="post-metadata">

**Author:** ![bode](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/bode/32/4267_2.png) [@bode](https://discourse.slicer.org/u/bode)\
**Post date:** [July 26, 2019, 7:42am UTC](https://discourse.slicer.org/t/convert-3d-dose-distribution-to-dicom-rt-dose/6930/27 "2019-07-26T07:42:17Z")

</div>

Hello cpinter,

I just read the discussion. I am looking for an Viewer/ Reader which is able to handle .3ddose files from DOSXYZnrc. Is it possible to Import and visualize .3ddose files and maybe convert them to DICOM RT files for further comparisons in a Treatment planning system?

Kind regards, bode

---

<div class="post-metadata">

**Author:** ![cpinter](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/cpinter/32/7995_2.png) [@cpinter](https://discourse.slicer.org/u/cpinter)\
**Post date:** [July 26, 2019, 12:35pm UTC](https://discourse.slicer.org/t/convert-3d-dose-distribution-to-dicom-rt-dose/6930/28 "2019-07-26T12:35:20Z")

</div>

Yes. Have the SlicerRT extension installed, drag&drop the 3ddose file onto Slicer, then do DICOM export as usual: [https://www.slicer.org/wiki/Documentation/Nightly/Modules/DICOM#DICOM\_export](https://www.slicer.org/wiki/Documentation/Nightly/Modules/DICOM#DICOM_export)

That said you can do comparisons using SlicerRT. It has DVH and gamma comparison tools.

---

<div class="post-metadata">

**Author:** ![DUONG\_Thanh\_Tai](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/duong_thanh_tai/32/10533_2.png) [@DUONG\_Thanh\_Tai](https://discourse.slicer.org/u/DUONG_Thanh_Tai)\
**Post date:** [September 1, 2022, 8:13pm UTC](https://discourse.slicer.org/t/convert-3d-dose-distribution-to-dicom-rt-dose/6930/29 "2022-09-01T20:13:21Z")

</div>

Hi everyone,

I have the 3ddose file from the Monte Carlo simulation. After that, I converted the 3ddose file to Dicom format.  
My question is:  
(1) with the same 3ddose, but the DVH plotted directly from the 3ddose differs from the DVH plotted from the Dicom format.

(2) The dose value in 3ddose is about 2.3716289e-18, but the DVH shows the value of the x-axis is from 0 to 60000. What is the unit of the x-axis?

---

<div class="post-metadata">

**Author:** ![cpinter](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/cpinter/32/7995_2.png) [@cpinter](https://discourse.slicer.org/u/cpinter)\
**Post date:** [September 2, 2022, 10:02am UTC](https://discourse.slicer.org/t/convert-3d-dose-distribution-to-dicom-rt-dose/6930/30 "2022-09-02T10:02:51Z")

</div>

> [@DUONG\_Thanh\_Tai](#):
>
> I converted the 3ddose file to Dicom format.

Please describe exactly how you did this.

Also please check the scalar range of both dose volumes in the Volumes module. Maybe exporting trimmed or rescaled the scalars.

---

<div class="post-metadata">

**Author:** ![DUONG\_Thanh\_Tai](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/duong_thanh_tai/32/10533_2.png) [@DUONG\_Thanh\_Tai](https://discourse.slicer.org/u/DUONG_Thanh_Tai)\
**Post date:** [September 2, 2022, 1:16pm UTC](https://discourse.slicer.org/t/convert-3d-dose-distribution-to-dicom-rt-dose/6930/31 "2022-09-02T13:16:20Z")

</div>

Hi Csaba Pinter,

Thank you for your response.

The 3ddose file was converted to RTdose.dcm and then I input the 3ddose and RTdose.dcm to Slicer RT and plot two DVHs. The DVH plotted from the 3ddose is about two times different with the DVH plotted from RTdose.dcm

 ![DVH](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/2/e/2e077253b4dc54855e879817d1f297a131e31584.png)

---

<div class="post-metadata">

**Author:** ![cpinter](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/cpinter/32/7995_2.png) [@cpinter](https://discourse.slicer.org/u/cpinter)\
**Post date:** [September 2, 2022, 1:25pm UTC](https://discourse.slicer.org/t/convert-3d-dose-distribution-to-dicom-rt-dose/6930/32 "2022-09-02T13:25:07Z")

</div>

> [@DUONG\_Thanh\_Tai](#):
>
> The 3ddose file was converted to RTdose.dcm

How _exactly_? This was my first question.

Please also answer the second question about the scalar ranges.

---

<div class="post-metadata">

**Author:** ![DUONG\_Thanh\_Tai](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/duong_thanh_tai/32/10533_2.png) [@DUONG\_Thanh\_Tai](https://discourse.slicer.org/u/DUONG_Thanh_Tai)\
**Post date:** [September 2, 2022, 1:57pm UTC](https://discourse.slicer.org/t/convert-3d-dose-distribution-to-dicom-rt-dose/6930/33 "2022-09-02T13:57:11Z")

</div>

> [@cpinter](#):
>
> scalar ranges

Hi,

Please see the picture

 ![RTdose.dcm](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/3/f/3f4b816288306eff3064c5fcf04353b386b0840f.png)  
 ![3ddose](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/2/9/290dcd4fb640a8674729eae3fc3fb3682d55b96d.png)

---

<div class="post-metadata">

**Author:** ![cpinter](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/cpinter/32/7995_2.png) [@cpinter](https://discourse.slicer.org/u/cpinter)\
**Post date:** [September 2, 2022, 4:24pm UTC](https://discourse.slicer.org/t/convert-3d-dose-distribution-to-dicom-rt-dose/6930/34 "2022-09-02T16:24:32Z")

</div>

Thanks! The scalar range as you can see is very different: (8, 61439) vs (4.067, 27853.7). You will need to revise the way you converted the volume to DICOM, but since you don’t provide details about how you did that I cannot help you there.

---

<div class="post-metadata">

**Author:** ![Rafael\_Scatena](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/rafael_scatena/32/66222_2.png) [@Rafael\_Scatena](https://discourse.slicer.org/u/Rafael_Scatena)\
**Post date:** [June 2, 2023, 6:17pm UTC](https://discourse.slicer.org/t/convert-3d-dose-distribution-to-dicom-rt-dose/6930/35 "2023-06-02T18:17:31Z")

</div>

Convert result of the simulation to a .nrrd dose volume with ITK toolkit. Then Slicer will be able to read it

---

<div class="post-metadata">

**Author:** ![rblowe](https://avatars.discourse-cdn.com/v4/letter/r/bc8723/32.png) [@rblowe](https://discourse.slicer.org/u/rblowe)\
**Post date:** [February 9, 2024, 11:30am UTC](https://discourse.slicer.org/t/convert-3d-dose-distribution-to-dicom-rt-dose/6930/36 "2024-02-09T11:30:13Z")

</div>

@Rafael_Scatena : Can you describe how this is done? Any hint would be appreciated.

[Previous page](https://discourse.slicer.org/t/convert-3d-dose-distribution-to-dicom-rt-dose/6930.md?page=1)
