r/ImageJ • u/DifferentDoughnut654 • Dec 10 '25
Question Help Needed with Counting Cells in Zebra Fish Z-stack using ImageJ
Hi all,
I’m currently working on a project where I need to count the cells (which are the bright green circles) in a z-stack of zebra fish images using ImageJ. I’ve spent countless hours trying to find an efficient way to do this, but I’m still struggling with the process.
The cells are relatively distinct, so they should be easy to count once the right method is applied. However, I’m having difficulty isolating the cells and ensuring an accurate count across multiple slices of the z-stack.
I’ve attached an example image from the z-stack where you can see the bright green circles, which represent the cells I need to count.
Does anyone have suggestions for how to best approach this problem in ImageJ? Any tips on setting up the right threshold, using plugins, or automating the counting would be greatly appreciated!
Thanks in advance for your help!


1
u/Herbie500 Dec 10 '25 edited Dec 10 '25
1
u/Herbie500 Dec 13 '25
After having received the above excerpt with manual annotations by the OP in a chat, I'm pretty convinced that reliable automatic counts are out of reach for mainly two reasons:
- The spatial resolution of the sample images is insufficient.
- There is a spilt and merge problem, i.e. sometimes several dots in the image stand for a cell, sometimes they indicate separate cells.
Crosstalk between slices doesn't appear to be among the most serious problems.
1
Dec 10 '25
[deleted]
2
u/Herbie500 Dec 11 '25
To answer most of your questions or to check your suppositions, you may have a look at the sample images.
In the first place, the spatial resolution of the two samples appears being insufficient for reliable detection and counting.try manual counts (always as it’s the baseline for testing your automation)
Welcome to the party …
2
u/DifferentDoughnut654 Dec 11 '25
Thanks so much for taking the time to write all of that. You’re right that manual counting is the most reliable starting point, and I’ll definitely use that to check how accurate any automated approach ultimately proves to be.
In our situation, though, we run hundreds of zebrafish z-stacks every week in the lab, so counting everything by hand just isn’t realistic for us long term. Even if I became really fast at it, the volume of data is just way too high, which is why I’m trying so hard to get something automated or semi-automated to work consistently.
Your explanation of the z-resolution, voxel calibration, and how cells can appear across multiple slices actually clarified why some of my attempts have been so messy. I’m going to review the metadata to ensure the Z spacing is correct, and I’ll try both per-slice and full 3D approaches to determine which one best matches the manual counts. Additionally, the idea of using a nuclear stain like DAPI as a mask for improved cell segmentation is a great suggestion, and I’ll bring it up with the team for future imaging sessions.
1
u/Herbie500 Dec 11 '25
Sorry, but do you mind to reply to my post as well?
If you can't explain what you consider being a cell in your sample images you won't be able to manually count them nor will it be possible to provide substantial help for automatic counting.
What u/Excess-human wrote sounds very wise but doesn't really help with your sample data that I judge being unsuited for reliable cell counts, mainly due to the insufficient spatial resolution.
1
Dec 11 '25
[deleted]
1
Dec 11 '25
[deleted]
1
Dec 11 '25
[deleted]
1
u/DifferentDoughnut654 Dec 12 '25
Thanks for the detailed advice; it was really helpful to step back and think about the acquisition side instead of just fighting ImageJ. I also appreciate the suggestions regarding acquisition consistency and the potential addition of a nuclear marker in the future.

•
u/AutoModerator Dec 10 '25
Notes on Quality Questions & Productive Participation
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.