# Average dose in OAR

**URL:** https://opentps.discourse.group/t/average-dose-in-oar/38
**Category:** General
**Created:** [September 3, 2024, 8:39am UTC](https://opentps.discourse.group/t/average-dose-in-oar/38 "2024-09-03T08:39:27Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![user1](https://yyz2.discourse-cdn.com/free1/user_avatar/opentps.discourse.group/user1/32/21_2.png) [@user1](https://opentps.discourse.group/u/user1)
#### Post date: [September 3, 2024, 8:39am UTC](https://opentps.discourse.group/t/average-dose-in-oar/38/1 "2024-09-03T08:39:27Z")

</div>

Dear OpenTPS developers,

Could you tell me how I can get data on the maximum, minimum, average, etc. dose in the OAR?  
I worked based on the example presented on the site: [Simple dose computation and optimization on a real CT image | OpenTPS](https://www.opentps.org/2023/08/08/SimpleRealDoseComupationOptimization.html)

Thank you for your answer and for your developments!

---

<div class="post-metadata">

### Author: ![Broberfroid](https://yyz2.discourse-cdn.com/free1/user_avatar/opentps.discourse.group/broberfroid/32/13_2.png) [@Broberfroid](https://opentps.discourse.group/u/Broberfroid)
#### Post date: [September 10, 2024, 9:56am UTC](https://opentps.discourse.group/t/average-dose-in-oar/38/2 "2024-09-10T09:56:53Z")

</div>

Hello,

if you have already computed the DVH as in the simple dose computation example:

```auto
target_DVH = DVH(target,doseImage_opti_OAR)
target_DVH_No_OAR = DVH(target,doseImage_opti)
brain_DVH = DVH(OAR_brain,doseImage_opti_OAR)
brainstem_DVH = DVH(OAR_brainstem,doseImage_opti_OAR)
optic_chiasm_DVH = DVH(OAR_optic_chiasm,doseImage_opti_OAR)

```

you can obtain the maximum, minimum and mean dose as it:

```auto
target_DVH.max
target_DVH.min
target_DVH.mean

```

if you want to compute other DVH metrics such as Dx or Vx you can use:

```auto
target_DVH.computeDx(percentile=90, return_percentage=True)
target_DVH.computeVx(x=90, return_percentage=True)

```

You can also take a look at the DVH implementation to see all the possibilities : [opentps\_core/opentps/core/data/\_dvh.py · master · Open-MCsquare / OpenTPS · GitLab](https://gitlab.com/openmcsquare/opentps/-/blob/master/opentps_core/opentps/core/data/_dvh.py?ref_type=heads)

Best
