CTContour: An open-source Python pipeline for automatic contouring and calculation of mean SSDE along the abdomino-pelvic region for CT images; validation on fifteen systems

Published:November 11, 2022DOI:


      • Fast, automated patient abdomino-pelvic contouring in computed tomography.
      • Real-time estimation of size-specific dose estimates.
      • Determination of abdomino-pelvic water equivalent diameter on bulk datasets.
      • Detection of truncated patient images in computed tomography.



      Calculation of the Size Specific Dose Estimate (SSDE) requires accurate delineation of the skin boundary of patient CT slices. The AAPM recommendation for SSDE evaluation at every CT slice is too time intensive for manual contouring, prohibiting real-time or bulk processing; an automated approach is therefore desirable. Previous automated delineation studies either did not fully disclose the steps of the algorithm or did not always manage to fully isolate the patient. The purpose of this study was to develop a validated, freely available, fast, vendor-independent open-source tool to automatically and accurately contour and calculate the SSDE for the abdomino-pelvic region for entire studies in real-time, including flagging of patient-truncated images.


      The Python tool, CTContour, consists of a sequence of morphological steps and scales over multiple cores for speed. Tool validation was achieved on 700 randomly selected slices from abdominal and abdomino-pelvic studies from public datasets. Contouring accuracy was assessed visually by four medical physicists using a 1–5 Likert scale (5 indicating perfect contouring). Mean SSDE values were validated via manual calculation.


      Contour accuracy validation produced a score of four of five for 98.5 % of the images. A 300 slice exam was contoured and truncation flagged in 6.3 s on a six-core laptop.


      The algorithm was accurate even for complex clinical scenarios and when artefacts were present. Fast execution makes it possible to automate the calculation of SSDE in real time. The tool has been published on GitHub under the GNU-GPLv3 license.


      To read this article in full you will need to make a payment

      Purchase one-time access:

      Academic & Personal: 24 hour online accessCorporate R&D Professionals: 24 hour online access
      One-time access price info
      • For academic or personal research use, select 'Academic and Personal'
      • For corporate R&D use, select 'Corporate R&D Professionals'


      Subscribe to Physica Medica: European Journal of Medical Physics
      Already a print subscriber? Claim online access
      Already an online subscriber? Sign in
      Institutional Access: Sign in to ScienceDirect


      1. American Association of Physicists in Medicine. The Measurement, Reporting, and Management of Radiation Dose in CT. Report 96. 2008.

      2. American Association of Physicists in Medicine. Size-Specific Dose Estimates (SSDE) in Pediatric and Adult Body CT Examinations. Report 204. 2001.

      3. American Association of Physicists in Medicine. Use of Water Equivalent Diameter for Calculating Patient Size and Size-Specific Dose Estimates (SSDE) in CT. Report 220. vol. 2014. 2014.

        • Leng S.
        • Shiung M.
        • Duan X.
        • Yu L.
        • Zhang Y.
        • McCollough C.H.
        Size-specific dose estimates for chest, abdominal, and pelvic CT: Effect of intrapatient variability in water-equivalent diameter.
        Radiology. 2015; 276: 184-190
        • Daudelin A.
        • Medich D.
        • Andrabi S.Y.
        • Martel C.
        Comparison of methods to estimate water-equivalent diameter for calculation of patient dose.
        J Appl Clin Med Phys. 2018; 19: 718-723
        • Anam C.
        • Haryanto F.
        • Widita R.
        • Arif I.
        • Dougherty G.
        Automated Calculation of Water-equivalent Diameter (DW) Based on AAPM Task Group 220.
        J Appl Clin Med Phys. 2016; 17: 320-333
        • Gharbi S.
        • Labidi S.
        • Mars M.
        Automatic brain dose estimation in computed tomography using patient dicom images.
        Radiat Prot Dosimetry. 2020; 188: 536-542
        • Boos J.
        • Kröpil P.
        • Bethge O.T.
        • Aissa J.
        • Schleich C.
        • Sawicki L.M.
        • et al.
        Accuracy of size-specific dose estimate calculation from center slice in computed tomography.
        Radiat Prot Dosimetry. 2018; 178: 8-19
        • Burton C.S.
        • Szczykutowicz T.P.
        Evaluation of AAPM Reports 204 and 220: Estimation of effective diameter, water-equivalent diameter, and ellipticity ratios for chest, abdomen, pelvis, and head CT scans.
        J Appl Clin Med Phys. 2018; 19: 228-238
        • Ozsoykal I.
        • Yurt A.
        • Akgungor K.
        Size-specific dose estimates in chest, abdomen, and pelvis CT examinations of pediatric patients.
        Diagnostic Interv Radiol. 2018; 24: 243-248
        • Anam C.
        • Mahdani F.R.
        • Dewi W.K.
        • Sutanto H.
        • Triadyaksa P.
        • Haryanto F.
        • et al.
        An improved method for automated calculation of the water-equivalent diameter for estimating size-specific dose in CT.
        J Appl Clin Med Phys. 2021; 22: 313-323
        • Anam C.
        • Arif I.
        • Haryanto F.
        • Widita R.
        • Lestari F.P.
        • Adi K.
        • et al.
        A simplified method for the water-equivalent diameter calculation to estimate patient dose in CT examinations.
        Radiat Prot Dosimetry. 2019; 185: 34-41
      4. Stratakis J, Myronakis M, Damilakis J. MEDIRAD. Implications of Medical Low Dose Radiation Exposure. Software tool (CT-IQURAD) module on radiation dose. 2021.

      5. MEDIRAD Project. Automatic Calculation of Water-Equivalent Diameter 2022. (accessed April 24, 2022).

      6. van Rossum G, Fred L D. Python 3 Reference Manual. CreateSpace; 2009.

      7. The pandas development team. pandas-dev/pandas: Pandas 1.2.1 (v1.2.1) 2021. doi:10.5281/zenodo.4452601.

      8. Mason D, Scaramallion, Rhaxton, Mrbean-bremen, Suever J, Vanessasaurus. pydicom/pydicom: pydicom 2.1.2 (v2.1.2) 2020. doi:10.5281/zenodo.4313150.

        • Van Der Walt S.
        • Schönberger J.L.
        • Nunez-Iglesias J.
        • Boulogne F.
        • Warner J.D.
        • Yager N.
        • et al.
        Scikit-image: Image processing in python.
        PeerJ. 2014; 2014: 1-18
        • Virtanen P.
        • Gommers R.
        • Oliphant T.E.
        • Haberland M.
        • Reddy T.
        • Cournapeau D.
        • et al.
        SciPy 1.0: fundamental algorithms for scientific computing in Python.
        Nat Methods. 2020; 17: 261-272
        • Harris C.R.
        • Millman K.J.
        • van der Walt S.J.
        • Gommers R.
        • Virtanen P.
        • Cournapeau D.
        • et al.
        Array programming with NumPy.
        Nature. 2020; 585: 357-362
        • Clark K.
        • Vendt B.
        • Smith K.
        • Freymann J.
        • Kirby J.
        • Koppel P.
        • et al.
        The Cancer Imaging Archive (TCIA): maintaining and operating a public information repository.
        J Digit Imaging. 2013; 26: 1045-1057
        • Heller N.
        • Isensee F.
        • Maier-Hein K.H.
        • Hou X.
        • Xie C.
        • Li F.
        • et al.
        The state of the art in kidney and kidney tumor segmentation in contrast-enhanced CT imaging: Results of the KiTS19 challenge.
        Med Image Anal. 2021; 67: 101821
        • Heller N.
        • Sathianathen N.
        • Kalapara A.
        • Walczak E.
        • Moore K.
        • Kaluzniak H.
        • et al.
        Data from C4KC-KiTS.
        Cancer Imaging Arch. 2019;
      9. Tong T, Li M. Abdominal or pelvic enhanced CT images within 10 days before surgery of 230 patients with stage II colorectal cancer (Stage II-Colorectal-CT) [Dataset]. Cancer Imaging Arch 2022. doi:10.7937/p5k5-tg43.

        • Li M.
        • Gong J.
        • Bao Y.
        • Huang D.
        • Peng J.
        • Tong T.
        Prognosis prediction for stage II colorectal cancer by fusing computed tomography radiomics and deep-learning features of primary lesions and peripheral lymph nodes.
        Int J Cancer. 2022;
      10. International Electrotechnical Commission. IEC62985:2019. Methods for calculating size specific dose estimates (SSDE) for computed tomography. 2019.

        • Theano E.
        • Fitousi N.
        • Bosmans H.
        Quality assurance of dose management systems.
        Phys Med. 2022; 99: 10-15
        • Bosmans H.
        • Zanca F.
        • Gelaude F.
        Procurement, commissioning and QA of AI based solutions: An MPE’s perspective on introducing AI in clinical practice.
        Phys Med. 2021; 83: 257-263
        • Kortesniemi M.
        • Tsapaki V.
        • Trianni A.
        • Russo P.
        • Maas A.d.
        • Källman H.-E.
        • et al.
        The European Federation of Organisations for Medical Physics (EFOMP) White Paper: Big data and deep learning in medical imaging and in relation to medical physics profession.
        Phys Med. 2018; 56: 90-93