OSCR

Deep learning segmentation of paediatric brain tumours using diffusion-weighted MRI: towards an early, <i>in vivo</i> classification pipeline.

Code ↔ Paper

The paper beside its authors' code: matches between them have not been computed for this paper yet.

Paper

Loaded from Europe PMC by your browser, not stored by OSCR: doi.org · Europe PMC

The paper is loaded when this pane is shown.

The authors' code

Python · 119 lines · 5.1 KB · no license

  1. # -*- coding: utf-8 -*-
  2. """
  3. Created on Sat Dec 6 00:12:04 2025
  4. @author: mulvanyt
  5. """
  6. import nibabel as nib
  7. import numpy as np
  8. import glob
  9. from medpy.metric import dc, hd95, sensitivity, specificity, positive_predictive_value
  10. from fsl.utils.image import resample
  11. from fsl.data.image import Image
  12. import pandas as pd
  13. def getPredFromProb(pred, thresh=0.5, bm=None):
  14. """Applies a brainmask (optional) and threshold to probability map of ROI"""
  15. #Applies Brain Mask if specified
  16. if bm is not None:
  17. pred_masked = pred*bm
  18. #Applies Threshold
  19. pred_masked[pred_masked >= thresh] = 1
  20. pred_masked[pred_masked < thresh] = 0
  21. #Returns (integer) class prediction
  22. return pred_masked.astype(int)
  23. def getMetricRow(result, reference, pix_vol=1):
  24. """Returns selected metrics results as a list"""
  25. #Stores volumetric info
  26. row = [pix_vol,
  27. np.count_nonzero(result),
  28. np.count_nonzero(reference)]
  29. #Standard Metrics
  30. row.append(dc(result, reference))
  31. #Checks a volume exists in result to avoid error of blank comparison in HD95
  32. if row[1] > 3:
  33. row.append(hd95(result, reference))
  34. else:
  35. row.append(None)
  36. row.append(positive_predictive_value(result, reference))
  37. row.append(sensitivity(result, reference))
  38. row.append(specificity(result, reference))
  39. return row
  40. def saveCSV(data, out_fname):
  41. #Handles saving of a 2D matrix of patient results, with hardcoded column titles
  42. colnames = ["ID", "Voxel Volume", "N_Pred", "N_Ref", "DSC", "HD95", "PPV", "Sens.", "Spec."]
  43. df = pd.DataFrame(data, columns=colnames)
  44. df.to_csv(out_fname)
  45. #Specifies threshold for postprocessing probability mask
  46. thresh = 0.5
  47. #Folder containing each model's result folders
  48. root = "" #Redacted
  49. for folder in ["UnionEnsemble", "ADC", "b0", "b1000"]:
  50. #Finds all probability maps of predicted ROIs
  51. pred_files = glob.glob(f"{root}\\{folder}\\*\\*\\Test\\*ProbMapClass1.nii.gz")
  52. #Obtain IDs from filenames, and then sort both arrays by the ID
  53. IDs = [int(pred_f.split("\\")[-1].split("_")[0].removeprefix("Subj-")) for pred_f in pred_files]
  54. IDs, pred_files = zip(*sorted(zip(IDs, pred_files)))
  55. IDs = np.array(IDs)
  56. pred_files = list(pred_files)
  57. #Results tables for each resampling mode
  58. rows_iso = np.zeros((len(IDs), 9))
  59. rows_iso[:,0] = IDs
  60. rows_raw = np.copy(rows_iso)
  61. rows_zds = np.copy(rows_raw)
  62. #Loop through each patient, performing resampling, postprocessing, and metric calculation
  63. for p_i, pred_f in enumerate(pred_files):
  64. #Loads predicted ROI probability map
  65. prob_iso_obj = nib.load(pred_f)
  66. #Specifies location of GT ROIs and brainmask
  67. img_folder = f"{root}\\Pre-processed_v2\\Subj-{IDs[p_i]}\\"
  68. #Loads Isotropic files
  69. gt_iso_obj = nib.load(f"{img_folder}ROI_preprocessed.nii.gz")
  70. bm_iso_img = nib.load(f"{img_folder}B0_brainmask.nii.gz").get_fdata()
  71. prob_iso_img = prob_iso_obj.get_fdata()
  72. gt_iso_img = gt_iso_obj.get_fdata()
  73. #Loads raw GT ROI, and resamples brainmask and prob map to raw image space
  74. gt_raw_obj = nib.load(f"{img_folder}ROI_convert.nii")
  75. gt_raw_img = gt_raw_obj.get_fdata()
  76. bm_raw_img = resample.resample(Image(f"{img_folder}B0_brainmask.nii.gz"), gt_raw_img.shape, order=0)[0]
  77. prob_raw_img = resample.resample(Image(pred_f), gt_raw_img.shape, order=1)[0]
  78. #Resamples isotropic images (GT ROI, Brainmask, pred prob map) in z-direction to that of raw image space
  79. zds_shape = np.hstack((gt_iso_img.shape[0:2], gt_raw_img.shape[2]))
  80. gt_zds_img = resample.resample(Image(f"{img_folder}ROI_preprocessed.nii.gz"), zds_shape, order=0)[0]
  81. bm_zds_img = resample.resample(Image(f"{img_folder}B0_brainmask.nii.gz"), zds_shape, order=0)[0]
  82. prob_zds_img = resample.resample(Image(pred_f), zds_shape, order=1)[0]
  83. #Applies brainmask & threshold to prob maps to acquire binary prediction masks
  84. pred_iso_img = getPredFromProb(prob_iso_img, thresh=thresh, bm = bm_iso_img)
  85. pred_raw_img = getPredFromProb(prob_raw_img, thresh=thresh, bm = bm_raw_img)
  86. pred_zds_img = getPredFromProb(prob_zds_img, thresh=thresh, bm = bm_zds_img)
  87. #Calculate metrics of ROI w.r.t. GT ROIs (respective), storing results in table
  88. rows_iso[p_i, 1:] = getMetricRow(pred_iso_img, gt_iso_img)
  89. rows_raw[p_i, 1:] = getMetricRow(pred_raw_img, gt_raw_img,
  90. pix_vol=np.prod(gt_raw_obj.header["pixdim"][1:4]))
  91. rows_zds[p_i, 1:] = getMetricRow(pred_zds_img, gt_zds_img,
  92. pix_vol=gt_raw_obj.header["pixdim"][3])
  93. #Stores metric tables in files by modality/resampling strategy
  94. saveCSV(rows_iso, f"{root}\\{folder}_Metrics_ISO.csv")
  95. saveCSV(rows_raw, f"{root}\\{folder}_Metrics_raw.csv")
  96. saveCSV(rows_zds, f"{root}\\{folder}_Metrics_zds.csv")

DeepMedicMetricsExt.py at commit 39361bd, no license · at the source

Overview

Authors: Daniel J Griffiths-King1, Timothy Mulvany1, Heather E L Rose2,3, Andrew C Peet4,5, John R Apps4,5, Theodoros N Arvanitis6, Jan Novak1
  1. Aston Institute of Health and Neurodevelopment, College of Health and Life Sciences, Aston University, Birmingham B4 7TE, UK
  2. Medical Physics and Clinical Engineering, Nottingham University Hospitals NHS Trust, Nottingham NG5 1PB, UK
  3. College of Engineering and Physical Sci., Aston University, Birmingham B4 7TE, UK
  4. Department of Oncology, Birmingham Children’s Hospital, Birmingham B4 6NH, UK
  5. Department of Cancer and Genomic Sciences, University of Birmingham, Birmingham B15 2TT, UK
  6. School of Engineering, University of Birmingham, Birmingham B15 2TT, UK
Institutions: Aston University (United Kingdom); Nottingham University Hospitals NHS Trust (United Kingdom); Birmingham Children's Hospital (United Kingdom); University of Birmingham (United Kingdom)
Journal: Brain communications, volume 8, issue 4, article fcag317
Dates: received 10 June 2025; accepted 28 July 2026; published online 17 August 2026
Type: Research article · Language: English
License: CC BY
Identifiers: DOI 10.1093/braincomms/fcag317 · PMID 42643703 · PMCID PMC13504704 · OpenAlex W7203647591
Open access: gold, a free copy (OpenAlex)
Status: code verified
Categories: structural MRI / diffusion (modality), other condition (population), methods / tools (subfield)
Methods: Connectivity, Statistics, Preprocessing, Machine learning, fMRI & imaging
Keywords: paediatric, brain tumour, deep learning, diffusion MRI, automatic segmentation
Topic: Glioma Diagnosis and Treatment (Genetics, Medicine), according to OpenAlex
Funding: Help Harry Help Others; Aston University College of Health and Life Sciences; Innovate UK; West Midlands Combined Authority; West Midlands Healthtech Innovation Accelerator; NIHR West Midlands Regional Research Delivery Network; Cancer Research UK; Engineering and Physical Sciences Research Council; Children’s Cancer and Leukaemia Group; Medical Research Council; MRC; Department of Health (England) (C7809/A10342); European Framework VI Grant eTUMOUR (FP6-2002-LIFESCIHEALTH 503094); EU Framework 6 Specific Targeted Research Project (STREP) (IST-2004-2721); Department of Health National Clinician Scientist Award; National Institute for Health and Care Research (NIHR) Research Professorship (NIHR-RP-R2-12-019); National Institute for Health; Experimental Cancer Medicine; Centre Paediatric Network (C8232/A25261); Birmingham Women’s and Children’s Hospital Charities (BCHRF 065, 287, 316, 353, 513, 33-3-447, 37-6-398); Little Princess Trust (2017/15, 2019/01); Children with Cancer (15/118); Action Medical Research; Brain Tumour Charity (GN2181, 2025GKCCTJA); Health Data Research UK; Children’s Research Fund; NIHR Great Ormond Street Hospital Biomedical Research Centre; Grace Kelly Childhood Cancer Trust
Citations: not cited yet (Europe PMC); 70 references in the paper

Abstract

Diffusion-weighted MRI (DWI) can offer vital quantitative biomarkers to understand paediatric brain tumours to benefit clinical management. However, extraction of these markers requires delineation of the tumour margins, which is time-consuming, requires expertise and can still be highly variable. Automated approaches using deep learning to generate these tumour regions exist, but to our knowledge, few exist using only DWI as an input modality, with none in paediatrics. This retrospective study develops an automated segmentation approach, leveraging transfer learning and multi-modal ensembling to tackle the issues specific to this DWI-only approach. Using the Imaging of Tumors study data, we analysed data from 107 paediatric brain tumour patients. Using a 3D convolutional neural network, namely DeepMedic, to perform automatic segmentations, we demonstrate the benefit of these approaches for this task. We assess the accuracy of these predicted segmentations in comparison to the ‘ground truth’ manual annotations, with a median Dice score of 0.63 achieved by the best-performing model. The current study highlights the potential of this approach to be implemented in future clinical decision support tools using DWI, but more work is needed to improve segmentation accuracy or establish current performance as ‘sufficient’ for the purposes that these segmentations are required.

Reproduced under the paper's license (CC BY), from the paper cited above.

Repository

Its files are read in the Code ↔ Paper reader above.

tmulvanyAC/DWI_DeepMedic

License: none: the authors keep all their rights
State: the link answers, verified on 27 September 2026
Evidence: files inventoried
Commit: 39361bd95361df5a30bbf7a252517576eea38600, 6 December 2025
Languages: Python (1)
Size: 1 file, 1 script
Software Heritage: not archived
Found in: “Data availability”
Not found: README, license file, CITATION.cff, environment file, tests, continuous integration, documentation
Tools: FSL (1 file), NiBabel (1 file), NumPy (1 file), pandas (1 file)
Availability: 1 check, the latest on 27 September 2026: the link answers
  • 27 September 2026: the link answers
1 file

The paper's code and data availability statement is in the Data section.

Tracing map

Proposed by the machine: these links were found in the paper and verified at the source, without human review. The map will receive a Zenodo DOI once one of the paper's authors has validated it with their ORCID.

What the map holds:

  • 1 repository of the authors' code, each at its verified commit, with its license and how the link was found in the paper;
  • 1 script, each with its path and the digest of its content;
  • no match between paragraphs and code yet;
  • neither the text of the paper nor the code itself.

Its JSON (tracing-map.json) is deposited on Zenodo with its DOI once the map is validated.

Data

No dataset and no data link were found in the paper.

Data availability

Due to the sensitive nature of the data used in this study, which involves child patient data, the data cannot be shared publicly. Access to the data is restricted in accordance with ethical guidelines and study protocol. Specific code developed in the current study (beyond tools described here and above) is available at https://github.com/tmulvanyAC/DWI_DeepMedic.

Reproduced under the paper's license (CC BY), from the paper cited above.

Versions

The history of this record: each version stored by the harvester or made by a correction of its authors or of the maintainers of its code, and what changed in its facts. The texts of the paper (its abstract, its availability statements) are not part of it; versions that changed only those are not listed.

Version 1, 27 September 2026: the first record

Recorded: type, language, journal, volume, issue, pages, dates, 7 authors, 5 keywords, 28 funders, 50 references.

Cite

This paper

Griffiths-King, D. J., Mulvany, T., Rose, H. E. L., Peet, A. C., Apps, J. R., Arvanitis, T. N., & Novak, J. (2026). Deep learning segmentation of paediatric brain tumours using diffusion-weighted MRI: towards an early, &lt;i&gt;in vivo&lt;/i&gt; classification pipeline. Brain communications, 8(4), fcag317. https://doi.org/10.1093/braincomms/fcag317

BibTeX

@article{griffithsking2026deep,
author = {Griffiths-King, Daniel J and Mulvany, Timothy and Rose, Heather E L and Peet, Andrew C and Apps, John R and Arvanitis, Theodoros N and Novak, Jan},
title = {{Deep learning segmentation of paediatric brain tumours using diffusion-weighted MRI: towards an early, \&lt;i\&gt;in vivo\&lt;/i\&gt; classification pipeline}},
journal = {Brain communications},
year = {2026},
month = aug,
volume = {8},
number = {4},
pages = {fcag317},
publisher = {Oxford University Press},
issn = {2632-1297},
doi = {10.1093/braincomms/fcag317},
url = {https://doi.org/10.1093/braincomms/fcag317},
pmid = {42643703},
pmcid = {PMC13504704}
}

RIS

TY - JOUR
AU - Griffiths-King, Daniel J
AU - Mulvany, Timothy
AU - Rose, Heather E L
AU - Peet, Andrew C
AU - Apps, John R
AU - Arvanitis, Theodoros N
AU - Novak, Jan
TI - Deep learning segmentation of paediatric brain tumours using diffusion-weighted MRI: towards an early, &lt;i&gt;in vivo&lt;/i&gt; classification pipeline
T2 - Brain communications
J2 - Brain Commun
PY - 2026
DA - 2026/08/17
VL - 8
IS - 4
SP - fcag317
SN - 2632-1297
PB - Oxford University Press
DO - 10.1093/braincomms/fcag317
UR - https://doi.org/10.1093/braincomms/fcag317
LA - en
ER -

CSL-JSON

{
"id": "10.1093/braincomms/fcag317",
"type": "article-journal",
"title": "Deep learning segmentation of paediatric brain tumours using diffusion-weighted MRI: towards an early, &lt;i&gt;in vivo&lt;/i&gt; classification pipeline",
"container-title": "Brain communications",
"author": [
{
"family": "Griffiths-King",
"given": "Daniel J"
},
{
"family": "Mulvany",
"given": "Timothy"
},
{
"family": "Rose",
"given": "Heather E L"
},
{
"family": "Peet",
"given": "Andrew C"
},
{
"family": "Apps",
"given": "John R"
},
{
"family": "Arvanitis",
"given": "Theodoros N"
},
{
"family": "Novak",
"given": "Jan"
}
],
"container-title-short": "Brain Commun",
"volume": "8",
"issue": "4",
"page": "fcag317",
"DOI": "10.1093/braincomms/fcag317",
"PMID": "42643703",
"PMCID": "PMC13504704",
"ISSN": "2632-1297",
"publisher": "Oxford University Press",
"URL": "https://doi.org/10.1093/braincomms/fcag317",
"language": "en",
"issued": {
"date-parts": [
[
2026,
8,
17
]
]
}
}

The tracing map gets a citation of its own once an author has validated it and it has a DOI.

Similar papers

The papers with a page that share the most with this one: the tools found in their code, their categories, datasets, cited references and authors, the rarest counting most.

[1] doi:10.1371/journal.pone.0356382 [code]
Evaluating the impact of segmentation strategies on radiomic feature stability for paediatric brain tumour diagnosis using diffusion weighted imaging.
Journal: PloS one
In common: NiBabel, pandas, NumPy, structural MRI / diffusion, other condition, 6 references, 3 authors
[2] doi:10.1186/s12916-026-04770-7 [code]
Impairment of brain short association fibers across clinical stages in amyotrophic lateral sclerosis: a new biomarker mirroring disease progression.
Journal: BMC medicine
In common: FSL, NiBabel, pandas, 1 other tool, structural MRI / diffusion, other condition, 4 references
[3] doi:10.1162/imag.a.1153 [code]
TRAMFIX: TRavelling Across Melbourne for FIXel-based analysis (a reproducibility and reliability study).
Journal: Imaging neuroscience (Cambridge, Mass.)
In common: FSL, pandas, NumPy, methods / tools, structural MRI / diffusion, 4 references
[4] doi:10.1038/s41467-026-71918-7 [code]
Developmental disinhibition gates language lateralization in childhood.
Journal: Nature communications
In common: FSL, NiBabel, pandas, 1 other tool, 4 references
[5] doi:10.1002/mds.70355 [code]
Gray Matter Microstructure Measured Using Diffusion Imaging as a Biomarker of Severity in Lewy Body Diseases.
Journal: Movement disorders : official journal of the Movement Disorder Society
In common: FSL, NiBabel, pandas, 1 other tool, structural MRI / diffusion, 3 references
[6] doi:10.1162/imag.a.1183 [code]
Learning-based segmentation of diffusion-weighted MR images with arbitrary &lt;i&gt;q&lt;/i&gt;-space samplings.
Journal: Imaging neuroscience (Cambridge, Mass.)
In common: NiBabel, pandas, NumPy, methods / tools, structural MRI / diffusion, 4 references
[7] doi:10.1002/mrm.70336 [code]
Offline Reconstruction of Diffusion MRI Acquisitions for Comparison Between Complex PCA-Based and AI-Based Denoising.
Journal: Magnetic resonance in medicine
In common: FSL, NiBabel, pandas, 1 other tool, methods / tools, structural MRI / diffusion, 2 references
[8] doi:10.1126/sciadv.aec2348 [code]
Congenital blindness reduces myelination in human visual cortex.
Journal: Science advances
In common: NiBabel, pandas, NumPy, structural MRI / diffusion, other condition, 4 references
[9] doi:10.1016/j.nicl.2026.104001 [code]
Effect of vascular lesion preprocessing on Brain Intensity AbNormality Classification Algorithm (BIANCA) white matter hyperintensity segmentation.
Journal: NeuroImage. Clinical
In common: FSL, NiBabel, pandas, 1 other tool, methods / tools, structural MRI / diffusion, 2 references
[10] doi:10.1073/pnas.2603114123 [code]
The human hippocampus can pattern separate memories by meaning.
Journal: Proceedings of the National Academy of Sciences of the United States of America
In common: FSL, NiBabel, pandas, 1 other tool, 3 references

Contribute

The authors of this paper can claim it, correct its record and validate its tracing map, and the maintainers of its code (its owner, or a public member of its organization) correct what it says of their repository; anyone signed in can ask for its removal. Every request goes to OSCR's own machine, which answers it; your account page follows them.

Sign in with ORCID to claim this paper as one of its authors, correct its record or validate its tracing map: when the paper's metadata lists your ORCID iD, you are recognized at once. Maintainers of its code: sign in with GitHub, then claim the repository on your account page.

Request its removal

To ask OSCR to remove this record, the copies of its authors' scripts or its tracing map, use the removal request page: signed in, you say who you are, what to remove and why, then review and confirm the request. Published rules decide every request (how).

Discussion, reproductions, activity

Discussion: questions and error reports about this paper and its code, from signed-in readers and its authors. It opens with sign-in.

Reproductions: reports from readers who ran the authors' code: what they reproduced, with which environment, commit and data. It opens with sign-in.

Activity: what happens around this paper: new versions of its record, its map's validation, discussions and reproductions. It opens with sign-in.