OSCR

miniMORPH: A Morphometry Pipeline for Low-Field MRI in Infants.

Code ↔ Paper

5 matches between paragraphs of the paper and lines of its authors' code, computed by the harvester (lexical-v1). Click a colored paragraph or line to see its counterpart.

The 5 matches
  1. [1] § Materials and Methods › Image Processing and Segmentation Pipeline ↔ app/main.sh, lines 1–40 · score 0.96 · mid anterior, mid posterior, right thalamus, brainstem CSF, cerebellum CSF, supratentorial CSF
  2. [2] § Materials and Methods › Image Processing and Segmentation Pipeline › Individual Segmentation and Volumetry ↔ app/main.sh, lines 187–271 · score 0.93 · extract subcortical GM, subcortical GM mask, refine segmentation, ventricle mask, cerebellum masks, supratentorial CSF
  3. [3] § Materials and Methods › Analysis › HF Benchmarking › Benchmark 2: SuperSynth‐Derived HF Segmentations ↔ app/main.sh, lines 1–40 · score 0.83 · brainstem CSF, cerebellum CSF, supratentorial CSF, Globus Pallidus, Supratentorial Tissue, coverage
  4. [4] § Materials and Methods › Image Processing and Segmentation Pipeline › Ventricle, Cerebellum, and Brainstem Masks ↔ app/main.sh, lines 146–185 · score 0.72 · brainstem masks, ventricle masks, cerebellar masks, template space, segmentation
  5. [5] § Materials and Methods › Image Processing and Segmentation Pipeline › Age‐Specific Template Construction ↔ app/main.sh, lines 85–144 · score 0.52 · mri_synthstrip, ANTs, Templates, brain

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

Shell · 335 lines · 16 KB · MIT · 5 matches

  1. #!/bin/sh
  2. set -x
  3. ```
  4. # Module: Pipeline for segmenting infant brain images on Flywheel
  5. # Author: Chiara Casella, Niall Bourke
  6. # Overview:
  7. # This script is designed to segment infant brain images on Flywheel. The pipeline consists of the following steps:
  8. # 1. Register the input image to an age-specific template image
  9. # 2. Apply the resulting transformations to predefined segmentation priors and segmentation masks (template space), to bring them into the subject's native space
  10. # 3. Segment the input image in native space using ANTs Atropos, with three priors (tissue, CSF, skull)
  11. # 4. Refine the resulting segmentation posteriors to separate the ventricles from the remaining CSF, and the subcortical grey matter areas from the rest of the tissue
  12. # 5. Extract volume estimates from the segmentations
  13. #This pipeline should be used with the output of mrr-axireg.
  14. #The Final_segmentation_atlas.nii.gz includes the following labels: supratentorial tissue, supratentorial csf, ventricles, cerebellum, cerebellum csf, brainstem, brainstem_csf, left_thalamus,
  15. #left_caudate, left_putamen, left_globus_pallidus, right_thalamus, right_caudate, right_putamen, right_globus_pallidus
  16. #The Final_segmentation_atlas_with_callosum.nii.gz includes all the labels above, as well as the following callosal parcellations: posterior, mid-posterior, central, mid-anterior, anterior
  17. #Brainstem and brainstem CSF labels were additionally created as exclusion regions because coverage of the inferior field of view was inconsistent across scans.
  18. #Excluding these regions reduces the risk of introducing segmentation artefacts or bias related to variable brainstem coverage rather than true anatomical differences.
  19. # Usage:
  20. # This script is designed to be run as a Flywheel Gear. The script takes two inputs:
  21. # 1. The input image to segment
  22. # 2. The age of the template to use in months (e.g. 3, 6, 12, 24, 48, 72)
  23. # The script assumes that the input image is in NIfTI format. The script outputs the segmentations in native space.
  24. # NOTES:
  25. # Need txt output of volumes - I have added commands to extract volumes
  26. # clean up intermediate files - I have saved final files to $OUTPUT_DIR, and intermediate files to $WORK_DIR
  27. # slicer bet & segmentations in native space (-A) - added these too
  28. ```
  29. # Initialise the FSL environment
  30. . ${FSLDIR}/etc/fslconf/fsl.sh
  31. #Define inputs
  32. input_file=$1
  33. age=$2
  34. # Define the paths
  35. FLYWHEEL_BASE=/flywheel/v0
  36. INPUT_DIR=$FLYWHEEL_BASE/input/
  37. WORK_DIR=$FLYWHEEL_BASE/work
  38. OUTPUT_DIR=$FLYWHEEL_BASE/output
  39. TEMPLATE_DIR=$FLYWHEEL_BASE/app/templates/${age}/
  40. CONTAINER='[flywheel/ants-segmentation]'
  41. template=${TEMPLATE_DIR}/template_${age}_degibbs_padded.nii.gz
  42. template_mask=${TEMPLATE_DIR}/brainMask.nii.gz
  43. echo "permissions"
  44. ls -ltra /flywheel/v0/
  45. ##############################################################################
  46. # Handle INPUT file
  47. # Check that input file exists
  48. if [[ -e $input_file ]]; then
  49. echo "${CONTAINER} Input file found: ${input_file}"
  50. # Determine the type of the input file
  51. if [[ "$input_file" == *.nii ]]; then
  52. type=".nii"
  53. elif [[ "$input_file" == *.nii.gz ]]; then
  54. type=".nii.gz"
  55. fi
  56. # Get the base filename
  57. # base_filename=`basename "$input_file" $type`
  58. native_img=`basename $input_file`
  59. native_img="${native_img%.nii.gz}"
  60. else
  61. echo "${CONTAINER} no inputs were found within input directory $INPUT_DIR"
  62. exit 1
  63. fi
  64. # ##############################################################################
  65. echo -e "\n --- Step 1: Register image to template --- "
  66. # Define outputs in the following steps
  67. native_bet_image=${WORK_DIR}/native_bet_image.nii.gz
  68. native_brain_mask=${WORK_DIR}/native_brain_mask.nii.gz
  69. input_file_DN=${WORK_DIR}/DN.nii.gz
  70. input_file_BC=${WORK_DIR}/DN_BC.nii.gz
  71. #bet image to help with registration to template
  72. DenoiseImage -i ${input_file} -o ${input_file_DN}
  73. N4BiasFieldCorrection -i ${input_file_DN} -o ${input_file_BC}
  74. mri_synthstrip -i ${input_file_BC} -o ${native_bet_image} -m ${native_brain_mask} -b 2
  75. sync
  76. echo "BET image and mask created"
  77. ls ${native_bet_image} ${native_brain_mask}
  78. echo "***"
  79. sleep 3
  80. # Register native BET image to template brain
  81. echo "Registering native BET image to template brain"
  82. echo -e "\n Run SyN registration"
  83. #antsRegistrationSyN.sh -d 3 -t 's' -f ${template} -m ${native_bet_image} -j 1 -p 'f' -o ${WORK_DIR}/bet_ -n 4
  84. #Optimized registration step
  85. ants antsRegistration -d 3 --float 1 \
  86. --output [${WORK_DIR}/bet_,${WORK_DIR}/bet_Warped.nii.gz] \
  87. --use-histogram-matching 1 \
  88. --initial-moving-transform [${template},${native_bet_image},1] \
  89. --transform Rigid[0.1] \
  90. --metric MI[${template},${native_bet_image},1,64,Regular,0.25] \
  91. --convergence [1000x1000x500x250,1e-6,10] \
  92. --shrink-factors 8x6x4x2 \
  93. --smoothing-sigmas 4x3x2x1mm \
  94. --transform Affine[0.1] \
  95. --metric MI[${template},${native_bet_image},1,64,Regular,0.25] \
  96. --convergence [1000x1000x500x250,1e-6,10] \
  97. --shrink-factors 8x6x4x2 \
  98. --smoothing-sigmas 4x3x2x1mm \
  99. --transform SyN[0.1, 3, 0] \
  100. --metric CC[${template},${native_bet_image},1,4] \
  101. --convergence [100x100x70x50,1e-6,10] \
  102. --shrink-factors 6x4x2x1 \
  103. --smoothing-sigmas 3x2x1x0mm \
  104. --masks [${template_mask},${native_brain_mask}] \
  105. --interpolation BSpline
  106. sync
  107. sleep 3
  108. echo "antsRegistrationSyN done"
  109. echo "***"
  110. echo -e "\n --- Step 2: Apply registration to segmentation priors --- "
  111. # Get the affine and warp files from the registration
  112. AFFINE_TRANSFORM=$(ls ${WORK_DIR}/bet*GenericAffine.mat)
  113. WARP=$(ls ${WORK_DIR}/bet*Warp.nii.gz)
  114. INVERSE_WARP=$(ls ${WORK_DIR}/bet*InverseWarp.nii.gz)
  115. # Transform priors (template space) to each subject's native space
  116. echo "Transforming priors to native space for segmentation"
  117. items=(
  118. "${TEMPLATE_DIR}/prior1_scale.nii.gz"
  119. "${TEMPLATE_DIR}/prior2_scale.nii.gz"
  120. "${TEMPLATE_DIR}/prior3_scale.nii.gz"
  121. )
  122. for item in "${items[@]}"; do
  123. item_name=$(basename "$item" .nii.gz)
  124. output_prior="${item_name}.nii.gz"
  125. echo "*** Transforming ${item} ***"
  126. echo "*** Output: ${WORK_DIR}/"${output_prior}" ***"
  127. antsApplyTransforms -d 3 -i "${item}" -r ${native_bet_image} -o ${WORK_DIR}/"${output_prior}" -t ["$AFFINE_TRANSFORM",1] -t "${INVERSE_WARP}"
  128. sync
  129. echo "$item_name transformed and saved to ${output_prior}"
  130. done
  131. # Transform ventricles and subcortical grey matter masks (template space) to each subject's native space
  132. echo "Transforming masks to native space"
  133. items=(
  134. "${TEMPLATE_DIR}/ventricles_mask_0p55mm.nii.gz"
  135. "${TEMPLATE_DIR}/BCP_mask_padded_0p55mm.nii.gz"
  136. "${TEMPLATE_DIR}/cerebellum_mask_dilate_clean_padded_0p55mm.nii.gz"
  137. "${TEMPLATE_DIR}/callosum_mask_relabelled_padded_0p55mm.nii.gz"
  138. "${TEMPLATE_DIR}/brainstem_mask_dilate_clean_padded_0p55mm.nii.gz"
  139. )
  140. for item in "${items[@]}"; do
  141. item_name=$(basename "$item" .nii.gz)
  142. output_mask="${item_name}.nii.gz"
  143. if antsApplyTransforms -d 3 -i "${item}" -r ${native_bet_image} -o ${WORK_DIR}/"${output_mask}" -n NearestNeighbor -t ["$AFFINE_TRANSFORM",1] -t "${INVERSE_WARP}"; then
  144. echo "*** Transforming ${item} ***"
  145. echo "*** Output: ${WORK_DIR}/"${output_mask}" ***"
  146. else
  147. echo "Error: Failed to transform ${item}"
  148. exit 1
  149. fi
  150. sync
  151. done
  152. # Run Atropos
  153. echo -e "\n --- Step 3: Segmenting images --- "
  154. fslmaths ${native_brain_mask} -dilM -dilM ${WORK_DIR}/native_brain_mask_dil.nii.gz
  155. sync
  156. antsAtroposN4.sh -d 3 \
  157. -a ${input_file} \
  158. -x ${WORK_DIR}/native_brain_mask_dil.nii.gz \
  159. -p ${WORK_DIR}/prior%d_scale.nii.gz -c 3 -y 1 -y 2 \
  160. -w 0.3
  161. -r '[0.4,1x1x1]' \
  162. -o ${WORK_DIR}/ants_atropos_
  163. sync
  164. echo -e "\n Past Atropos segmentation step "
  165. sleep 3
  166. # Define posterior images from Atropos segmentation (segmentation in native space with 3 priors)
  167. Posterior1=${WORK_DIR}/ants_atropos_SegmentationPosteriors1.nii.gz
  168. Posterior2=${WORK_DIR}/ants_atropos_SegmentationPosteriors2.nii.gz
  169. Posterior3=${WORK_DIR}/ants_atropos_SegmentationPosteriors3.nii.gz
  170. echo -e "\n --- Step 4: Hello MDR, time to refine segmentations --- "
  171. #Refine segmentations to extract ventricles
  172. fslmaths ${Posterior2} -mul ${WORK_DIR}/ventricles_mask_0p55mm.nii.gz ${WORK_DIR}/ventricles_mask_mul
  173. fslmerge -t ${WORK_DIR}/merged_priors.nii.gz ${Posterior1} ${Posterior2} ${WORK_DIR}/ventricles_mask_mul.nii.gz ${Posterior3}
  174. sync
  175. fslmaths ${WORK_DIR}/merged_priors.nii.gz -Tmean -mul $(fslval ${WORK_DIR}/merged_priors.nii.gz dim4) ${WORK_DIR}/merged_priors_Tsum
  176. fslmaths ${WORK_DIR}/merged_priors_Tsum.nii.gz -thr 1.1 -bin ${WORK_DIR}/subtractmask
  177. fslmaths ${Posterior2} -mul ${WORK_DIR}/subtractmask ${WORK_DIR}/ventricles
  178. fslmaths ${Posterior2} -sub ${WORK_DIR}/ventricles.nii.gz ${WORK_DIR}/csf
  179. fslmaths ${native_brain_mask} -mul 0 ${WORK_DIR}/zero_filled_image.nii.gz
  180. fslmerge -t ${WORK_DIR}/merged_priors.nii.gz ${WORK_DIR}/zero_filled_image.nii.gz ${Posterior1} ${WORK_DIR}/csf.nii.gz ${WORK_DIR}/ventricles.nii.gz ${Posterior3}
  181. sync
  182. fslmaths ${WORK_DIR}/merged_priors.nii.gz -Tmaxn ${WORK_DIR}/temp_atlas.nii.gz #total tissue, csf, ventricles
  183. # Short pause of 3 seconds
  184. sleep 3
  185. echo -e "\n --- Step 5: Build the final segmentation atlas --- "
  186. #Extract subcortical GM
  187. if fslmaths ${WORK_DIR}/temp_atlas.nii.gz -thr 1 -uthr 1 -mul ${WORK_DIR}/BCP_mask_padded_0p55mm.nii.gz ${WORK_DIR}/sub_GM_mask_mul && \
  188. fslmaths ${WORK_DIR}/temp_atlas.nii.gz -add ${WORK_DIR}/sub_GM_mask_mul.nii.gz ${WORK_DIR}/temp_atlas.nii.gz; then #total tissue, csf, ventricles, subcortical GM
  189. echo "Atlas with subcortical GM created successfully."
  190. else
  191. echo "Error: Failed to create atlas with subcortical GM."
  192. fi
  193. sync
  194. echo "Adding the cerebellum to the atlas..."
  195. # Extract cerebellum and cerebellum CSF
  196. if fslmaths ${WORK_DIR}/temp_atlas.nii.gz -thr 1 -uthr 2 -mul ${WORK_DIR}/cerebellum_mask_dilate_clean_padded_0p55mm.nii.gz ${WORK_DIR}/cerebellum_mask_mul && \
  197. fslmaths ${WORK_DIR}/cerebellum_mask_mul -thr 30 -uthr 30 ${WORK_DIR}/cerebellum.nii.gz && \
  198. fslmaths ${WORK_DIR}/temp_atlas.nii.gz -add ${WORK_DIR}/cerebellum ${WORK_DIR}/temp_atlas.nii.gz && \
  199. fslmaths ${WORK_DIR}/cerebellum_mask_mul -thr 60 -uthr 60 -div 60 -mul 30 ${WORK_DIR}/cerebellum_csf.nii.gz && \
  200. fslmaths ${WORK_DIR}/temp_atlas.nii.gz -add ${WORK_DIR}/cerebellum_csf ${WORK_DIR}/temp_atlas.nii.gz; then
  201. echo "Atlas with cerebellum created successfully."
  202. else
  203. echo "Error: Failed to add cerebellum to the atlas."
  204. fi
  205. echo "Adding the brainstem to the atlas..."
  206. #Extract the brainstem and brainstem csf
  207. if fslmaths ${WORK_DIR}/temp_atlas.nii.gz -thr 1 -uthr 2 -mul ${WORK_DIR}/brainstem_mask_dilate_clean_padded_0p55mm.nii.gz ${WORK_DIR}/brainstem_mask_mul && \
  208. fslmaths ${WORK_DIR}/brainstem_mask_mul -thr 40 -uthr 40 ${WORK_DIR}/brainstem.nii.gz && \
  209. fslmaths ${WORK_DIR}/temp_atlas -add ${WORK_DIR}/brainstem ${WORK_DIR}/temp_atlas.nii.gz && \
  210. fslmaths ${WORK_DIR}/brainstem_mask_mul -thr 80 -uthr 80 -div 80 -mul 40 ${WORK_DIR}/brainstem_csf.nii.gz && \
  211. fslmaths ${WORK_DIR}/temp_atlas.nii.gz -add ${WORK_DIR}/brainstem_csf ${WORK_DIR}/Final_segmentation_atlas.nii.gz; then
  212. echo "Atlas with brainstem created successfully."
  213. #Supratentorial tissue, supratentorial csf, ventricles, subcortical GM (left/right caudate, putamen, thalamus, globus pallidus), cerebellum, cerebellum CSF, brainstem, brainstem CSF
  214. else
  215. echo "Error: Failed to add brainstem to the atlas."
  216. fi
  217. echo "Adding the callosum to the atlas..."
  218. # now extract the callosum
  219. if fslmaths ${WORK_DIR}/Final_segmentation_atlas.nii.gz -thr 1 -uthr 1 -mul ${WORK_DIR}/callosum_mask_relabelled_padded_0p55mm.nii.gz ${WORK_DIR}/callosum_mask_mul && \
  220. fslmaths ${WORK_DIR}/Final_segmentation_atlas.nii.gz -add ${WORK_DIR}/callosum_mask_mul ${WORK_DIR}/Final_segmentation_atlas_with_callosum.nii.gz; then
  221. echo "Atlas with callosum created successfully."
  222. else
  223. echo "Error: Failed to create atlas with callosum."
  224. fi
  225. # Short pause of 3 seconds
  226. sleep 3
  227. #Slicer for QC
  228. echo -e "\n --- Step 6: Run slicer and extract volume estimation from segmentations --- "
  229. slicer ${native_bet_image} ${native_bet_image} -a ${WORK_DIR}/slicer_bet.png
  230. slicer ${WORK_DIR}/Final_segmentation_atlas.nii.gz ${WORK_DIR}/Final_segmentation_atlas.nii.gz -a ${WORK_DIR}/slicer_seg1.png
  231. pngappend ${WORK_DIR}/slicer_bet.png - ${WORK_DIR}/slicer_seg1.png ${WORK_DIR}/montage_final_segmentation_atlas.png
  232. slicer ${WORK_DIR}/Final_segmentation_atlas_with_callosum.nii.gz ${WORK_DIR}/Final_segmentation_atlas_with_callosum.nii.gz -a ${WORK_DIR}/slicer_seg1.png
  233. pngappend ${WORK_DIR}/slicer_bet.png - ${WORK_DIR}/slicer_seg1.png ${WORK_DIR}/montage_final_segmentation_atlas_with_callosum.png
  234. # Extract volumes of segmentations
  235. output_csv=${WORK_DIR}/All_volumes.csv
  236. # Initialize the master CSV file with headers
  237. echo "template_age supratentorial_tissue supratentorial_csf ventricles cerebellum cerebellum_csf brainstem brainstem_csf left_thalamus left_caudate left_putamen left_globus_pallidus right_thalamus right_caudate right_putamen right_globus_pallidus posterior_callosum mid_posterior_callosum central_callosum mid_anterior_callosum anterior_callosum icv" > "$output_csv"
  238. atlas=${WORK_DIR}/Final_segmentation_atlas_with_callosum.nii.gz
  239. # Extract volumes for each label
  240. supratentorial_general=$(fslstats ${atlas} -l 0.5 -u 1.5 -V | awk '{print $2}')
  241. supratentorial_csf=$(fslstats ${atlas} -l 1.5 -u 2.5 -V | awk '{print $2}')
  242. ventricles=$(fslstats ${atlas} -l 2.5 -u 3.5 -V | awk '{print $2}')
  243. cerebellum=$(fslstats ${atlas} -l 30.5 -u 31.5 -V | awk '{print $2}')
  244. cerebellum_csf=$(fslstats ${atlas} -l 31.5 -u 32.5 -V | awk '{print $2}')
  245. brainstem=$(fslstats ${atlas} -l 40.5 -u 41.5 -V | awk '{print $2}')
  246. brainstem_csf=$(fslstats ${atlas} -l 41.5 -u 42.5 -V | awk '{print $2}')
  247. left_thalamus=$(fslstats ${atlas} -l 16.5 -u 17.5 -V | awk '{print $2}')
  248. left_caudate=$(fslstats ${atlas} -l 17.5 -u 18.5 -V | awk '{print $2}')
  249. left_putamen=$(fslstats ${atlas} -l 18.5 -u 19.5 -V | awk '{print $2}')
  250. left_globus_pallidus=$(fslstats ${atlas} -l 19.5 -u 20.5 -V | awk '{print $2}')
  251. right_thalamus=$(fslstats ${atlas} -l 26.5 -u 27.5 -V | awk '{print $2}')
  252. right_caudate=$(fslstats ${atlas} -l 27.5 -u 28.5 -V | awk '{print $2}')
  253. right_putamen=$(fslstats ${atlas} -l 28.5 -u 29.5 -V | awk '{print $2}')
  254. right_globus_pallidus=$(fslstats ${atlas} -l 29.5 -u 30.5 -V | awk '{print $2}')
  255. posterior_callosum=$(fslstats ${atlas} -l 7.5 -u 8.5 -V | awk '{print $2}')
  256. mid_posterior_callosum=$(fslstats ${atlas} -l 8.5 -u 9.5 -V | awk '{print $2}')
  257. central_callosum=$(fslstats ${atlas} -l 9.5 -u 10.5 -V | awk '{print $2}')
  258. mid_anterior_callosum=$(fslstats ${atlas} -l 10.5 -u 11.5 -V | awk '{print $2}')
  259. anterior_callosum=$(fslstats ${atlas} -l 11.5 -u 12.5 -V | awk '{print $2}')
  260. # Calculate supratentorial tissue volume (include all relevant regions)
  261. supratentorial_tissue=$(echo "$supratentorial_general + $left_thalamus + $left_caudate + $left_putamen + $left_globus_pallidus + $right_thalamus + $right_caudate + $right_putamen + $right_globus_pallidus + $posterior_callosum + $mid_posterior_callosum + $central_callosum + $mid_anterior_callosum + $anterior_callosum" | bc)
  262. # Calculate ICV
  263. icv=$(echo "$supratentorial_tissue + $supratentorial_csf + $cerebellum + $cerebellum_csf + $brainstem + $brainstem_csf" | bc)
  264. echo "$age $supratentorial_tissue $supratentorial_csf $ventricles $cerebellum $cerebellum_csf $brainstem $brainstem_csf $left_thalamus $left_caudate $left_putamen $left_globus_pallidus $right_thalamus $right_caudate $right_putamen $right_globus_pallidus $posterior_callosum $mid_posterior_callosum $central_callosum $mid_anterior_callosum $anterior_callosum $icv" >> "$output_csv"
  265. echo "Volumes extracted and saved to $output_csv"

main.sh at commit 08c7398, under MIT · at the source

Overview

Authors: Chiara Casella1,2, Aksel Leknes3, Niall J. Bourke4, Ayo Zahra3, Daniel Cromb1,5, Dora Barnes5, Alejandra Martin Segura6, Flora Silvester5, Vanessa Kyriakopoulou1, Daniel Elijah Scheiene3, Simone R. Williams7,8, Layla E. Bradford7,8, Joanitta Murungi9, Steven C. R. Williams4, Sean C. L. Deoni10, Victoria Nankabirwa9,11, Kirsten A. Donald7,8, Muriel M. K. Bruchhage3,4,12, Jonathan O'Muircheartaigh1,2,13
13 affiliations
  1. Research Department of Early Life Imaging School of Biomedical Engineering and Imaging Sciences, King's College London London UK
  2. Department of Forensic and Neurodevelopmental Sciences Institute of Psychiatry, Psychology & Neuroscience, King's College London London UK
  3. Institute of Psychology, University of Stavanger Stavanger Norway
  4. Centre for Neuroimaging Sciences, Department of Neuroimaging Institute of Psychiatry, Psychology & Neuroscience, King's College London London UK
  5. Department of General Paediatrics Evelina London Children's Hospital London UK
  6. Department of General Paediatrics St George's Hospital London UK
  7. Department of Paediatrics and Child Health Red Cross War Memorial Children's Hospital, University of Cape Town Cape Town South Africa
  8. Neuroscience Institute, University of Cape Town Cape Town South Africa
  9. Department of Epidemiology and Biostatistics School of Public Health, College of Health Sciences, Makerere University Kampala Uganda
  10. MNCH D&T, Bill & Melinda Gates Foundation Seattle Washington USA
  11. Vilirana Hospital Kampala Uganda
  12. Stavanger Medical Imaging Laboratory, Department of Radiology Stavanger University Hospital Stavanger Norway
  13. MRC Centre for Neurodevelopmental Disorders, King's College London London UK
Journal: Human brain mapping, volume 47, issue 9, article e70547
Dates: received 6 February 2026; accepted 5 May 2026; published online 23 June 2026; in print June 2026
Type: Other · Language: English
License: CC BY
Identifiers: DOI 10.1002/hbm.70547 · PMID 42334017 · PMCID PMC13288155 · OpenAlex W7165618587
Open access: gold, a free copy (OpenAlex)
Status: code verified
Categories: structural MRI / diffusion (modality), human (organism), developmental (subfield)
Methods: Connectivity, Statistics, fMRI & imaging
Keywords: automated segmentation, brain volumetry, cross‐modality validation, infant brain, low‐ and middle‐income settings, template‐based morphometry, ultra‐low‐field MRI
MeSH: Brain*, Image Processing, Computer-Assisted*, Magnetic Resonance Imaging*, Neuroimaging*, Child, Preschool, Female, Humans, Infant, Male, Uganda (* major topic)
Journal subjects: Technical Report
Topic: Fetal and Pediatric Neurological Disorders (Pediatrics, Perinatology and Child Health, Medicine), according to OpenAlex
Funding: Bill and Melinda Gates Foundation (INV‐018164, INV‐005774, INV‐047888, INV‐047885); Wellcome Trust (314678/Z/24/Z, 222076/Z/20/Z)
Citations: cited by 1 paper (Europe PMC); 43 references in the paper

Abstract

Ultra‐low‐field (ULF) MRI facilitates neuroimaging access, yet its application in early infancy is constrained by low resolution and contrast, and the limited suitability of existing segmentation tools. In this work we introduce and validate miniMORPH, an open‐source pipeline for automated brain volumetry from 0.064T T2‐weighted MRI acquired across infancy and toddlerhood. ULF scans were acquired from infants aged 2 to 27 months across two cohorts in South Africa and Uganda. Age‐specific templates and priors were used to segment major brain tissues and substructures. Validation used two high‐field (HF) references: (i) expert manual HF segmentations for key ROIs across ages, and (ii) automated HF segmentations from SuperSynth on paired HF‐ULF scans. We quantified (a) between‐subject ordering across modalities using Pearson’s correlation (r) and (b) systematic scaling differences using percentage error (PE) and time‐corrected percentage error (CPE), stratifying performance by cohort and age. Face validity was also tested via mixed‐effects models of age, sex, and birthweight. miniMORPH generated anatomically plausible segmentations of major brain regions across infancy. In paired HF‐ULF comparisons, between‐subject ordering was generally preserved across many ROIs, with stronger correspondence in the South African cohort than in the Ugandan cohort at 12 months. Systematic scaling offsets were most evident in CSF‐rich or boundary‐sensitive compartments, with consistently negative CPE for ventricles and cerebellum. Performance varied with age, showing the greatest variability at 3 months. miniMORPH successfully captured regional age‐related growth trajectories. Sex‐dependent volumetric differences were widespread but attenuated after intracranial volume correction. Low birthweight infants exhibited reduced regional volumes and altered growth trajectories. Taken together, these findings indicate that miniMORPH enables volumetric analysis of ULF infant MRI and preserves between‐subject variation suitable for developmental and group analyses. ROI‐ and cohort‐specific offsets, particularly in CSF‐rich regions, may require calibration when absolute volumes are needed. The pipeline is openly available at https://github.com/UNITY‐Physics/fw‐minimorph.

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 5 matches between paragraphs and lines of code.

UNITY-Physics/fw-minimorph

License: MIT
State: the link answers, verified on 26 September 2026
Evidence: files inventoried
Commit: 08c7398e42c88031da40ae84941214aa6b4a0299, 7 April 2026
Languages: Python (8), Shell (3)
Size: 35 files, 11 scripts
Software Heritage: not archived
Found in: “Data Availability Statement”
Holds: README, license file, environment (Dockerfile), tests, documentation
Not found: CITATION.cff, continuous integration
Tools: FSL (2 files), ANTs (1 file), FreeSurfer (1 file), Matplotlib (1 file), NiBabel (1 file), NumPy (1 file), pandas (1 file), Pillow (1 file)
Availability: 1 check, the latest on 26 September 2026: the link answers
  • 26 September 2026: the link answers
13 files

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;
  • 11 scripts, each with its path and the digest of its content;
  • 5 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 Availability Statement

The miniMORPH pipeline is openly available at https://github.com/UNITY‐Physics/fw‐minimorph (https://github.com/UNITY-Physics/fw-minimorph). De‐identified data supporting this study are available from the corresponding individual sites contributing data to this study upon reasonable request, subject to ethical, privacy, and data governance constraints, and are not publicly available. A paired high‐field and ultra‐low‐field (HF–ULF) UCT‐Khula dataset from related cross‐validation work is publicly available on ZivaHub (Ringshaw et al. 2026, https://doi.org/10.1002/hbm.70443; dataset: https://doi.org/10.25375/uct.29197649.v1).

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, 19 authors, 7 keywords, 10 MeSH terms, 2 funders, 43 references.

Cite

This paper

Casella, C., Leknes, A., Bourke, N. J., Zahra, A., Cromb, D., Barnes, D., Segura, A. M., Silvester, F., Kyriakopoulou, V., Scheiene, D. E., Williams, S. R., Bradford, L. E., Murungi, J., Williams, S. C. R., Deoni, S. C. L., Nankabirwa, V., Donald, K. A., Bruchhage, M. M. K., & O'Muircheartaigh, J. (2026). miniMORPH: A Morphometry Pipeline for Low-Field MRI in Infants. Human brain mapping, 47(9), e70547. https://doi.org/10.1002/hbm.70547

BibTeX

@article{casella2026minimorph,
author = {Casella, Chiara and Leknes, Aksel and Bourke, Niall J. and Zahra, Ayo and Cromb, Daniel and Barnes, Dora and Segura, Alejandra Martin and Silvester, Flora and Kyriakopoulou, Vanessa and Scheiene, Daniel Elijah and Williams, Simone R. and Bradford, Layla E. and Murungi, Joanitta and Williams, Steven C. R. and Deoni, Sean C. L. and Nankabirwa, Victoria and Donald, Kirsten A. and Bruchhage, Muriel M. K. and O'Muircheartaigh, Jonathan},
title = {{miniMORPH: A Morphometry Pipeline for Low-Field MRI in Infants}},
journal = {Human brain mapping},
year = {2026},
month = jun,
volume = {47},
number = {9},
pages = {e70547},
publisher = {Wiley},
issn = {1065-9471},
doi = {10.1002/hbm.70547},
url = {https://doi.org/10.1002/hbm.70547},
pmid = {42334017},
pmcid = {PMC13288155}
}

RIS

TY - JOUR
AU - Casella, Chiara
AU - Leknes, Aksel
AU - Bourke, Niall J.
AU - Zahra, Ayo
AU - Cromb, Daniel
AU - Barnes, Dora
AU - Segura, Alejandra Martin
AU - Silvester, Flora
AU - Kyriakopoulou, Vanessa
AU - Scheiene, Daniel Elijah
AU - Williams, Simone R.
AU - Bradford, Layla E.
AU - Murungi, Joanitta
AU - Williams, Steven C. R.
AU - Deoni, Sean C. L.
AU - Nankabirwa, Victoria
AU - Donald, Kirsten A.
AU - Bruchhage, Muriel M. K.
AU - O'Muircheartaigh, Jonathan
TI - miniMORPH: A Morphometry Pipeline for Low-Field MRI in Infants
T2 - Human brain mapping
J2 - Hum Brain Mapp
PY - 2026
DA - 2026/06/01
VL - 47
IS - 9
SP - e70547
SN - 1065-9471
PB - Wiley
DO - 10.1002/hbm.70547
UR - https://doi.org/10.1002/hbm.70547
LA - en
ER -

CSL-JSON

{
"id": "10.1002/hbm.70547",
"type": "article-journal",
"title": "miniMORPH: A Morphometry Pipeline for Low-Field MRI in Infants",
"container-title": "Human brain mapping",
"author": [
{
"family": "Casella",
"given": "Chiara"
},
{
"family": "Leknes",
"given": "Aksel"
},
{
"family": "Bourke",
"given": "Niall J."
},
{
"family": "Zahra",
"given": "Ayo"
},
{
"family": "Cromb",
"given": "Daniel"
},
{
"family": "Barnes",
"given": "Dora"
},
{
"family": "Segura",
"given": "Alejandra Martin"
},
{
"family": "Silvester",
"given": "Flora"
},
{
"family": "Kyriakopoulou",
"given": "Vanessa"
},
{
"family": "Scheiene",
"given": "Daniel Elijah"
},
{
"family": "Williams",
"given": "Simone R."
},
{
"family": "Bradford",
"given": "Layla E."
},
{
"family": "Murungi",
"given": "Joanitta"
},
{
"family": "Williams",
"given": "Steven C. R."
},
{
"family": "Deoni",
"given": "Sean C. L."
},
{
"family": "Nankabirwa",
"given": "Victoria"
},
{
"family": "Donald",
"given": "Kirsten A."
},
{
"family": "Bruchhage",
"given": "Muriel M. K."
},
{
"family": "O'Muircheartaigh",
"given": "Jonathan"
}
],
"container-title-short": "Hum Brain Mapp",
"volume": "47",
"issue": "9",
"page": "e70547",
"DOI": "10.1002/hbm.70547",
"PMID": "42334017",
"PMCID": "PMC13288155",
"ISSN": "1065-9471",
"publisher": "Wiley",
"URL": "https://doi.org/10.1002/hbm.70547",
"language": "en",
"issued": {
"date-parts": [
[
2026,
6,
1
]
]
}
}

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.1093/braincomms/fcag318 [code]
Antenatal maternal anaemia and infant brain structure: high-field (3 T) and ultra-low-field (64 mT) MRI findings from South Africa.
Journal: Brain communications
In common: ANTs, FreeSurfer, FSL, 5 other tools, developmental, structural MRI / diffusion, 9 references, 3 authors
[2] doi:10.1162/imag.a.1352 [code]
Brain-age in ultra-low-field MRI: How well does it work?
Journal: Imaging neuroscience (Cambridge, Mass.)
In common: ANTs, FreeSurfer, FSL, 3 other tools, structural MRI / diffusion, 5 references
[3] doi:10.1002/alz.71649 [code]
Postmortem brain MRI reveals differential associations of subcortical and limbic volumes with cortical thinning and neurodegenerative pathologies.
Journal: Alzheimer's & dementia : the journal of the Alzheimer's Association
In common: ANTs, FreeSurfer, FSL, 5 other tools, structural MRI / diffusion, 3 references
[4] doi:10.1002/mrm.70488 [code]
Advancing the Volumetric Analysis of Ultra-Low-Field Brain MRI Using Image-to-Image Translation.
Journal: Magnetic resonance in medicine
In common: Matplotlib, NumPy, structural MRI / diffusion, 7 references
[5] doi:10.1038/s41467-026-71555-0 [code]
A deep representation learning model to predict response to vagus nerve stimulation.
Journal: Nature communications
In common: ANTs, FreeSurfer, FSL, 4 other tools, structural MRI / diffusion, 3 references
[6] doi:10.1016/j.jmro.2026.100225 [code]
Feasibility, image quality, and analytic usability of mobile 64 mT ultra-low-field MRI for infant brain imaging at 3 and 12 months in southern Malawi.
Journal: Journal of magnetic resonance open
In common: developmental, structural MRI / diffusion, 7 references
[7] doi:10.1038/s41597-026-07248-6 [code]
A large-scale fMRI dataset for vision-language semantic association.
Journal: Scientific data
In common: ANTs, FreeSurfer, FSL, 5 other tools, 2 references
[8] doi:10.1002/nbm.70353 [code]
Automated Surface-Based Segmentation of Deep Gray Matter Regions Based on Diffusion Tensor Images Reveals Unique Age Trajectories Over the Healthy Lifespan.
Journal: NMR in biomedicine
In common: ANTs, FreeSurfer, FSL, 2 other tools, structural MRI / diffusion, 3 references
[9] doi:10.21203/rs.3.rs-9326213/v1 [code]
Multi-task fMRI outperforms resting-state fMRI for revealing task-invariant organization of the human brain
Journal: Research Square (preprint)
In common: ANTs, FreeSurfer, FSL, 5 other tools, 1 reference
[10] doi:10.1002/advs.76596 [code]
DDSurfer: A Weakly-Supervised Dual-Stream Deep Learning Framework for Cortical Surface Reconstruction From Diffusion MRI.
Journal: Advanced science (Weinheim, Baden-Wurttemberg, Germany)
In common: ANTs, FreeSurfer, NiBabel, 2 other tools, structural MRI / diffusion, 4 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.