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.

One block of code here has a permanent identifier (oscr:b:…), listed with the matches below: citable for good, with a page of its own. Select a match and press Cite to copy it. What a block identifier is.

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 to 60 · score 0.54 · template ROI, motion correction, image stack · block oscr:b:YBG03WSBEFYTY-0 · Report a mismatch

Paper

Loaded from Europe PMC by your browser; OSCR does not store it: 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 (how the code is found and 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.1016/j.crmeth.2025.101298 [code]
A multicellular analysis calcium imaging toolbox for ImageJ.
Journal: Cell reports methods
In common: zebrafish, optical imaging (calcium, voltage, 2-photon), 11 references, author Eric Horstick
[2] doi:10.1371/journal.pone.0335029 [code]
High throughput machine learning pipeline to characterize larval zebrafish motor behavior.
Journal: PloS one
In common: zebrafish, 5 references, author Eric Horstick
[3] doi:10.1016/j.celrep.2023.112287
Thalamic regulation of a visual critical period and motor behavior.
Journal: Cell reports
In common: zebrafish, 5 references, author Eric Horstick
[4] doi:10.1038/s41598-024-67262-9
Light wavelength modulates search behavior performance in zebrafish.
Journal: Scientific reports
In common: zebrafish, 4 references, author Eric Horstick
[5] doi:10.1016/j.crmeth.2025.101221
High-speed neural imaging with multiplexed miniaturized two-photon microscopy.
Journal: Cell reports methods
In common: optical imaging (calcium, voltage, 2-photon), histology / microscopy, 3 references
[6] doi:10.1038/s41467-025-66107-x [code]
Differential modulation of feedforward inhibition reflects topographic organization in the olfactory system.
Journal: Nature communications
In common: author Eric Horstick
[7] doi:10.1038/s41467-025-66922-2 [code]
High-throughput two-photon volumetric brain imaging in freely moving mice.
Journal: Nature communications
In common: optical imaging (calcium, voltage, 2-photon), histology / microscopy, 2 references
[8] doi:10.1126/sciadv.adg3918 [code]
Miniscope-LFOV: A large-field-of-view, single-cell-resolution, miniature microscope for wired and wire-free imaging of neural dynamics in freely behaving animals.
Journal: Science advances
In common: optical imaging (calcium, voltage, 2-photon), histology / microscopy, 2 references
[9] doi:10.1371/journal.pcbi.1013762 [code]
Linking brain and behavior states in Zebrafish Larvae locomotion using hidden Markov models.
Journal: PLoS computational biology
In common: zebrafish, 2 references
[10] doi:10.1371/journal.pbio.3003048 [code]
A sensitive soma-localized red fluorescent calcium indicator for in vivo imaging of neuronal populations at single-cell resolution.
Journal: PLoS biology
In common: zebrafish, optical imaging (calcium, voltage, 2-photon), 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.

Add the badge to the code's README

OSCR: the badge of this paper

If you are an author or a maintainer of this paper's code, you can add this badge. It says what OSCR knows of the paper (its code, its validated tracing map) and links the code to this page. Paste one of these snippets under the README's title. Keep the two marks around it, so that the badge can be replaced in place and is never added twice. OSCR changes nothing in your repository.

Markdown
<!-- oscr-badge:start -->
[![OSCR](https://openscicode.org/badge/doi/10.1016/j.xpro.2026.104591.svg)](https://openscicode.org/badge/doi/10.1016/j.xpro.2026.104591)
<!-- oscr-badge:end -->
reStructuredText
.. oscr-badge:start

.. image:: https://openscicode.org/badge/doi/10.1016/j.xpro.2026.104591.svg
   :target: https://openscicode.org/badge/doi/10.1016/j.xpro.2026.104591
   :alt: OSCR

.. oscr-badge:end
HTML
<!-- oscr-badge:start -->
<a href="https://openscicode.org/badge/doi/10.1016/j.xpro.2026.104591"><img src="https://openscicode.org/badge/doi/10.1016/j.xpro.2026.104591.svg" alt="OSCR"></a>
<!-- oscr-badge:end -->

If you choose to, you can have the badge kept up to date for you, with oscr badge --write from the command line or with the GitHub Action in your repository's workflows. Every other form and option (a card, AsciiDoc, LaTeX, shields.io) is on the badge 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: code errors and mismatches between the code and the paper about this paper and its code, from readers and its authors, beside the paper and its tracing map.

Report a mismatch between the code and the paper · Report a code error (signed in)

Reproductions: reports from readers who ran the authors' code and did not get the paper's result, what they ran, with which environment, commit and data.

Report a reproduction failure (signed in)

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