Average dose in OAR

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

Thank you for your answer and for your developments!

Hello,

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

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:

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:

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

Best