OSCR

Protocol for using the multi-cellular analysis toolbox in ImageJ for single-cell calcium imaging analysis.

Code ↔ Paper

1 match 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 1 match
  1. [1] § Step-by-step method details › Correct the recordings for motion artifacts ↔ src/main/java/Cell/Processing/MotionCorrection.java, lines 1–60 · score 0.54 · template ROI, motion correction, image stack

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

Java · 152 lines · 4.3 KB · MIT · 1 match

  1. package Cell.Processing;
  2. import ij.IJ;
  3. import ij.ImagePlus;
  4. import ij.ImageStack;
  5. import ij.gui.Roi;
  6. import ij.process.FloatProcessor;
  7. import ij.process.ImageProcessor;
  8. import java.awt.*;
  9. public class MotionCorrection {
  10. ImageProcessor reference, target;
  11. ImageStack stack;
  12. ImageStack registered;
  13. Rectangle rect;
  14. Roi template;
  15. int refSlice, sArea = 0;
  16. int width, height;
  17. double disX, disY;
  18. int itpMethod = 0;
  19. boolean subPixel = true;
  20. FloatProcessor result;
  21. public MotionCorrection(Roi template){
  22. this.template = template;
  23. }
  24. public void normXCorr(ImagePlus imp) {
  25. stack = imp.getStack();
  26. int slices = stack.getSize();
  27. width = imp.getWidth();
  28. height = imp.getHeight();
  29. refSlice = imp.getCurrentSlice();
  30. registered = new ImageStack(width, height);
  31. if (template != null && template.isArea()) {
  32. rect = template.getBounds();
  33. } else {
  34. IJ.showMessage("Error", "rectangular template ROI needed");
  35. }
  36. reference = imp.getProcessor().crop();
  37. IJ.showProgress(0, slices);
  38. new Thread(() -> {
  39. for (int i = 1; i <= stack.getSize(); i++) {
  40. alignSlices(i);
  41. IJ.showStatus("Applying motion correction");
  42. IJ.showProgress(i, stack.getSize());
  43. }
  44. ImagePlus ret = new ImagePlus(imp.getTitle() + "_REGISTERED", registered);
  45. ret.show();
  46. IJ.showProgress(1.0);
  47. }).start();
  48. }
  49. private void alignSlices(int slice) {
  50. int[] dxdy;
  51. target = stack.getProcessor(slice);
  52. target.resetRoi();
  53. result = TemplateMatching.doMatch(target.crop(), reference);
  54. //assert result != null;
  55. dxdy = findMax(result, 0);
  56. if (subPixel) {
  57. double[] dxdyG;
  58. dxdyG = gaussianPeakFit(result, dxdy[0], dxdy[1]);
  59. if(sArea==0){
  60. disX = rect.x - dxdyG[0];
  61. disY = rect.y - dxdyG[1];
  62. }else{
  63. disX = sArea - dxdyG[0];
  64. disY = sArea - dxdyG[1];
  65. }
  66. target.setInterpolationMethod(itpMethod);
  67. } else {
  68. if(sArea==0){
  69. disX = rect.x - dxdy[0];
  70. disY = rect.y - dxdy[1];
  71. }else{
  72. disX = sArea - dxdy[0];
  73. disY = sArea - dxdy[1];
  74. }
  75. }
  76. target.resetRoi();
  77. //target.translate(disX, disY);
  78. registered.addSlice(target.duplicate());
  79. registered.getProcessor(slice).translate(disX,disY);
  80. }
  81. public static int[] findMax(ImageProcessor ip, int sW) {
  82. int[] coord = new int[2];
  83. float max = ip.getPixel(0, 0);
  84. int sWh, sWw;
  85. if (sW == 0) {
  86. sWh = ip.getHeight();
  87. sWw = ip.getWidth();
  88. } else {
  89. sWh = sW;
  90. sWw = sW;
  91. }
  92. for (int j = (int) (ip.getHeight() - sWh) / 2; j < (ip.getHeight() + sWh) / 2; j++) {
  93. for (int i = (ip.getWidth() - sWw) / 2; i < (ip.getWidth() + sWw) / 2; i++) {
  94. if (ip.getPixel(i, j) > max) {
  95. max = ip.getPixel(i, j);
  96. coord[0] = i;
  97. coord[1] = j;
  98. }
  99. }
  100. }
  101. return (coord);
  102. }
  103. private double[] gaussianPeakFit(ImageProcessor ip, int x, int y) {
  104. double[] coord = new double[2];
  105. if (x == 0
  106. || x == ip.getWidth() - 1
  107. || y == 0
  108. || y == ip.getHeight() - 1) {
  109. coord[0] = x;
  110. coord[1] = y;
  111. } else {
  112. coord[0] = x
  113. + (Math.log(ip.getPixel(x - 1, y))
  114. - Math.log(ip.getPixel(x + 1, y)))
  115. / (2 * Math.log(ip.getPixel(x - 1, y))
  116. - 4 * Math.log(ip.getPixel(x, y))
  117. + 2 * Math.log(ip.getPixel(x + 1, y)));
  118. coord[1] = y
  119. + (Math.log(ip.getPixel(x, y - 1))
  120. - Math.log(ip.getPixel(x, y + 1)))
  121. / (2 * Math.log(ip.getPixel(x, y - 1))
  122. - 4 * Math.log(ip.getPixel(x, y))
  123. + 2 * Math.log(ip.getPixel(x, y + 1)));
  124. }
  125. return (coord);
  126. }
  127. }

MotionCorrection.java, under MIT · at the source

Overview

Authors: John Hageter1, Eric Horstick1,2
ORCID iDs: Eric Horstick
  1. West Virginia University, Morgantown, WV 26505, USA
  2. West Virginia University School of Medicine, Department of Neuroscience, Morgantown, WV 26505, USA
Institutions: West Virginia University (United States)
Journal: STAR protocols, volume 7, issue 2, article 104591
Dates: published online 20 May 2026; in print June 2026
Type: Research article · Language: English
License: CC BY-NC
Identifiers: DOI 10.1016/j.xpro.2026.104591 · PMID 42160175 · PMCID PMC13199768 · OpenAlex W7161809421
Open access: gold, a free copy (OpenAlex)
Status: code verified
Methods: fMRI & imaging, Single-unit activity, calcium imaging
Keywords: Cell Biology, Single Cell, Developmental biology, Microscopy, Model Organisms, Neuroscience, Computer sciences
MeSH: Calcium*, Image Processing, Computer-Assisted*, Single-Cell Analysis*, Software*, Animals, Neurons, Zebrafish (* major topic)
Topic: Single-cell and spatial transcriptomics (Molecular Biology, Biochemistry, Genetics and Molecular Biology), according to OpenAlex
Funding: National Science Foundation (OIA2242771); National Eye Institute (R15EY036226); National Institute of General Medical Sciences (P20GM144230)
Citations: not cited yet (Europe PMC); 15 references in the paper

Abstract

Functional imaging using genetically encoded indicators (GEIs) allows researchers to understand neuronal-, circuit-, and organism-level mechanisms that govern sensory processing and brain function. Here, we present a protocol to extract calcium signals and significant changes in neuronal activity from zebrafish calcium imaging data using the multi-cellular analysis (MCA) toolbox in ImageJ. We describe steps for installing MCA, using all functions within MCA, and plotting MCA outputs. This pipeline can be adapted for use in diverse model systems.

For complete details on the use and execution of this protocol for multiple model systems, please refer to Hageter et al.1

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

Repository

Its files are read in the Code ↔ Paper reader above, with 1 match between paragraphs and lines of code.

Zenodo 17610801

License: MIT
State: the link answers, verified on 28 September 2026
Evidence: files inventoried
Size: 1 file
Software Heritage: not checked
Found in: “Data and code availability”
Not found: README, license file, CITATION.cff, environment file, tests, continuous integration, documentation
Availability: 1 check, the latest on 28 September 2026: the link answers (HTTP 200)
  • 28 September 2026: the link answers (HTTP 200)
21 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;
  • 19 scripts, each with its path and the digest of its content;
  • 1 match 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

Datasets cited

Data and code availability

Data reported in this study are available in the supplemental data repository at https://doi.org/10.17632/9jv3dfdzbb.1. Source code and documentation for the MCA toolkit can be found at the GitHub repository (https://www.github.com/JohnHageter/Multi-Cell-Analysis) or the Zenodo repository (https://doi.org/10.5281/zenodo.17610801).

Reproduced under the paper's license (CC BY-NC), 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, language, journal, volume, issue, pages, dates, 2 authors, 7 keywords, 7 MeSH terms, 3 funders, 15 references.

Cite

This paper

Hageter, J., & Horstick, E. (2026). Protocol for using the multi-cellular analysis toolbox in ImageJ for single-cell calcium imaging analysis. STAR protocols, 7(2), 104591. https://doi.org/10.1016/j.xpro.2026.104591

BibTeX

@article{hageter2026protocol,
author = {Hageter, John and Horstick, Eric},
title = {{Protocol for using the multi-cellular analysis toolbox in ImageJ for single-cell calcium imaging analysis}},
journal = {STAR protocols},
year = {2026},
month = may,
volume = {7},
number = {2},
pages = {104591},
publisher = {Elsevier},
issn = {2666-1667},
doi = {10.1016/j.xpro.2026.104591},
url = {https://doi.org/10.1016/j.xpro.2026.104591},
pmid = {42160175},
pmcid = {PMC13199768}
}

RIS

TY - JOUR
AU - Hageter, John
AU - Horstick, Eric
TI - Protocol for using the multi-cellular analysis toolbox in ImageJ for single-cell calcium imaging analysis
T2 - STAR protocols
J2 - STAR Protoc
PY - 2026
DA - 2026/05/20
VL - 7
IS - 2
SP - 104591
SN - 2666-1667
PB - Elsevier
DO - 10.1016/j.xpro.2026.104591
UR - https://doi.org/10.1016/j.xpro.2026.104591
LA - en
ER -

CSL-JSON

{
"id": "10.1016/j.xpro.2026.104591",
"type": "article-journal",
"title": "Protocol for using the multi-cellular analysis toolbox in ImageJ for single-cell calcium imaging analysis",
"container-title": "STAR protocols",
"author": [
{
"family": "Hageter",
"given": "John"
},
{
"family": "Horstick",
"given": "Eric"
}
],
"container-title-short": "STAR Protoc",
"volume": "7",
"issue": "2",
"page": "104591",
"DOI": "10.1016/j.xpro.2026.104591",
"PMID": "42160175",
"PMCID": "PMC13199768",
"ISSN": "2666-1667",
"publisher": "Elsevier",
"URL": "https://doi.org/10.1016/j.xpro.2026.104591",
"language": "en",
"issued": {
"date-parts": [
[
2026,
5,
20
]
]
}
}

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.1038/s41467-026-73389-2 [code]
Physics-informed multi-encoder adaptive optics enables rapid aberration correction for intravital microscopy of deep complex tissue.
Journal: Nature communications
In common: optical imaging (calcium, voltage, 2-photon), zebrafish, histology / microscopy, 1 reference
[2] doi:10.1111/ejn.70582 [code]
Multifiber Array-Based Photometry System for Multiregional Functional Mapping in the Mouse Brain.
Journal: The European journal of neuroscience
In common: optical imaging (calcium, voltage, 2-photon), 2 references
[3] doi:10.1038/s41467-026-69633-4 [code]
Visuomotor decision-making through multifeature convergence in the larval zebrafish hindbrain.
Journal: Nature communications
In common: zebrafish, 2 references
[4] doi:10.1126/sciadv.adv3770 [code]
Evolution of a central dopamine circuit underlies adaptation of a light-evoked sensorimotor response in the blind cavefish.
Journal: Science advances
In common: 2 references
[5] doi:10.1038/s41467-026-69798-y [code]
Dual deconvolution in multiphoton structured illumination microscopy for deep-tissue super-resolution imaging.
Journal: Nature communications
In common: optical imaging (calcium, voltage, 2-photon), histology / microscopy, 1 reference
[6] doi:10.1038/s41592-026-03125-7
Simultaneous two- and three-photon multiplane imaging across cortical layers in freely moving mice.
Journal: Nature methods
In common: optical imaging (calcium, voltage, 2-photon), histology / microscopy, 1 reference
[7] doi:10.7554/elife.110277 [code]
Functional imaging of nine distinct neuronal populations under a miniscope in freely behaving animals.
Journal: eLife
In common: optical imaging (calcium, voltage, 2-photon), histology / microscopy, 1 reference
[8] doi:10.1016/j.isci.2026.116206 [code]
Gut distension evokes rapid neural dynamics in vagal and hindbrain populations of larval zebrafish.
Journal: iScience
In common: optical imaging (calcium, voltage, 2-photon), zebrafish, 1 reference
[9] doi:10.1038/s41467-026-72710-3 [code]
A modular multi-color fluorescence microscope for simultaneous tracking of cellular activity and behavior.
Journal: Nature communications
In common: optical imaging (calcium, voltage, 2-photon), histology / microscopy, 1 reference
[10] doi:10.1016/j.isci.2026.116190
Behavioral algorithms of ontogenetic switching in larval and juvenile zebrafish phototaxis.
Journal: iScience
In common: zebrafish, 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.

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.