Protocol for using the multi-cellular analysis toolbox in ImageJ for single-cell calcium imaging analysis.
The 1 match
- [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
- package Cell.Processing;
- import ij.IJ;
- import ij.ImagePlus;
- import ij.ImageStack;
- import ij.gui.Roi;
- import ij.process.FloatProcessor;
- import ij.process.ImageProcessor;
- import java.awt.*;
- public class MotionCorrection {
- ImageProcessor reference, target;
- ImageStack stack;
- ImageStack registered;
- Rectangle rect;
- Roi template;
- int refSlice, sArea = 0;
- int width, height;
- double disX, disY;
- int itpMethod = 0;
- boolean subPixel = true;
- FloatProcessor result;
- public MotionCorrection(Roi template){
- this.template = template;
- }
- public void normXCorr(ImagePlus imp) {
- stack = imp.getStack();
- int slices = stack.getSize();
- width = imp.getWidth();
- height = imp.getHeight();
- refSlice = imp.getCurrentSlice();
- registered = new ImageStack(width, height);
- if (template != null && template.isArea()) {
- rect = template.getBounds();
- } else {
- IJ.showMessage("Error", "rectangular template ROI needed");
- }
- reference = imp.getProcessor().crop();
- IJ.showProgress(0, slices);
- new Thread(() -> {
- for (int i = 1; i <= stack.getSize(); i++) {
- alignSlices(i);
- IJ.showStatus("Applying motion correction");
- IJ.showProgress(i, stack.getSize());
- }
- ImagePlus ret = new ImagePlus(imp.getTitle() + "_REGISTERED", registered);
- ret.show();
- IJ.showProgress(1.0);
- }).start();
- }
- private void alignSlices(int slice) {
- int[] dxdy;
- target = stack.getProcessor(slice);
- target.resetRoi();
- result = TemplateMatching.doMatch(target.crop(), reference);
- //assert result != null;
- dxdy = findMax(result, 0);
- if (subPixel) {
- double[] dxdyG;
- dxdyG = gaussianPeakFit(result, dxdy[0], dxdy[1]);
- if(sArea==0){
- disX = rect.x - dxdyG[0];
- disY = rect.y - dxdyG[1];
- }else{
- disX = sArea - dxdyG[0];
- disY = sArea - dxdyG[1];
- }
- target.setInterpolationMethod(itpMethod);
- } else {
- if(sArea==0){
- disX = rect.x - dxdy[0];
- disY = rect.y - dxdy[1];
- }else{
- disX = sArea - dxdy[0];
- disY = sArea - dxdy[1];
- }
- }
- target.resetRoi();
- //target.translate(disX, disY);
- registered.addSlice(target.duplicate());
- registered.getProcessor(slice).translate(disX,disY);
- }
- public static int[] findMax(ImageProcessor ip, int sW) {
- int[] coord = new int[2];
- float max = ip.getPixel(0, 0);
- int sWh, sWw;
- if (sW == 0) {
- sWh = ip.getHeight();
- sWw = ip.getWidth();
- } else {
- sWh = sW;
- sWw = sW;
- }
- for (int j = (int) (ip.getHeight() - sWh) / 2; j < (ip.getHeight() + sWh) / 2; j++) {
- for (int i = (ip.getWidth() - sWw) / 2; i < (ip.getWidth() + sWw) / 2; i++) {
- if (ip.getPixel(i, j) > max) {
- max = ip.getPixel(i, j);
- coord[0] = i;
- coord[1] = j;
- }
- }
- }
- return (coord);
- }
- private double[] gaussianPeakFit(ImageProcessor ip, int x, int y) {
- double[] coord = new double[2];
- if (x == 0
- || x == ip.getWidth() - 1
- || y == 0
- || y == ip.getHeight() - 1) {
- coord[0] = x;
- coord[1] = y;
- } else {
- coord[0] = x
- + (Math.log(ip.getPixel(x - 1, y))
- - Math.log(ip.getPixel(x + 1, y)))
- / (2 * Math.log(ip.getPixel(x - 1, y))
- - 4 * Math.log(ip.getPixel(x, y))
- + 2 * Math.log(ip.getPixel(x + 1, y)));
- coord[1] = y
- + (Math.log(ip.getPixel(x, y - 1))
- - Math.log(ip.getPixel(x, y + 1)))
- / (2 * Math.log(ip.getPixel(x, y - 1))
- - 4 * Math.log(ip.getPixel(x, y))
- + 2 * Math.log(ip.getPixel(x, y + 1)));
- }
- return (coord);
- }
- }
MotionCorrection.java, under MIT · at the source
Overview
- West Virginia University, Morgantown, WV 26505, USA
- West Virginia University School of Medicine, Department of Neuroscience, Morgantown, WV 26505, USA
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
Availability: 1 check, the latest on 28 September 2026: the link answers (HTTP 200)
- 28 September 2026: the link answers (HTTP 200)
21 files
- src/
main/ , Java, 504 linesjava/ Cell/ Analysis/ Exporter.java - src/
main/ , Java, 57 linesjava/ Cell/ Analysis/ SignalDetector.java - src/
main/ , Java, 46 linesjava/ Cell/ Analysis/ SignalFilter.java - src/
main/ , Java, 248 linesjava/ Cell/ Annotation/ GroupROIs.java - src/
main/ , Java, 110 linesjava/ Cell/ Annotation/ SelectMultiple.java - src/
main/ , Java, 113 linesjava/ Cell/ Annotation/ SelectionGrouping.java - src/
main/ , Java, 1,108 linesjava/ Cell/ Frame/ CellManager.java - src/
main/ , Java, 18 linesjava/ Cell/ Main.java - src/
main/ , Java, 137 linesjava/ Cell/ Processing/ CalciumProcessor.java - src/
main/ , Java, 23 linesjava/ Cell/ Processing/ CellDetection.java - src/
main/ , Java, 417 linesjava/ Cell/ Processing/ Cellpose.java - src/
main/ , Java, 152 lines, 1 matchjava/ Cell/ Processing/ MotionCorrection.java - src/
main/ , Java, 51 linesjava/ Cell/ Processing/ TemplateMatching.java - src/
main/ , Java, 50 linesjava/ Cell/ UI/ Popup.java - src/
main/ , Java, 62 linesjava/ Cell/ UI/ WaitingUI.java - src/
main/ , Java, 63 linesjava/ Cell/ Utils/ CellData.java - src/
main/ , Java, 38 linesjava/ Cell/ Utils/ GroupData.java - src/
main/ , Java, 79 linesjava/ Cell/ Utils/ ImageCV.java - src/
main/ , Java, 20 linesjava/ Cell/ Utils/ Utils.java - LICENSE, License, 21 lines
- README.md, Text, 84 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;
- 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
- doi:10.17632/
9jv3dfdzbb.1 , at the source; found in “Data and code availability”
Data and code availability
Data reported in this study are available in the supplemental data repository at https://
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://
BibTeX
@article{hageter2026prot
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/
url = {https://
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/
VL - 7
IS - 2
SP - 104591
SN - 2666-1667
PB - Elsevier
DO - 10.1016/
UR - https://
LA - en
ER -
CSL-JSON
{
"id": "10.1016/
"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":
"volume": "7",
"issue": "2",
"page": "104591",
"DOI": "10.1016/
"PMID": "42160175",
"PMCID": "PMC13199768",
"ISSN": "2666-1667",
"publisher": "Elsevier",
"URL": "https://
"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 communicationsIn 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 neuroscienceIn 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 communicationsIn 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 advancesIn 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 communicationsIn 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 methodsIn 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: eLifeIn 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: iScienceIn 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 communicationsIn 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: iScienceIn 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.
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, 19 scripts, and 1 match 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:74a5aac1b598de3f…
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
[.
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.
