# Is there a simple way to compute SUVs if patient weights are kept separate from the DICOM files?

**URL:** <https://discourse.slicer.org/t/is-there-a-simple-way-to-compute-suvs-if-patient-weights-are-kept-separate-from-the-dicom-files/2326>\
**Category:** Support\
**Created:** [March 15, 2018, 2:17pm UTC](https://discourse.slicer.org/t/is-there-a-simple-way-to-compute-suvs-if-patient-weights-are-kept-separate-from-the-dicom-files/2326 "2018-03-15T14:17:26Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![drusmanbashir](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/drusmanbashir/32/1282_2.png) [@drusmanbashir](https://discourse.slicer.org/u/drusmanbashir)\
**Post date:** [March 15, 2018, 2:17pm UTC](https://discourse.slicer.org/t/is-there-a-simple-way-to-compute-suvs-if-patient-weights-are-kept-separate-from-the-dicom-files/2326/1 "2018-03-15T14:17:27Z")

</div>

Hi,  
My dataset has been anonymised rather rigorously and weights stripped. I have them separately and wish to enter them manually case-by-case. I have tried several plugins e.g., SUV factor calculator, PET image maker, but they all ask for DICOM files and do not let me input patient weight data. Is there a way around this ?

Thanks  
Usman.

---

<div class="post-metadata">

**Author:** ![pieper](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/pieper/32/8_2.png) [@pieper](https://discourse.slicer.org/u/pieper)\
**Post date:** [March 15, 2018, 2:48pm UTC](https://discourse.slicer.org/t/is-there-a-simple-way-to-compute-suvs-if-patient-weights-are-kept-separate-from-the-dicom-files/2326/2 "2018-03-15T14:48:36Z")

</div>

The easiest might be just to write a script with pydicom or command line tools to add the info back into the dicom files.

One option would be to fork and modify the dicom patcher with some custom code.

> <https://github.com/Slicer/Slicer/blob/58c8311c55c0d73e1311247b2a5a2d25253b6a3e/Modules/Scripted/DICOMPatcher/DICOMPatcher.py>

---

<div class="post-metadata">

**Author:** ![fedorov](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/fedorov/32/14_2.png) [@fedorov](https://discourse.slicer.org/u/fedorov)\
**Post date:** [March 15, 2018, 4:58pm UTC](https://discourse.slicer.org/t/is-there-a-simple-way-to-compute-suvs-if-patient-weights-are-kept-separate-from-the-dicom-files/2326/3 "2018-03-15T16:58:31Z")

</div>

It might be easier to batch-fix the dataset by using the [`dcmodify` tool of DCMTK](http://support.dcmtk.org/docs/dcmodify.html). Here’s the command to modify the value in a single file in place (or with `-i` if `PatientWeight` tag was removed completely):

```auto
$ dcmodify -nb -m PatientWeight=200 pet001.dcm

```

---

<div class="post-metadata">

**Author:** ![drusmanbashir](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/drusmanbashir/32/1282_2.png) [@drusmanbashir](https://discourse.slicer.org/u/drusmanbashir)\
**Post date:** [March 16, 2018, 12:28pm UTC](https://discourse.slicer.org/t/is-there-a-simple-way-to-compute-suvs-if-patient-weights-are-kept-separate-from-the-dicom-files/2326/4 "2018-03-16T12:28:14Z")

</div>

Thanks for the help. Unfortunately, even after fixing the weights with a script, Slicer was crashing in the SUV factor calculator CLI while running its PETDicom plugin(although Osirix SUV converter is able to convert SUVs if i manually enter the weights, hence confused why SUV factor calculator should crash). Ended up writing a script that takes in .nrrd volumes of uncorrected values and replaces them with SUVs using weights and relevant DICOM tags input separately.

---

<div class="post-metadata">

**Author:** ![fedorov](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/fedorov/32/14_2.png) [@fedorov](https://discourse.slicer.org/u/fedorov)\
**Post date:** [March 16, 2018, 1:23pm UTC](https://discourse.slicer.org/t/is-there-a-simple-way-to-compute-suvs-if-patient-weights-are-kept-separate-from-the-dicom-files/2326/5 "2018-03-16T13:23:18Z")

</div>

Can you share a sample dataset?

Cc: @chribaue

---

<div class="post-metadata">

**Author:** ![fedorov](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/fedorov/32/14_2.png) [@fedorov](https://discourse.slicer.org/u/fedorov)\
**Post date:** [March 16, 2018, 5:07pm UTC](https://discourse.slicer.org/t/is-there-a-simple-way-to-compute-suvs-if-patient-weights-are-kept-separate-from-the-dicom-files/2326/6 "2018-03-16T17:07:34Z")

</div>

I also submitted an issue to address this in the implementation: [https://github.com/QIICR/Slicer-SUVFactorCalculator/issues/3](https://github.com/QIICR/Slicer-SUVFactorCalculator/issues/3)

---

<div class="post-metadata">

**Author:** ![drusmanbashir](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/drusmanbashir/32/1282_2.png) [@drusmanbashir](https://discourse.slicer.org/u/drusmanbashir)\
**Post date:** [March 16, 2018, 7:12pm UTC](https://discourse.slicer.org/t/is-there-a-simple-way-to-compute-suvs-if-patient-weights-are-kept-separate-from-the-dicom-files/2326/7 "2018-03-16T19:12:20Z")

</div>

Hi,  
That problem is solved. It was either due to the patient weights not being as ‘DS’ format (I chose ‘FL’ float in defining the dicom tag) or because there were some non-DICOM files in the folder. I believe SUV factor calculator expects the folder to contain only DICOM
