Generic selectors
Exact matches only
Search in title
Search in content
Post Type Selectors

Image segmentation in ImageJ

This is a Fiji / ImageJ workflow: update sites, threshold (Otsu / Triangle / Moments), freehand + ROI Manager, watershed, SAMJ, then Analyze Particles. It is not a generic “what is medical image segmentation” explainer — that is medical image segmentation. SAM-on-DICOM in Python is SAM for medical imaging, not this plugin.

ImageJ vs Fiji

Fiji is ImageJ with the plugins you actually need already wired. Start there.

Feature ImageJ Fiji
Core The original processor Same core
Plugins You install them by hand Bundled library + updater
First hour You build a toolkit Ready for bioimage work
Use A small, stable install Segmentation, 3D/4D, community plugins

Update sites

Download Fiji. Then Help > Update...Manage update sites. Enable at least:

  • CSBDeep — StarDist, CARE
  • BioVoxxel — cleanup before you threshold
  • IBMP-CNRS — extra bioimage tools

Close → Apply changes → restart.

SAMJ is its own site. Help > Update... → Manage update sites → Add update site. Name it SAMJ. URL:

https://sites.imagej.net/SAMJ/

Check the box, Apply changes, restart.

Threshold

Open the image. Image > Adjust > Threshold. One cutoff: brighter than the value is object, darker is background. The histogram and the red overlay are the preview.

Algorithms in the dropdown that I actually try:

  • Otsu — two clear peaks (background vs object). High-contrast fluorescence.
  • Triangle — a small, dim foreground peak against a large background. Faint signal.
  • Moments — same family as Otsu; sometimes calmer on noisy frames.

Cycle two or three. Then nudge the sliders if the overlay is wrong.

When the object is a shape no global cutoff can isolate, use the freehand tool, trace it, press T. That lands in the ROI Manager.

Watershed on a binary mask

Touching cells become one object if you measure them as-is. Threshold first so you have a binary mask. Then:

Process > Binary > Watershed

It treats each blob as a hill and draws a one-pixel ridge at the saddle. Count and area become per-cell instead of per-clump.

SAMJ (one AI plugin)

Plugins > Segmentation > SAMJ. Click the object (foreground). Click just outside it (background). The plugin draws the selection. Press T to store it. Repeat on a histology field. That is SAM as a Fiji click tool — not the Python DICOM fork on the SAM page.

Measure

Analyze > Set Measurements... first. Then Analyze > Analyze Particles....

Size 100-Infinity drops specks under 100 px. Circularity 0.0–1.0 (1 = disk) isolates round nuclei if that is the question.

Measurement What it is Use
Area Pixels inside the ROI Cell / nucleus / lesion size
Mean gray value Average intensity Fluorescence / stain amount
Perimeter Boundary length Membrane irregularity
Circularity 0 = line, 1 = circle Round vs elongated cells
Aspect ratio Major / minor axis Elongation, orientation
Roundness 4 × area / (π × major²) Vesicles, condensed nuclei

Results table → File > Save As... → CSV → R, Python, or GraphPad Prism. The Show dropdown in Analyze Particles draws overlays for a figure.

FAQ

3D? Fiji, not stock ImageJ. Threshold a stack for a 3D mask. Then 3D OC Suite (count / measure) or MorphoLibJ (3D morphology). RAM and time go up with the stack.

Segmentation vs classification. Segmentation draws the region (ROI). Classification names it after. “Where is the nucleus?” then “is it a mitotic figure?”

Auto-threshold is garbage. Usually uneven illumination or noise. Process > Subtract Background... (rolling ball) first. Then a light Process > Filters > Gaussian Blur... with radius 1–2. If it is still a mess, look at a local-threshold plugin instead of tracing everything by hand.

Need a production pipeline beyond Fiji — contact. Case studies.

Keep Reading

Related Articles

Explore the full Segmentation HubAll services, tools, and guides on this topic — in one place.

Visit Hub →

We build custom medical imaging platforms — advanced DICOM viewers, AI segmentation, and the clinical systems around them.

Get in Touch

Copyright © 2026 PYCAD. All Rights Reserved.