Automated Longitudinal MRI Assessments of Diffuse Midline Gliomas: A Large Multi-Institutional Study
The 6 matches
- [1] § Methods › Preprocessing ↔ Scripts/longitudinal_model_jobsub_scripts/run_N4BandSS.py, lines 131–182 · score 0.75 · N4 bias field, skull stripping, SynthStrip, longitudinal model
- [2] § Methods › Models ↔ Scripts/longitudinal_model_jobsub_scripts/run_task182_inferences.py, lines 1–13 · score 0.67 · nnUNet, subtraction image, longitudinal model, tumor change, trained, pre
- [3] § Methods › Preprocessing ↔ Scripts/longitudinal_model_jobsub_scripts/run_longitudinal_preprep.py, lines 1–21 · score 0.67 · skull stripping, subtraction image, longitudinal model, intensity, preprocessing, FLAIR
- [4] § Methods › Models ↔ Scripts/independent_model_jobsub_scripts/run_indep_model.py, lines 96–159 · score 0.63 · BraTS Peds, nnUNet, MedNeXt, SwinUNETR, independent model, DMG
- [5] § Methods › Models ↔ Scripts/independent_model_jobsub_scripts/reregistration_time1.py, lines 1–16 · score 0.62 · BraTS, segmentation mask, independent model, transformed, space, subtracted
- [6] § Methods › Cohort Description › 2- Ground Truth/Label Establishment › B- Segmentation Task ↔ Scripts/independent_model_jobsub_scripts/reregistration_time1.py, lines 1–16 · score 0.60 · Segmentation masks, subtraction image, FLAIR images, native, space, models
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 · 144 lines · 6.7 KB · MIT · 2 matches
- """
- This script should be run after "reregistration_time2.py". This script will submit a job for each time1
- independent model segmentation output to an SGE cluster, registering inference masks to native time2
- FLAIR image space so session pair subtraction images can be generated (in time2 space). Outputs will be saved
- to a "postprocessed_time1" directory.
- Because BraTS transformation matrices don't exist to transform time1 into time2 image space, this script
- will use the time1 segmentation mask already transformed to native FLAIR image by reregistration_time2.py.
- It will then apply the time1-to-time2 transformation matrix generated by longitudinal model preprocessing
- script to get these time1 segmentation masks into time2 space for each session pair.
- """
- from pathlib import Path
- import subprocess
- import time
- import logging
- import pandas as pd
- # === CONFIGURATION ===
- TEST_MODE = False # Set to True to process only the first scsv file row for testing
- SUBMISSION_DELAY = 2 # Delay (in seconds) between job submissions
- # Configure logging to write to destination .log file
- log_dir = Path("/Path/to/personal/working/directory/DMG/logs/postprocessing")
- log_dir.mkdir(parents=True, exist_ok=True)
- log_file = log_dir / "reregistration_time1.log"
- logging.basicConfig(filename=log_file, level=logging.INFO, format='%(asctime)s - %(levelname)s - %(message)s')
- logging.info(f"Script started. Test mode: {TEST_MODE}")
- # Set directory paths
- PREPREP_DIR = Path("/Path/to/personal/working/directory/DMG/data/BIDS/derivatives/preprocessed")
- MOVING_SEG_DIR = Path("/Path/to/personal/working/directory/DMG/data/BIDS/derivatives/postprocessed_time2")
- OUTPUT_DIR = Path("/Path/to/personal/working/directory/DMG/data/BIDS/derivatives/postprocessed_time1")
- JOB_DIR = Path("/Path/to/personal/working/directory/DMG/jobs/postprocessing_time1_jobs")
- TERM_LOG_DIR = Path("/Path/to/personal/working/directory/DMG/logs/postprocessing/postprocessing_time1_terminal_output")
- CSV_DIR = Path("/Path/to/personal/working/directory/DMG/data/tabulated/session_pairs_V2.csv")
- NNUNET_DIR = Path("/Path/to/personal/working/directory/DMG/data/BIDS/derivatives/nnUNet_input")
- # Ensure the relevant directories exist
- JOB_DIR.mkdir(parents=True, exist_ok=True)
- TERM_LOG_DIR.mkdir(parents=True, exist_ok=True)
- NNUNET_DIR.mkdir(parents=True, exist_ok=True)
- OUTPUT_DIR.mkdir(parents=True, exist_ok=True)
- # Read the CSV file to get valid session pairs
- df = pd.read_csv(CSV_DIR)
- # Loop over each row in the CSV file
- for index, row in df.iterrows():
- # Extract & zero pad the subject and session identifiers
- sub = str(row["SubjectID"]).zfill(3)
- time1 = str(row["Time1"]).zfill(3)
- time2 = str(row["Time2"]).zfill(3)
- # Construct the file paths for the Time1 and Time2 images and transormation matrix
- time1_seg = MOVING_SEG_DIR / f"sub-{sub}" / f"sub-{sub}_ses-{time1}_TumorMask_FLAIR.nii.gz"
- time2_ref = NNUNET_DIR / f"sub-{sub}" / f"sub-{sub}_ses-{time1}_ses-{time2}_0001.nii.gz"
- reg_mat = PREPREP_DIR / f"sub-{sub}" / f"ses-{time1}" / "anat" / "intermediates" / f"sub-{sub}_ses-{time1}.mat"
- missing_files = False
- # Check if the Time1 seg exists; log an error if not
- if not time1_seg.exists():
- logging.error(f"Missing Time1 segmentation file for subject {sub}, session {time1}: {time1_seg}")
- missing_files = True
- # Check if the Time2 reference image exists; log an error if not
- if not time2_ref.exists():
- logging.error(f"Missing Time2 reference image for subject {sub}, session {time2}: {time2_ref}")
- missing_files = True
- # Check if the registration matrix exists; log an error if not
- if not reg_mat.exists():
- logging.error(f"Missing registration matrix for subject {sub}, session {time1}: {reg_mat}")
- missing_files = True
- # Skip this job sub if any files are missing
- if missing_files:
- continue
- #Create job script content with preprocessing commands
- job_script_path = JOB_DIR / f"sub-{sub}_ses-{time1}_time1_postprocessing.qsh"
- job_script_content = f"""#!/bin/bash
- #$ -S /bin/bash # shell language for the job scheduler
- #$ -N sub-{sub}_ses-{time1}_time1_postproc # job name
- #$ -cwd # use current working directory
- #$ -j y # join STDERR and STDOUT
- #$ -o {TERM_LOG_DIR}/sub-{sub}_ses-{time1}_time1_reregistration.log # per-job terminal output log file
- #$ -l mem_free=16G # job requires up to 16 GB of RAM
- #$ -l h_rt=00:30:00 # maximum runtime of 30 minutes
- #$ -l scratch=10G # job requires up to 10 GB of local/scratch space
- #$ -r y # if job crashes, it should be restarted
- # Make reregistered output directory
- mkdir -p {OUTPUT_DIR}/sub-{sub}/
- # Run Time1 reregisration
- /Path/to/Wrappers/qsiprep_1.0.0rc1_wrapperTMP.sh \
- flirt \
- -in {time1_seg} \
- -ref {time2_ref} \
- -applyxfm \
- -init {reg_mat} \
- -out {OUTPUT_DIR}/sub-{sub}/sub-{sub}_ses-{time1}_TumorMask_FLAIR.nii.gz \
- -interp nearestneighbour \
- -v
- registered_path={OUTPUT_DIR}/sub-{sub}/sub-{sub}_ses-{time1}_TumorMask_FLAIR.nii.gz
- if [[ -f "$registered_path" ]]; then
- echo "$(date '+%Y-%m-%d %H:%M:%S') - INFO - Time1 seg mask reregistered to Time2 FLAIR. Registered mask saved to: $registered_path" >> {log_file}
- else
- echo "$(date '+%Y-%m-%d %H:%M:%S') - ERROR - Reregistration output not found for: $registered_path" >> {log_file}
- fi
- [[ -n "$JOB_ID" ]] && qstat -j "$JOB_ID"
- echo "Job for sub-{sub}: Time1 ses-{time1} → Time2 ses-{time2} completed successfully."
- """
- # Write the job script to file
- try:
- job_script_path.write_text(job_script_content)
- except Exception as e:
- logging.exception(f"Failed to write job script for subject {sub}: {job_script_path}")
- continue # Skip job submission for this subject
- # Submit the job to SGE with error capture
- try:
- result = subprocess.run(["qsub", str(job_script_path)],
- capture_output=True, text=True)
- if result.returncode != 0:
- logging.error(f"Job submission failed for subject {sub}: {result.stderr}")
- else:
- print(f"Submitted job for sub-{sub}_ses-{time1}.")
- except Exception as e:
- logging.exception(f"Exception during job submission for subject {sub}")
- # Delay between job submissions
- time.sleep(SUBMISSION_DELAY)
- if TEST_MODE:
- print(f"Test mode enabled. Processed only sub-{sub}, time1(ses-{time1}). Exiting.")
- break
- print("All jobs submitted successfully!")
reregistration_time1.py at commit b852988, under MIT · at the source
Overview
- University of California San Francisco
- Mass General Brigham, Dana-Farber Cancer Institute, Harvard Medical School
- Sheikh Zayed Institute for Pediatric Surgical Innovation, Children’s National Hospital
- Inselspital, University Hospital Bern and University of Bern
Abstract
Background: Diffuse midline gliomas (DMGs) are highly aggressive pediatric and young adults brain tumors with poor prognosis and limited treatment options. Accurate imaging assessment of tumor progression is critical for evaluating therapeutic response and guiding clinical decisions, but it is subject to reader bias. This study aims to compare two automated deep learning (DL) based strategies for longitudinal segmentation and subsequent classification of tumor progression in DMG.
Methods: We retrospectively analyzed longitudinal imaging from 155 DMG patients of UCSF hospitals and an external cohort of 18 patients from the Pediatric Neuro-Oncology Consortium. Two publicly available DL models were evaluated: (1) a “longitudinal” model trained to directly segment areas of change from two consecutive time points, and (2) an “independent” state-of-the-art volumetric segmentation model that processes each time point individually and then computes the change mask between the independent segmentation of consecutive time points. Labels were derived from a manual review of radiology reports and categorized as “Increased,” “Decreased,” or “Stable” tumor size based on the interpreting neuroradiologist’s assessment. Reference standard segmentations of change volumes were manually created in a subset of patients. Model segmentation outputs were compared using Dice score, volumetric mean absolute error (MAE), and volume coefficient of determination (R2) in internal and external sets. For comparison to radiologist assessment, classification accuracy, sensitivity, specificity, and Area Under the ROC Curve (ROC AUC) were assessed.
Findings: The longitudinal model demonstrated superior classification performance with ROC AUCs of 0.93, 0.90, and 0.83 for the prediction of increased, decreased, and stable tumor change classes, respectively in the internal set. It achieved a mean absolute error (MAE) of 7.41 ± 23.04 cm3 and R2 of 0.25 internally, and 8.27 ± 16.63 cm3 and R2 of 0.53 externally. Median Dice scores were 0.76 (IQR: 0.50-0.88) and 0.68 (IQR: 0.41-0.92) in the internal and external datasets, respectively. In comparison, the independent model showed lower classification ROC AUCs (0.83, 0.89, and 0.80), higher MAEs (11.03 ± 21.24 cm3 internally; 10.86 ± 17.51 cm3 externally), and lower median Dice scores (0.40 [IQR: 0.25-0.59] internally; 0.62 [IQR: 0.33-0.83] externally).
Interpretation: For assessing changes in DMG tumor size, the longitudinal DL model generally outperforms the independent model in internal and external cohorts. These findings support integrating dedicated longitudinal-based AI tools for more objective and reproducible tumor assessments.
Reproduced under the paper's license (CC BY), from the paper cited above.
Repository
Its files are read in the Code ↔ Paper reader above, with 6 matches between paragraphs and lines of code.
rauschecker-sugrue-labs/DMG-Longitudinal
b852988580c608a06ae6b8a5a324e4166661f9db, 4 August 2025Availability: 1 check, the latest on 28 September 2026: the link answers
- 28 September 2026: the link answers
15 files
- Scripts/
fix_indep_subtraction_ma , Python, 49 linessks.py - Scripts/
independent_model_jobsub , Python, 144 lines, 2 matches_scripts/ reregistration_time1.py - Scripts/
independent_model_jobsub , Python, 211 lines_scripts/ reregistration_time2.py - Scripts/
independent_model_jobsub , Python, 112 lines_scripts/ run_indep_BraTS_preprep. py - Scripts/
independent_model_jobsub , Python, 159 lines, 1 match_scripts/ run_indep_model.py - Scripts/
independent_model_jobsub , Python, 153 lines_scripts/ seg_mask_subtraction.py - Scripts/
longitudinal_model_jobsu , Python, 182 lines, 1 matchb_scripts/ run_N4BandSS.py - Scripts/
longitudinal_model_jobsu , Python, 190 lines, 1 matchb_scripts/ run_longitudinal_preprep .py - Scripts/
longitudinal_model_jobsu , Python, 120 lines, 1 matchb_scripts/ run_task182_inferences.p y - Scripts/
process_session_BraTS.py , Python, 187 lines - Wrappers/
captk_wrapper.sh , Shell, 10 lines - Wrappers/
greedy_wrapper.sh , Shell, 9 lines - Wrappers/
qsiprep_1.0.0rc1_wrapper , Shell, 15 linesTMP.sh - LICENSE, License, 21 lines
- README.md, Text, 66 lines
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;
- 13 scripts, each with its path and the digest of its content;
- 6 matches between paragraphs of the paper and lines of the code (method lexical-v1);
- 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 and Code Availability
De-identified participant data can be provided to qualified investigators upon reasonable request to the corresponding author and following institutional review and completion of a data use agreement. Access will be restricted to research objectives aligned with the original ethical approval and must comply with relevant national data governance requirements and registry data-use policies. To safeguard confidentiality and honor restrictions imposed by the data providers, individual-level data cannot be placed in a public repository. Interested researchers should email the corresponding author with a brief research proposal and will be required to sign a data access agreement. Data will be available upon publication for up to 5 years. The source code used to create the study results is made publicly available at https://
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, 28 September 2026: the first record
Recorded: type, journal, dates, 11 authors, 5 keywords, 1 funder, 25 references.
Cite
This paper
Avval, A. H., Bloch, E., Nguyen, B., Nedelec, P., Zielke, J., Kann, B. H., Linguraru, M. G., Rudie, J. D., Sugrue, L. P., Mueller, S., & Rauschecker, A. M. (2026). Automated Longitudinal MRI Assessments of Diffuse Midline Gliomas: A Large Multi-Institutional Study. Research Square (preprint). https://
BibTeX
@article{avval2026automa
author = {Avval, Atlas Haddadi and Bloch, Evan and Nguyen, Brian and Nedelec, Pierre and Zielke, John and Kann, Benjamin H. and Linguraru, Marius Gorge and Rudie, Jeffrey D. and Sugrue, Leo P. and Mueller, Sabine and Rauschecker, Andreas M.},
title = {{Automated Longitudinal MRI Assessments of Diffuse Midline Gliomas: A Large Multi-Institutional Study}},
journal = {Research Square (preprint)},
year = {2026},
month = may,
publisher = {Research Square},
issn = {2693-5015},
doi = {10.21203/
url = {https://
}
RIS
TY - JOUR
AU - Avval, Atlas Haddadi
AU - Bloch, Evan
AU - Nguyen, Brian
AU - Nedelec, Pierre
AU - Zielke, John
AU - Kann, Benjamin H.
AU - Linguraru, Marius Gorge
AU - Rudie, Jeffrey D.
AU - Sugrue, Leo P.
AU - Mueller, Sabine
AU - Rauschecker, Andreas M.
TI - Automated Longitudinal MRI Assessments of Diffuse Midline Gliomas: A Large Multi-Institutional Study
T2 - Research Square (preprint)
J2 - Res Sq
PY - 2026
DA - 2026/
SN - 2693-5015
PB - Research Square
DO - 10.21203/
UR - https://
ER -
CSL-JSON
{
"id": "10.21203/
"type": "article",
"title": "Automated Longitudinal MRI Assessments of Diffuse Midline Gliomas: A Large Multi-Institutional Study",
"container-title": "Research Square (preprint)",
"author": [
{
"family": "Avval",
"given": "Atlas Haddadi"
},
{
"family": "Bloch",
"given": "Evan"
},
{
"family": "Nguyen",
"given": "Brian"
},
{
"family": "Nedelec",
"given": "Pierre"
},
{
"family": "Zielke",
"given": "John"
},
{
"family": "Kann",
"given": "Benjamin H."
},
{
"family": "Linguraru",
"given": "Marius Gorge"
},
{
"family": "Rudie",
"given": "Jeffrey D."
},
{
"family": "Sugrue",
"given": "Leo P."
},
{
"family": "Mueller",
"given": "Sabine"
},
{
"family": "Rauschecker",
"given": "Andreas M."
}
],
"container-title-short":
"DOI": "10.21203/
"ISSN": "2693-5015",
"publisher": "Research Square",
"URL": "https://
"issued": {
"date-parts": [
[
2026,
5,
13
]
]
}
}
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.1016/j.phro.2026.101056 [code]
- Toward uncertainty-aware manual delineation of brain tumours using eye-tracking and image-derived features.Journal: Physics and imaging in radiation oncologyIn common: NiBabel, pandas, NumPy, other condition, 2 references
- [2] doi:10.1038/s41467-026-73072-6 [code]
- Mapping the spatiotemporal continuum of structural connectivity development across the human connectome in youth.Journal: Nature communicationsIn common: QSIPrep, NiBabel, pandas, 1 other tool, structural MRI / diffusion
- [3] doi:10.1038/s41398-026-04081-8 [code]
- Functional system-specific brain aging across the Alzheimer's disease continuum.Journal: Translational psychiatryIn common: QSIPrep, NiBabel, pandas, 1 other tool, structural MRI / diffusion
- [4] doi:10.1002/ana.78203 [code]
- AI-Driven Mapping of Seizure Spread Patterns.Journal: Annals of neurologyIn common: QSIPrep, NiBabel, pandas, 1 other tool, structural MRI / diffusion
- [5] doi:10.1158/2767-9764.crc-25-0710 [code]
- MRI Deep Learning for Differentiating Glioblastoma, IDH Wild-type from Central Nervous System Diffuse Large B-cell Lymphoma.Journal: Cancer research communicationsIn common: NiBabel, pandas, NumPy, structural MRI / diffusion, other condition, 2 references
- [6] doi:10.1038/s41598-026-48496-1 [code]
- A unified FLAIR hyperintensity segmentation model for various CNS tumor types and acquisition time points.Journal: Scientific reportsIn common: NiBabel, pandas, NumPy, methods / tools, structural MRI / diffusion, other condition, 1 reference
- [7] doi:10.3389/frai.2026.1771088 [code]
- Few-shot deployment of pretrained MRI transformers in brain imaging tasks.Journal: Frontiers in artificial intelligenceIn common: NiBabel, pandas, NumPy, methods / tools, structural MRI / diffusion, 1 reference
- [8] doi:10.21037/qims-2026-0792 [code]
- An nnU-Net-based framework with adaptive feature representation for 3D brain tumor segmentation.Journal: Quantitative imaging in medicine and surgeryIn common: NiBabel, pandas, NumPy, methods / tools, structural MRI / diffusion, other condition, 1 reference
- [9] doi:10.1016/j.dcn.2026.101775 [code]
- Neonatal brain-age models in full- and preterm infants.Journal: Developmental cognitive neuroscienceIn common: NiBabel, pandas, NumPy, structural MRI / diffusion, other condition, 1 reference
- [10] doi:10.64898/2026.03.10.26348006 [code]
- AI-Based Pipeline for the Segmentation of White Matter Hypoattenuations in CT Scans: A Design-Choice Validation StudyJournal: medRxiv (preprint)In common: NiBabel, pandas, NumPy, methods / tools, structural MRI / diffusion, 1 reference
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.
Claim this paper
Correct its record
Say what each link of this record is, remove the ones that are not the paper's, add the ones that are missing. The correction becomes a new version of the record, in its Versions section.
Validate its tracing map
You validate the map as this page shows it: 1 repository of the authors' code, each at its verified commit and with its license, 13 scripts, and 6 matches between paragraphs and code (see the Code and Map sections). It then receives a DOI on Zenodo, with you (your ORCID iD) and OSCR as its creators; the code itself is not deposited.
The map's fingerprint: sha256:abb920bc9c60e359…
Add the badge to its README
The badge links the code to this page. Copy one of these into the README of the paper's code: only you decide where it goes, and nothing is changed for you.
Markdown
[, paste the snippet at the top, then “Commit changes…” and, to review it first, “Create a new branch and start a pull request”. You open the pull request; OSCR asks for no permission.
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.
