OSCR

Anatomy-aware, label-informed approach improves image registration for challenging datasets.

Code ↔ Paper

3 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 3 matches
  1. [1] § Methods › Principal Component Analysis (PCA) ↔ Scripts/analysis_PCA.R, lines 1–45 · score 0.67 · multichannelPCA, combined inverse, forward transforms, Component, template
  2. [2] § Methods › Registration ↔ Scripts/registration_labelIntensity.R, lines 42–115 · score 0.58 · labelImageRegistration, antsRegistration, intensity image, deformable, linear, masks
  3. [3] § Methods › Tensor Based Morphometry (TBM) ↔ Scripts/analysis_TBM.R, lines 1–53 · score 0.56 · createJacobianDeterminantImage, Jacobian determinants, regression, FDR, Morphometry, TBM

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

R · 247 lines · 8.8 KB · no license · 1 match

  1. # Principal Component Analysis (PCA)
  2. # Rachel Roston, Ph.D.
  3. library(ANTsR)
  4. library(stringr)
  5. library(viridis)
  6. # All forward transforms
  7. # intensity-only PCA
  8. experiment = "intensityOnly"
  9. txPattern = "combinedInverseWarps"
  10. baseline = "WT"
  11. {
  12. tx.dir = paste0("./Results/", experiment, "/Transforms")
  13. tx.paths = dir(tx.dir, pattern = txPattern, recursive = T)
  14. subjects = str_extract(tx.paths, "Scan_....")
  15. genotypes = str_split_i(tx.paths, "/", 1)
  16. genotypes = relevel(as.factor(genotypes), ref = baseline)
  17. ref.img = antsImageRead("./Data/Template/maskedtemplate0__lowRes.nii.gz")
  18. ref.mask = antsImageRead("./Data/Template/maskedtemplate0__lowRes-wholebody-label.nii.gz")
  19. # Output directory
  20. results.dir = paste0("./Results/", experiment, "/PCA-", txPattern)
  21. if(! dir.exists(results.dir)) dir.create(results.dir)
  22. # PCA
  23. pca_mask = iMath(ref.mask, "MD", 15) # dilate to allow PC img deformations
  24. transforms = lapply(paste0(tx.dir, "/", tx.paths), antsImageRead)
  25. pca <- multichannelPCA(x = transforms,
  26. mask = pca_mask,
  27. pcaOption = "randPCA")
  28. # save csv for each PCA output (d, u, v)
  29. pca_d = data.frame(d = pca$pca$d)
  30. write.csv(pca_d, paste0(results.dir, "/pca_d.csv"))
  31. pca_u = data.frame(ScanID = subjects, pca$pca$u)
  32. colnames(pca_u) <- c("ScanID", paste0("PC", 1:(ncol(pca_u)-1)))
  33. write.csv(pca_u, paste0(results.dir, "/pca_u.csv"))
  34. # save deformed atlas
  35. PC_warpedImg.dir = paste0(results.dir, "/warpedTemplate")
  36. if(!dir.exists(PC_warpedImg.dir))dir.create(PC_warpedImg.dir)
  37. for(i in 1:ncol(pca$pca$u)){
  38. pos.scaled = vectorToMultichannel(500*pca$pca$v[,i], pca_mask) #this should be the mask you used for your PCA
  39. pos.scaledTX = antsrTransformFromDisplacementField(pos.scaled)
  40. pos.warped.img = applyAntsrTransform(pos.scaledTX,
  41. data=ref.img,
  42. reference= ref.img,
  43. interpolation = "linear")
  44. antsImageWrite(pos.warped.img, paste0(PC_warpedImg.dir, "/PC", str_pad(i, width = 2, side = "left", 0), "_", experiment, "_pos-500_warpedTemplate.nrrd"))
  45. neg.scaled = vectorToMultichannel(-500*pca$pca$v[,i], pca_mask) #this should be the mask you used for your PCA
  46. neg.scaledTX = antsrTransformFromDisplacementField(neg.scaled)
  47. neg.warped.img = applyAntsrTransform(neg.scaledTX,
  48. data=ref.img,
  49. reference= ref.img,
  50. interpolation = "linear")
  51. antsImageWrite(neg.warped.img, paste0(PC_warpedImg.dir, "/PC", str_pad(i, width = 2, side = "left", 0), "_", experiment, "_neg-500_warpedTemplate.nrrd"))
  52. }
  53. # save plots
  54. wt = which(genotypes == "WT")
  55. ko = which(genotypes == "KO")
  56. ## Scree plot
  57. par(family="")
  58. png(filename = paste0(results.dir, "/scree.png"),
  59. #res = 300,
  60. units = "px",
  61. height = 480,
  62. width = 880)
  63. eigen.sum=sum(pca$pca$d)
  64. PC.percent = pca$pca$d/eigen.sum*100
  65. plot(x = 1:length(pca$pca$d),
  66. y = PC.percent,
  67. xlab = "PC",
  68. ylab = "% Variance Explained",
  69. main = paste0(experiment, ", ", txPattern))
  70. dev.off()
  71. ## PC-PC plot
  72. maxPC = floor(length(pca$pca$d)/2)
  73. for(p in seq(1, maxPC, by = 2)){
  74. PCs = c(p, p+1)
  75. par(family="")
  76. png(filename = paste0(results.dir, "/PC_plot", PCs[1], "-", PCs[2], ".png"),
  77. #res = 300,
  78. units = "px",
  79. height = 480,
  80. width = 480)
  81. par(mar= c(5,5,5,5), xpd = TRUE)
  82. plot(x = pca$pca$u[,PCs[1]],
  83. y = pca$pca$u[,PCs[2]],
  84. pch=32,
  85. xlab = paste0("PC", PCs[1], " (", signif(PC.percent, digits = 3)[PCs[1]], "%)"),
  86. ylab = paste0("PC", PCs[2], " (", signif(PC.percent, digits = 3)[PCs[2]], "%)"),
  87. main = paste0(experiment, ", ", txPattern)
  88. )
  89. # plot wildtype
  90. points(x = pca$pca$u[wt,PCs[1]],
  91. y = pca$pca$u[wt,PCs[2]], pch=17, col="black")
  92. # plot KOs
  93. points(x = pca$pca$u[ko,PCs[1]],
  94. y = pca$pca$u[ko,PCs[2]], pch=16, col="red")
  95. legend('topright',
  96. legend = levels(genotypes),
  97. col = c("black", "red"),
  98. pch = c(17, 16))
  99. dev.off()
  100. }
  101. }
  102. # label-intensity PCA
  103. experiment = "labelIntensity"
  104. txPattern = "combinedInverseWarps"
  105. baseline = "WT"
  106. {
  107. tx.dir = paste0("./Results/", experiment, "/Transforms")
  108. tx.paths = dir(tx.dir, pattern = txPattern, recursive = T)
  109. subjects = str_extract(tx.paths, "Scan_....")
  110. genotypes = str_split_i(tx.paths, "/", 1)
  111. genotypes = relevel(as.factor(genotypes), ref = baseline)
  112. ref.img = antsImageRead("./Data/Template/maskedtemplate0__lowRes.nii.gz")
  113. ref.mask = antsImageRead("./Data/Template/maskedtemplate0__lowRes-wholebody-label.nii.gz")
  114. # Output directory
  115. results.dir = paste0("./Results/", experiment, "/PCA-", txPattern)
  116. if(! dir.exists(results.dir)) dir.create(results.dir)
  117. # PCA
  118. pca_mask = iMath(ref.mask, "MD", 15) # dilate to allow PC img deformations
  119. transforms = lapply(paste0(tx.dir, "/", tx.paths), antsImageRead)
  120. pca <- multichannelPCA(x = transforms,
  121. mask = pca_mask,
  122. pcaOption = "randPCA")
  123. # save csv for each PCA output (d, u, v)
  124. pca_d = data.frame(d = pca$pca$d)
  125. write.csv(pca_d, paste0(results.dir, "/pca_d.csv"))
  126. pca_u = data.frame(ScanID = subjects, pca$pca$u)
  127. colnames(pca_u) <- c("ScanID", paste0("PC", 1:(ncol(pca_u)-1)))
  128. write.csv(pca_u, paste0(results.dir, "/pca_u.csv"))
  129. # save deformed atlas
  130. PC_warpedImg.dir = paste0(results.dir, "/warpedTemplate")
  131. if(!dir.exists(PC_warpedImg.dir))dir.create(PC_warpedImg.dir)
  132. for(i in 1:ncol(pca$pca$u)){
  133. pos.scaled = vectorToMultichannel(500*pca$pca$v[,i], pca_mask) #this should be the mask you used for your PCA
  134. pos.scaledTX = antsrTransformFromDisplacementField(pos.scaled)
  135. pos.warped.img = applyAntsrTransform(pos.scaledTX,
  136. data=ref.img,
  137. reference= ref.img,
  138. interpolation = "linear")
  139. antsImageWrite(pos.warped.img, paste0(PC_warpedImg.dir, "/PC", str_pad(i, width = 2, side = "left", 0), "_", experiment, "_pos-500_warpedTemplate.nrrd"))
  140. neg.scaled = vectorToMultichannel(-500*pca$pca$v[,i], pca_mask) #this should be the mask you used for your PCA
  141. neg.scaledTX = antsrTransformFromDisplacementField(neg.scaled)
  142. neg.warped.img = applyAntsrTransform(neg.scaledTX,
  143. data=ref.img,
  144. reference= ref.img,
  145. interpolation = "linear")
  146. antsImageWrite(neg.warped.img, paste0(PC_warpedImg.dir, "/PC", str_pad(i, width = 2, side = "left", 0), "_", experiment, "_neg-500_warpedTemplate.nrrd"))
  147. }
  148. # save plots
  149. wt = which(genotypes == "WT")
  150. ko = which(genotypes == "KO")
  151. ## Scree plot
  152. par(family="")
  153. png(filename = paste0(results.dir, "/scree.png"),
  154. #res = 300,
  155. units = "px",
  156. height = 480,
  157. width = 880)
  158. eigen.sum=sum(pca$pca$d)
  159. PC.percent = pca$pca$d/eigen.sum*100
  160. plot(x = 1:length(pca$pca$d),
  161. y = PC.percent,
  162. xlab = "PC",
  163. ylab = "% Variance Explained",
  164. main = paste0(experiment, ", ", txPattern))
  165. dev.off()
  166. ## PC-PC plot
  167. maxPC = floor(length(pca$pca$d)/2)
  168. for(p in seq(1, maxPC, by = 2)){
  169. PCs = c(p, p+1)
  170. par(family="")
  171. png(filename = paste0(results.dir, "/PC_plot", PCs[1], "-", PCs[2], ".png"),
  172. #res = 300,
  173. units = "px",
  174. height = 480,
  175. width = 480)
  176. par(mar= c(5,5,5,5), xpd = TRUE)
  177. plot(x = pca$pca$u[,PCs[1]],
  178. y = pca$pca$u[,PCs[2]],
  179. pch=32,
  180. xlab = paste0("PC", PCs[1], " (", signif(PC.percent, digits = 3)[PCs[1]], "%)"),
  181. ylab = paste0("PC", PCs[2], " (", signif(PC.percent, digits = 3)[PCs[2]], "%)"),
  182. main = paste0(experiment, ", ", txPattern)
  183. )
  184. # plot wildtype
  185. points(x = pca$pca$u[wt,PCs[1]],
  186. y = pca$pca$u[wt,PCs[2]], pch=17, col="black")
  187. # plot KOs
  188. points(x = pca$pca$u[ko,PCs[1]],
  189. y = pca$pca$u[ko,PCs[2]], pch=16, col="red")
  190. legend('topright',
  191. legend = levels(genotypes),
  192. col = c("black", "red"),
  193. pch = c(17, 16))
  194. dev.off()
  195. }
  196. }

analysis_PCA.R at commit 85396b9, no license · at the source

Overview

  1. Center for Developmental Biology and Regenerative Medicine, Seattle Children’s Research Institute, Seattle, Washington, United States of America
  2. Department of Radiology and Medical Imaging, University of Virginia, Charlottesville, Virginia, United States of America
  3. Department of Pediatrics, University of Washington, Seattle, Washington, United States of America
Institutions: Seattle Children's Research Institute (United States); University of Virginia (United States); University of Washington (United States)
Journal: PloS one, volume 21, issue 9, article e0357448
Dates: received 23 September 2025; accepted 18 August 2026; published online 8 September 2026
Type: Research article · Language: English
License: CC BY
Identifiers: DOI 10.1371/journal.pone.0357448 · PMID 42709748 · PMCID PMC13552761 · OpenAlex W4413128202
Open access: gold, a free copy (OpenAlex)
Status: code verified
Categories: structural MRI / diffusion (modality), mouse (organism), methods / tools (subfield)
Methods: Connectivity, Statistics, Smoothing, state filtering, decompositions, Machine learning
MeSH: Image Processing, Computer-Assisted*, Algorithms, Animals, Mice, Mice, Knockout, Phenotype (* major topic)
Journal subjects: Research and Analysis Methods, Imaging Techniques, Morphometry, Mathematical and Statistical Techniques, Statistical Methods, Multivariate Analysis, Principal Component Analysis, Physical Sciences, Mathematics, Statistics, Biology and Life Sciences, Genetics, Phenotypes, Neuroimaging, Neuroscience, Anatomy, Nervous System, Neuroanatomy, Spinal Cord, Medicine and Health Sciences, Developmental Biology, Morphogenesis, Morphogenic Segmentation, Digestive System, Gastrointestinal Tract, Stomach
Topic: Cell Image Analysis Techniques (Biophysics, Biochemistry, Genetics and Molecular Biology), according to OpenAlex
Funding: NIH (P01HD104435, R03DE031313, S10OD032302)
Citations: not cited yet (Europe PMC); 74 references in the paper
Research resources: RRID:SCR_024678

Abstract

Image registration-based volumetric morphometrics have emerged as a valuable method for identifying subtle morphological differences in neuroimaging and other biomedical images. However, accurate registration out-of-the-box remains challenging when overt morphological phenotypes are present, limiting the application of registration-based morphometrics in developmental and comparative studies where overt phenotypic differences are common. A new label-informed image registration function developed in the ANTsX ecosystem provides an easy to use, generalizable solution for anatomy-aware registration of a wider diversity of morphological variation including many overt phenotypes. In this approach, segmentations (i.e., labels) provide a priori regional correspondences that guide the registration, allowing morphological experts to define regions of correspondence based on biological concepts of homology (e.g., tissue origin, gene expression patterns). Here we demonstrate the utility of this label-informed image registration approach for registering knockout mouse embryos with overt phenotypes which fail to register to a wildtype (normative) template image by traditional registration methods. Due to severe scoliosis, E15.5 Gli2-/- mouse embryos exhibit a radical topological rearrangement of the internal organs; traditional intensity-only registration fails to accurately align the organs of knockout embryos with the normative template, limiting the interpretability of registration-based morphometric analyses. In contrast, label-informed image registration improved the correspondence of knockout subjects to the canonical template image, increasing the biological interpretability, power, and sensitivity of registration-derived morphometrics. All in all, label-informed image registration provides a flexible and customizable method to allow image registration in datasets for which registration-based morphometrics were previously unfeasible, unlocking new potential applications of registration-based morphometrics in developmental, comparative, and evolutionary studies.

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

raroston/labelImageRegistration_Comparison

License: none: the authors keep all their rights
State: the link answers, verified on 26 September 2026
Evidence: files inventoried
Commit: 85396b95b280f26baaa3eb3a515c566cddb49db6, 23 July 2026
Languages: R (7)
Size: 68 files, 7 scripts
Software Heritage: not archived
Found in: the text, “Registration”
Holds: README
Not found: license file, CITATION.cff, environment file, tests, continuous integration, documentation
Tools: ANTs (7 files), tidyverse (4 files), ggplot2 (2 files)
Availability: 1 check, the latest on 26 September 2026: the link answers
  • 26 September 2026: the link answers
8 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;
  • 7 scripts, each with its path and the digest of its content;
  • 3 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

https://github.com/raroston/labelImageRegistration_Comparison/.

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 3, 28 September 2026

  • Authors: added Rachel A. Roston (0000-0002-1958-4849); removed Rachel A. Roston

Version 1, 27 September 2026: the first record

Recorded: type, language, journal, volume, issue, pages, dates, 3 authors, 6 MeSH terms, 1 funder, 58 references, 1 RRID.

Cite

This paper

Roston, R. A., Tustison, N. J., & Maga, A. M. (2026). Anatomy-aware, label-informed approach improves image registration for challenging datasets. PloS one, 21(9), e0357448. https://doi.org/10.1371/journal.pone.0357448

BibTeX

@article{roston2026anatomy,
author = {Roston, Rachel A. and Tustison, Nicholas J. and Maga, A. Murat},
title = {{Anatomy-aware, label-informed approach improves image registration for challenging datasets}},
journal = {PloS one},
year = {2026},
month = sep,
volume = {21},
number = {9},
pages = {e0357448},
publisher = {PLOS},
issn = {1932-6203},
doi = {10.1371/journal.pone.0357448},
url = {https://doi.org/10.1371/journal.pone.0357448},
pmid = {42709748},
pmcid = {PMC13552761}
}

RIS

TY - JOUR
AU - Roston, Rachel A.
AU - Tustison, Nicholas J.
AU - Maga, A. Murat
TI - Anatomy-aware, label-informed approach improves image registration for challenging datasets
T2 - PloS one
J2 - PLoS One
PY - 2026
DA - 2026/09/08
VL - 21
IS - 9
SP - e0357448
SN - 1932-6203
PB - PLOS
DO - 10.1371/journal.pone.0357448
UR - https://doi.org/10.1371/journal.pone.0357448
LA - en
ER -

CSL-JSON

{
"id": "10.1371/journal.pone.0357448",
"type": "article-journal",
"title": "Anatomy-aware, label-informed approach improves image registration for challenging datasets",
"container-title": "PloS one",
"author": [
{
"family": "Roston",
"given": "Rachel A."
},
{
"family": "Tustison",
"given": "Nicholas J."
},
{
"family": "Maga",
"given": "A. Murat"
}
],
"container-title-short": "PLoS One",
"volume": "21",
"issue": "9",
"page": "e0357448",
"DOI": "10.1371/journal.pone.0357448",
"PMID": "42709748",
"PMCID": "PMC13552761",
"ISSN": "1932-6203",
"publisher": "PLOS",
"URL": "https://doi.org/10.1371/journal.pone.0357448",
"language": "en",
"issued": {
"date-parts": [
[
2026,
9,
8
]
]
}
}

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.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, tidyverse, methods / tools, structural MRI / diffusion, 2 references
[2] 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, ggplot2, tidyverse, structural MRI / diffusion, 1 reference
[3] doi:10.1162/imag.a.1197 [code]
Blood volume-sensitive laminar fMRI with VASO in human hippocampus: Capabilities and biophysical challenges at clinical 7T scanners.
Journal: Imaging neuroscience (Cambridge, Mass.)
In common: ANTs, ggplot2, tidyverse, 2 references
[4] doi:10.1038/s41593-026-02287-z [code]
Autism subtypes identified using cross-species functional connectivity analyses.
Journal: Nature neuroscience
In common: ANTs, ggplot2, tidyverse, mouse, 1 reference
[5] doi:10.1038/s41598-026-55397-w [code]
Fast surface reconstruction of human brain MRI: benchmarking deep-learning based morphometry tools.
Journal: Scientific reports
In common: ANTs, methods / tools, structural MRI / diffusion, 2 references
[6] 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, methods / tools, structural MRI / diffusion, 2 references
[7] doi:10.1038/s41467-026-76812-w [code]
Assessing molecular, cellular and transcriptomic bases of laminar perfusion and cytoarchitecture coupling in the human cortex.
Journal: Nature communications
In common: ANTs, ggplot2, tidyverse, structural MRI / diffusion, 1 reference
[8] doi:10.1002/hbm.70547 [code]
miniMORPH: A Morphometry Pipeline for Low-Field MRI in Infants.
Journal: Human brain mapping
In common: ANTs, structural MRI / diffusion, 2 references
[9] doi:10.1162/imag.a.1366 [code]
MICAFlow: Fast and robust MRI preprocessing bridging research neuroimaging and clinical practice.
Journal: Imaging neuroscience (Cambridge, Mass.)
In common: ANTs, methods / tools, structural MRI / diffusion, 2 references
[10] doi:10.1016/j.ynirp.2026.100360 [code]
CIVET-Chimp: An automated pipeline for MRI-based cortical surface extraction in chimpanzees.
Journal: Neuroimage. Reports
In common: ANTs, methods / tools, structural MRI / diffusion, 2 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.