Vision Systems & Engineering
ImageJ and Fiji
The public-domain Java program for scientific images, its ImageJ2 redesign and the Fiji distribution, with their architecture, update sites, licences and algorithm conventions, and a re-implementation of Subtract Background's rolling ball checked on a synthetic image.
beginner
ImageJ is a public-domain program for processing and analyzing scientific images, written in Java (ImageJ README). The ImageJ wiki describes it as under continuous development since 1997, when it was first written as a cross-platform version of NIH Image, and as a project of Wayne Rasband, then and now, with the help of many contributors. The name now covers a family: the original program, which the wiki calls ImageJ 1.x (also “ImageJ1” or “IJ1”); ImageJ2, a redesign started in 2010; and Fiji, a distribution that bundles both with a large set of plugins. Bioimage Analysis places ImageJ among the other open tools of microscopy; this article goes into the software itself: how the three fit together, how plugins and updates reach users, what the licences say, and a handful of ImageJ’s algorithm conventions read from its source, one of which, Subtract Background’s rolling ball, the example re-implements.
Purpose
ImageJ serves people who need measurements from images without writing a program, and those who write the programs for them. In the words of the ImageJ2 paper’s abstract, ImageJ’s ease of use, “recordable macro language” and plugin architecture drew contributions from non-programmers, amateur programmers and professional developers alike (Rueden et al., 2017, read in the authors’ manuscript source at commit 57b1dcf; the published version was not read). The same abstract gives the reason for ImageJ2: a growing user base, diverging plugin suites and technical limits called for a rewrite, with a data model for arbitrarily large N-dimensional data and backwards compatibility with the classic interface. Fiji, in the wiki’s words a “batteries-included” distribution of ImageJ2, packages the result for users, with an automatic updater and many plugins.
Core Capabilities
ImageJ 1.x
ImageJ 1.x is written in Java (README). Commands are recorded as macro code: the 1.54r release notes, for example, say that File > New > Text Window now records as a showText call. ImageJ’s own commands include plugin classes: Subtract Background and Gaussian Blur are classes in ij/plugin/filter/ that implement the ExtendedPlugInFilter interface. The wiki’s ImageJ page counts the community’s plugins in “many hundreds, probably thousands”.
Several conventions change the numbers a user gets, and are stated here from the 1.54r source:
- Gaussian Blur’s “Radius” is σ. The header of
GaussianBlur.javadefines the radius as the distance of decay to , the standard deviation, and notes that versions before 1.38u needed a value 2.5 times as large. Out-of-image pixels take the value of the nearest edge pixel, which gives edge and corner pixels extra weight at large σ. For speed, rows and columns are downscaled before convolution except for small radii. The kernel’s accuracy is 0.002 for 8-bit and RGB images and 0.0002 otherwise, and σ is in pixels unless it is given in scaled units (thesigmaScaledoption), in which case it is divided by the calibrated pixel width and height. Gaussian Filter covers the filter itself. - 16-bit to 8-bit conversion uses the display range. With scaling on,
TypeConverter.javasubtracts the current display minimum, multiplies by , rounds by adding 0.5 and clips to 255; with scaling off, values above 255 are clipped. The result therefore depends on the last brightness and contrast setting, not only on the data. - Thresholds on 16-bit data use 256 bins. The wiki’s Auto Threshold page notes that ImageJ’s thresholder (Image > Adjust > Threshold) computes a 256-bin histogram for 16-bit images, so its results can differ from the Auto Threshold plugin, which processes the full 16-bit range. Its “Default” method is described there as a variation of IsoData, the iterative intermeans method that Thresholding derives; the applet’s Default ignores the histogram’s extreme bins while its other methods do not.
- Calibration lives in the image. The wiki’s Spatial Calibration page describes Analyze > Set Scale: draw a line of known length on an image of a stage micrometer, enter the distance and unit, and optionally check “Global” to apply the scale to all open images; Image > Properties shows and edits voxel sizes, the time interval and the numbers of slices, channels and frames. Measurements are then reported in those units.
- Subtract Background works in pixels and grey levels. The rolling ball’s radius is entered in pixels (
BackgroundSubtracter.java, dialog line 96), while the ball’s height is compared with grey values, a point the example below tests.
ImageJ2
ImageJ2 is both an application and a set of libraries. The manuscript source divides its components into four domains:
- SciJava: general-purpose libraries for extensible applications. Its core is the
Context, an application container holding the available extensions, open data and settings, made of services that are initialized dynamically at run time. The wiki’s Architecture page adds that plugins are indexed at compile time by an annotation processor, which writes their metadata into the JAR so that they can be found without loading their classes. - ImgLib2: the N-dimensional image data model, which separates pixel types, coordinate access and storage (array, planar and cell images), so one algorithm serves many types and layouts.
- SCIFIO:
FormatandTranslatorplugins that read, write and translate image formats and metadata models into ImageJ’sDataset, reading large images in chunks. The wiki’s ImageJ2 page says SCIFIO is used by default for most image input and can be switched off under Edit > Options > ImageJ2. - ImageJ: the image metadata, algorithms and user-facing commands on top. Here sit ImageJ Ops, a library of image operations matched by name and argument types (the manuscript reports 788
Opplugins across nearly 350 types of ops as of Ops 0.33.0), and ImageJ Legacy, the compatibility layer.
ImageJ Legacy is how ImageJ2 keeps the 1.x interface working. As the manuscript describes it, a component called the IJ1-patcher uses Javassist to rewrite ImageJ 1.x bytecode at run time, inserting hooks at points such as File > Open, through which ImageJ2 can take over the request, for example by opening files through SCIFIO; the legacy user interface then keeps each 1.x ImagePlus and its ImageJ2 Dataset in step through wrapping adapters. Existing macros and plugins therefore keep running inside ImageJ2.
ImageJ2 also brings parameterized commands and scripts with typed inputs and outputs that do not depend on the AWT interface, a Script Editor for several scripting languages, and an integrated search bar (ImageJ2 wiki page). Such commands can be reused headless and from other applications; the page lists KNIME, CellProfiler and OMERO.
Fiji, the Updater and update sites
The Updater manages installed components through update sites, web spaces holding versioned collections of files. Per the manuscript, each site keeps a db.xml.gz file with checksums and timestamps of every version, so that the Updater can tell up-to-date, outdated, locally modified and untracked files apart; sites are served over HTTP, and the Updater descends from Fiji’s own updater. The wiki’s Update Sites page says that plain ImageJ2 enables only the ImageJ site, that Fiji ships with the ImageJ and Fiji sites enabled, and that enabling the Fiji site turns an ImageJ2 installation into Fiji. Anyone can host an update site, on their own server or on the hosted service, whose Terms of Service page binds the site’s owner (for instance, that its content is free of charge and limited to ImageJ extensions).
Fiji’s wiki page lists the laboratories that support it as of November 2026: the Eliceiri/LOCI lab at UW–Madison, the Jug lab at Human Technopole, the Saalfeld lab at Janelia Research Campus and the Tomancak lab at MPI-CBG and the CSBD, with individuals elsewhere. The Fiji paper (Schindelin et al., 2012) is the publication the wiki gives for it.
Licences
The licences differ by layer, and the wiki’s Licensing page sets them out:
- ImageJ 1.x carries the NIH disclaimer: developed by a federal employee in the course of official duties, it is not subject to copyright under 17 U.S.C. §105 and is in the public domain (
LICENSE.txt). The wiki adds that this waiver applies under U.S. law only, and that ImageJ includes substantial code from people who are not U.S. government employees, “making the legal status of ImageJ as a whole unclear”. Subtract Background is an example: its header credits the NIH Image Pascal code of Michael Castle and Janice Keller and the sliding paraboloid of Michael Schmid, and the file carries no licence header. - The ImageJ2 stack (SciJava, ImgLib2, ImageJ2, SCIFIO) is under the BSD 2-Clause licence.
- Fiji is released under the GNU GPL (
LICENSE.txt, GPL-3.0), on top of the BSD-licensed ImageJ2 core, and includes the public-domain ImageJ 1.x; its plugins have their own licences (Fiji wiki page). The Licensing table also lists Bio-Formats and OMERO under the GPL, with the core of Bio-Formats under BSD-2.
Minimal Example
ImageJ is not installed on the machine this article was written on, so it does not run here. The example is a re-implementation of the rolling-ball background of Process > Subtract Background, written in NumPy from the behaviour that BackgroundSubtracter.java describes at ImageJ 1.54r (tag v1.54r, commit 62db90a). It is not a port: the file has no licence header and non-NIH authors, so its code is not copied, and our code is organized differently. The outcomes test our re-implementation, and scikit-image’s and SciPy’s functions, not ImageJ.
What the source describes
The header describes the background as the hull of the volume reachable by a ball of given radius rolled over the underside of the intensity surface, a concept it credits to Sternberg (1983), and offers a sliding paraboloid as an alternative: a paraboloid of rotation with the ball’s curvature at its apex, approximated by parabolae in four directions, which can fit “any image values” (Schmid, 2007, named in the header; not re-implemented here). With both algorithms the image used for the background is first smoothed by a 3 × 3 mean, which “can result in negative values” after subtraction; the paraboloid also takes a 3 × 3 maximum against noise and corrects corner particles.
For the ball, the code builds a square patch of a sphere and treats it as follows (the line numbers are those of the 1.54r file):
- Shrinking. For radius , , and above, the image is shrunk by a factor of 1, 2, 4 or 8, taking the minimum of each block, and the patch is trimmed by 24, 24, 32 or 40 % (lines 779–795). The ball’s radius is divided by “in x,y and z” (lines 806–810), with a floor of 1.
- The patch. With and trim , the half-width is in Java’s integer arithmetic, and the heights are , set to 0 where negative (lines 814–824).
- Rolling. For every ball position, including positions up to pixels beyond each border, the code finds the lowest height at which the patch touches the image from below, using only pixels inside the image, and raises every pixel under the patch to the patch surface at that height (lines 604–646). In the terms of Mathematical Morphology, that is the grey opening by the non-flat structuring function given by the patch, .
- Enlarging. A shrunk background is enlarged by bilinear interpolation, extrapolating at the edges, with the index of the left sample computed by Java’s truncating integer division (lines 655–709).
- Output. For 32-bit images the result is the original minus the background; for 8- and 16-bit images 0.5 is added for rounding and the result is clipped to the type’s range (lines 218–244).
Two defaults depend on how the command is run. The dialog starts from the stored preference bs.background, read with a default of true (line 50, shown at line 97), so “Light background” is checked when no preference has been saved; run from a macro, the command resets the light background to false, the radius to 50 and presmoothing to on before reading the macro’s options, in which “white” is read as “light” (lines 86–94). The ImageJ wiki’s Rolling Ball Background Subtraction page describes a separate plugin, which it says implements the built-in command’s algorithm differently, and says that the background is found by averaging over a large ball; that is not what the built-in command’s source does, and the example follows the source.
Set-up
Data. A 256 × 256 float64 image with the column and the row index: a ramp with grey levels per pixel, a broad hump , and 16 Gaussian spots of amplitude and pixels centred on the grid . The noisy versions add Gaussian noise of standard deviation 2 with seeds 0, 1 and 2. The pure ramp alone is used for the exact checks. The image is float throughout, so ImageJ’s rounding and clipping of 8- and 16-bit results do not apply, and it is a dark-background image (no inversion).
Methods. Radii , for which ImageJ’s shrink factors are 1, 1, 1, 2 and 4:
- (a) the opening by ImageJ’s trimmed patch without shrinking. For ImageJ always shrinks, so (a) there is our own construction: the trim percentage of ’s class applied at full resolution, which makes (a) and (b) differ only by the shrinking.
- (b) ImageJ’s shrink path: block minimum, opening by the patch of radius , bilinear enlargement.
- (c) scikit-image 0.25.2’s
skimage.restoration.rolling_ball. Its source computes, at every pixel, over an untrimmed ball kernel, with the image padded by : an erosion lifted by the ball’s height, with no dilation and no shrinking. - (d) a flat top-hat background, SciPy 1.16.3’s
ndimage.grey_openingwith a disk of radius , in its defaultreflectborder mode. - (e) for one measure only, an opening like (a) with the heights of an ellipsoid of semi-axes , using (a)’s half-width.
ImageJ’s 3 × 3 presmoothing (“+ps”, edge pixels replicated) is printed on and off for (a) and (b), the methods it belongs to. ImageJ computes the background in 32-bit floats; the float64 arithmetic is ours.
Measures, checks and hypotheses. The hypotheses, bars and checks were written before any code ran, except the repaired C-index and the added C-clamp (see “Pilot and repair” below). One planning script then ran once before the pilot, from a copy of the example’s functions: it printed the ramp errors of (a), (b) and (d) at and 10, the gaps and below for all five radii, the deviation of (c) from at , 5 and 10, the recovered fractions under the true background (all exactly 1), and timings for the runtime estimate. No bar was changed after it.
- M1, the ramp. For any structuring function, the erosion of a linear is with , and the dilation adds back, so an opening reproduces a ramp exactly where the border does not reach (our derivation). H1: (a) and (d) reproduce the ramp to within in the interior, the pixels at least from every border. H1b, derived the same way: because ImageJ’s ball positions run beyond the border, (a) is exact over the whole image, and (b) equals over the whole image, since each block minimum takes the block’s left pixel.
- H2, scikit-image on the ramp. From the formula above, (c) lies below the ramp by over the kernel. H2a: (c) equals in the interior to . H2b: at and 5, where no offset of the discrete kernel beats its apex for , and at . H2c: is within 0.001 of the continuous sphere’s value at .
- M2 and H3, spot recovery. For each spot, at its centre, with the noise-free image, so that the noise at the centre pixel does not enter; the mean, minimum and maximum over the 16 spots are printed. H3: for each method and input, (i) rises with (each mean at least the previous one minus 0.001) and (ii) approaches 1 (). We expected (ii) to fail for (d) on the clean image, reasoning that a flat disk of radius 50 cannot follow the hump.
- M3 and H4, scaling. The largest difference over the image between the background of divided by 16 and the background of , and the number of pixels that differ. Multiplying and dividing by 16 is exact in binary floating point and commutes with minima and maxima, so H4 expects (d) to have no differing pixel, and (a)–(c), whose ball height is in grey levels, to differ by more than 0.1 at every .
- M4 and H5, the shrink path. At and 50, the RMS and maximum difference of (b) from (a) and from (e) over the interior. H5: (b) is closer, in RMS, to the ellipsoid (e) than to the sphere (a).
- Checks. A data check; the patch table against the half-widths derived by hand from the rules above (3, 4, 8, 16, 34 at full resolution; 8 and 9 for the shrunk patches at and 50); the interpolation index against the table in the source’s comment (C-index) and the clamp of that index at the last pair of small-image pixels (C-clamp, line 704); the vectorized opening against a direct loop over ball positions (C-hand); and two properties every opening has, being anti-extensive (C-anti, the background never above the image, with a bar of 0) and idempotent (C-idem, bar ).
Pilot and repair. A pilot ran the script with noise seeds 100, 101 and 102. In it the C-index check failed: its set-up passed a small-image length of 3, at which the clamp in line 704 applies to the last two indices, while the source’s table shows the start of a longer image. With the editor’s approval, the check was repaired before the first run: C-index now uses a small-image length of 64 against the source table’s values, and the added C-clamp check expects 1 at the last two positions for a length of 3, from line 704’s rule; both expectations were written down before the first run. Between the pilot and the first run, which used seeds 0, 1 and 2, no other outcome differs: every check and hypothesis that held or failed in the pilot did the same in the first run. The script uses NumPy 2.3.5, SciPy 1.16.3 and scikit-image 0.25.2, takes about 24 seconds, and printed identical output on two runs; the code shown is the first run’s.
import os, sys
for v in ("OMP_NUM_THREADS", "OPENBLAS_NUM_THREADS", "MKL_NUM_THREADS"):
os.environ[v] = "1"
import numpy as np
from scipy import ndimage as ndi
from skimage.restoration import rolling_ball as sk_rolling_ball
# Re-implementation (not a port) of the rolling-ball background of ImageJ 1.54r's
# Process > Subtract Background, written from the behaviour that the header,
# comments and arithmetic rules of ij/plugin/filter/BackgroundSubtracter.java
# describe; the code is our own.
SEEDS = [int(a) for a in sys.argv[1:]] or [0, 1, 2]
N, G, H_AMP, S_HUMP, A, SIG = 256, 0.1, 30.0, 60.0, 50.0, 2.0
RADII = [3, 5, 10, 20, 50]
TOL = 1e-9
def java_round(x): # Math.round: half up
return int(np.floor(x + 0.5))
def ball_class(R): # shrink factor and trim percentage
if R <= 10: return 1, 24
if R <= 30: return 2, 24
if R <= 100: return 4, 32
return 8, 40
def half_width(r, p): # trimmed patch half-width
xtrim = int(p * r) // 100 # Java: (int)(p*r)/100
return java_round(r - xtrim), xtrim
def sphere_patch(r, h): # heights sqrt(r^2-x^2-y^2), 0 where negative
y, x = np.mgrid[-h:h + 1, -h:h + 1]
return np.sqrt(np.maximum(r * r - x * x - y * y, 0.0))
def ellipsoid_patch(R, c, h): # semi-axes R, R and c (height)
y, x = np.mgrid[-h:h + 1, -h:h + 1]
return c * np.sqrt(np.maximum(1.0 - (x * x + y * y) / R ** 2, 0.0))
def open_patch(f, b):
# Ball positions run h pixels beyond every border; the erosion sees only
# in-image pixels (+inf outside) and the dilation writes in-image pixels.
h = b.shape[0] // 2
n0, n1 = f.shape
fp = np.pad(f, 2 * h, constant_values=np.inf)
e = np.full((n0 + 2 * h, n1 + 2 * h), np.inf)
for dy in range(2 * h + 1):
for dx in range(2 * h + 1):
np.minimum(e, fp[dy:dy + n0 + 2 * h, dx:dx + n1 + 2 * h] - b[dy, dx], out=e)
out = np.full((n0, n1), -np.inf)
for dy in range(2 * h + 1):
for dx in range(2 * h + 1):
np.maximum(out, e[2 * h - dy:2 * h - dy + n0, 2 * h - dx:2 * h - dx + n1] + b[dy, dx], out=out)
return out
def open_brute(f, b): # direct loop over ball positions (check only)
h = b.shape[0] // 2
n0, n1 = f.shape
out = np.full(f.shape, -np.inf)
for py in range(-h, n0 + h):
for px in range(-h, n1 + h):
z = np.inf
for ky in range(-h, h + 1):
for kx in range(-h, h + 1):
yy, xx = py + ky, px + kx
if 0 <= yy < n0 and 0 <= xx < n1:
z = min(z, f[yy, xx] - b[ky + h, kx + h])
for ky in range(-h, h + 1):
for kx in range(-h, h + 1):
yy, xx = py + ky, px + kx
if 0 <= yy < n0 and 0 <= xx < n1:
out[yy, xx] = max(out[yy, xx], z + b[ky + h, kx + h])
return out
def shrink(f, s): # minimum over s x s blocks
n0, n1 = f.shape
m0, m1 = -(-n0 // s), -(-n1 // s)
fp = np.pad(f, ((0, m0 * s - n0), (0, m1 * s - n1)), constant_values=np.inf)
return fp.reshape(m0, s, m1, s).min(axis=(1, 3))
def interp_arrays(length, small_length, s):
i = np.arange(length)
idx = np.fix((i - s // 2) / s).astype(int) # Java integer division truncates
idx = np.minimum(idx, small_length - 2)
w = 1.0 - ((i + 0.5) / s - (idx + 0.5))
return idx, w
def enlarge(small, shape, s): # bilinear, extrapolating at the edges
iy, wy = interp_arrays(shape[0], small.shape[0], s)
ix, wx = interp_arrays(shape[1], small.shape[1], s)
rows = small[:, ix] * wx + small[:, ix + 1] * (1.0 - wx)
return rows[iy] * wy[:, None] + rows[iy + 1] * (1.0 - wy[:, None])
def presmooth(f): # 3x3 mean, edge pixels replicated
return ndi.uniform_filter1d(ndi.uniform_filter1d(f, 3, axis=1, mode="nearest"), 3, axis=0, mode="nearest")
def method_a(f, R, smooth=False):
s, p = ball_class(R)
h, _ = half_width(R, p)
return open_patch(presmooth(f) if smooth else f, sphere_patch(R, h))
def method_b(f, R, smooth=False):
s, p = ball_class(R)
g = presmooth(f) if smooth else f
rs = max(R / s, 1.0)
h, _ = half_width(rs, p)
if s == 1:
return open_patch(g, sphere_patch(rs, h))
return enlarge(open_patch(shrink(g, s), sphere_patch(rs, h)), f.shape, s)
def method_c(f, R):
return sk_rolling_ball(f, radius=R, num_threads=1)
def method_d(f, R):
y, x = np.mgrid[-R:R + 1, -R:R + 1]
return ndi.grey_opening(f, footprint=(x * x + y * y <= R * R))
def method_e(f, R):
s, p = ball_class(R)
h, _ = half_width(R, p)
return open_patch(f, ellipsoid_patch(R, R / s, h))
def verdict(ok):
return "held" if ok else "failed"
# ---- data ------------------------------------------------------------------------
yy, xx = np.mgrid[0:N, 0:N].astype(float)
ramp = 20.0 + G * xx
hump = H_AMP * np.exp(-((xx - 128) ** 2 + (yy - 128) ** 2) / (2 * S_HUMP ** 2))
centres = [(cy, cx) for cy in (32, 96, 160, 224) for cx in (32, 96, 160, 224)]
fg = np.zeros((N, N))
for cy, cx in centres:
fg += A * np.exp(-((xx - cx) ** 2 + (yy - cy) ** 2) / (2 * SIG ** 2))
clean = ramp + hump + fg
noisy = {sd: clean + np.random.default_rng(sd).normal(0.0, 2.0, (N, N)) for sd in SEEDS}
def interior(R):
m = 2 * R + 2
return (slice(m, N - m), slice(m, N - m))
d1 = np.max(np.abs(np.diff(ramp, axis=1) - G))
d2 = max(abs(fg[cy, cx] - A) for cy, cx in centres)
d3 = abs(hump.max() - H_AMP) + (0.0 if np.unravel_index(hump.argmax(), hump.shape) == (128, 128) else np.inf)
print(f"D-data ramp step dev {d1:.1e}, spot peak dev {d2:.1e}, hump max dev {d3:.1e} -> "
f"{verdict(d1 <= 1e-12 and d2 <= 1e-9 and d3 <= 1e-12)}")
for sd in SEEDS:
nz = noisy[sd] - clean
print(f"D-data noise seed {sd}: mean {nz.mean():+.4f}, std {nz.std():.4f} -> "
f"{verdict(abs(nz.mean()) <= 0.05 and 1.9 <= nz.std() <= 2.1)}")
# ---- checks of the re-implementation ------------------------------------------------
expected = {3: (3, 0, None), 5: (4, 1, None), 10: (8, 2, None), 20: (16, 4, (10.0, 2, 8)), 50: (34, 16, (12.5, 4, 9))}
ok_patch = True
print("C-patch R s trim% full h (xtrim) shrunk r_s, xtrim, h")
for R in RADII:
s, p = ball_class(R)
h, xt = half_width(R, p)
rs = max(R / s, 1.0); hs, xts = half_width(rs, p)
got_shr = None if s == 1 else (rs, xts, hs)
ok_patch &= (h, xt, got_shr) == expected[R]
print(f" {R:2d} {s} {p:4d} {h:3d} ({xt:2d}) {rs:5.1f}, {xts:d}, {hs:d}")
print(f"C-patch against the hand-derived table -> {verdict(ok_patch)}")
idx, _ = interp_arrays(12, 64, 4)
print(f"C-index s=4, i=0..11: {' '.join(map(str, idx))} -> {verdict(list(idx) == [0,0,0,0,0,0,1,1,1,1,2,2])}")
idx, _ = interp_arrays(12, 3, 4) # small image of 3 pixels: clamp to smallLength - 2
print(f"C-clamp s=4, small length 3: {' '.join(map(str, idx))} -> {verdict(list(idx[10:]) == [1, 1])}")
small = np.random.default_rng(7).uniform(0, 10, (20, 20))
bh = sphere_patch(3, 3)
dh = np.max(np.abs(open_patch(small, bh) - open_brute(small, bh)))
print(f"C-hand vectorized vs loop, 20x20, R=3: max diff {dh:.1e} -> {verdict(dh == 0)}")
o10 = method_a(clean, 10)
ca = np.max(o10 - clean)
ci = np.max(np.abs(method_a(o10, 10) - o10))
print(f"C-anti (a) R=10: max(bg - I) {ca:.2e} -> {verdict(ca <= 0)}")
print(f"C-idem (a) R=10: max|open(open) - open| {ci:.2e} -> {verdict(ci <= TOL)}")
# ---- M1 and H1, H1b, H2: the pure ramp -----------------------------------------------
print("\nM1 pure ramp, max |error| (interior = >= 2R+2 px from every border)")
print(" R (a) int (a) whole (b) whole vs r-g(s-1)/2 (c) int vs r-G_d (d) int (d) whole")
h1 = h1b = h2a = True
gd_all = {}
for R in RADII:
s, _ = ball_class(R)
I = interior(R)
ea = np.abs(method_a(ramp, R) - ramp)
eb = np.abs(method_b(ramp, R) - (ramp - G * (s - 1) / 2))
k = np.mgrid[-R:R + 1, -R:R + 1]
ss = k[0] ** 2 + k[1] ** 2
bk = np.sqrt(np.clip(R * R - ss, 0, None))
fin = np.sqrt(ss) <= R
gd = np.max((bk - G * k[1])[fin]) - R
gd_all[R] = gd
ec = np.abs(method_c(ramp, R) - (ramp - gd))
ed = np.abs(method_d(ramp, R) - ramp)
h1 &= ea[I].max() <= TOL and ed[I].max() <= TOL
h1b &= ea.max() <= TOL and eb.max() <= TOL
h2a &= ec[I].max() <= TOL
print(f" {R:2d} {ea[I].max():.2e} {ea.max():.2e} {eb.max():.2e} {ec[I].max():.2e} {ed[I].max():.2e} {ed.max():.2e}")
print(f"H1 (a), (d) exact in the interior -> {verdict(h1)}")
print(f"H1b (a) exact on the whole image, (b) = r - g(s-1)/2 on the whole image -> {verdict(h1b)}")
print(f"H2a (c) = r - G_d in the interior -> {verdict(h2a)}")
print("H2 R G_d (discrete) G_c = R(sqrt(1+g^2)-1) |G_d - G_c|")
h2b = h2c = True
for R in RADII:
gc = R * (np.sqrt(1 + G * G) - 1)
print(f" {R:2d} {gd_all[R]:.6f} {gc:.6f} {abs(gd_all[R] - gc):.6f}")
if R <= 5:
h2b &= abs(gd_all[R]) <= 1e-12
else:
h2b &= gd_all[R] > 1e-3
h2c &= abs(gd_all[R] - gc) <= 0.001
print(f"H2b G_d = 0 at R = 3, 5 and > 1e-3 at R = 10, 20, 50 -> {verdict(h2b)}")
print(f"H2c |G_d - G_c| <= 0.001 at R = 10, 20, 50 -> {verdict(h2c)}")
# ---- M2 and H3: recovered spot amplitude -------------------------------------------
cols = [("(a)", lambda f, R: method_a(f, R)), ("(a)+ps", lambda f, R: method_a(f, R, True)),
("(b)", lambda f, R: method_b(f, R)), ("(b)+ps", lambda f, R: method_b(f, R, True)),
("(c)", method_c), ("(d)", method_d)]
def rho(bg):
v = np.array([(clean[cy, cx] - bg[cy, cx]) / A for cy, cx in centres])
return v.mean(), v.min(), v.max()
inputs = [("clean", clean)] + [(f"noisy seed {sd}", noisy[sd]) for sd in SEEDS]
print("\nM2 recovered fraction of spot amplitude: mean [min, max] over 16 spots")
for name, img in inputs:
print(f"input {name}")
print(" R " + "".join(f"{c:>24s}" for c, _ in cols))
means = {c: [] for c, _ in cols}
for R in RADII:
cells = []
for c, fn in cols:
m, lo, hi = rho(fn(img, R))
means[c].append(m)
cells.append(f"{m:.4f} [{lo:.4f}, {hi:.4f}]")
print(f" {R:2d} " + "".join(f"{x:>24s}" for x in cells))
for c, _ in cols:
mm = means[c]
rises = all(mm[i + 1] >= mm[i] - 0.001 for i in range(len(mm) - 1))
near = abs(mm[-1] - 1) <= 0.05
print(f" H3 {name} {c}: rises {verdict(rises)}, |rho(50) - 1| = {abs(mm[-1] - 1):.4f} -> {verdict(near)}")
# ---- M3 and H4: scale test -------------------------------------------------------------
print("\nM3 max |bg(16 I)/16 - bg(I)| on the clean image (pixels differing)")
print(" R (a) (b) (c) (d)")
h4 = True
for R in RADII:
cells = []
for c, fn in [("a", method_a), ("b", method_b), ("c", method_c), ("d", method_d)]:
b1, b16 = fn(clean, R), fn(16.0 * clean, R) / 16.0
dv = np.max(np.abs(b16 - b1)); nd = int(np.count_nonzero(b16 != b1))
cells.append(f"{dv:.3e} ({nd:5d})")
h4 &= (nd == 0) if c == "d" else (dv > 0.1)
print(f" {R:2d} " + " ".join(cells))
print(f"H4 (d) exactly homogeneous, (a)-(c) deviate by more than 0.1 at every R -> {verdict(h4)}")
# ---- M4 and H5: the shrink path against a sphere and an ellipsoid ------------------
print("\nM4 clean image, interior: (b) against (a) sphere and (e) ellipsoid (R, R, R/s)")
for R in (20, 50):
s, _ = ball_class(R)
I = interior(R)
bb, ba, be = method_b(clean, R), method_a(clean, R), method_e(clean, R)
da, de = (bb - ba)[I], (bb - be)[I]
ra, re = np.sqrt(np.mean(da ** 2)), np.sqrt(np.mean(de ** 2))
print(f" R={R} s={s}: RMS(b-a) {ra:.6f} max|b-a| {np.abs(da).max():.6f} "
f"RMS(b-e) {re:.6f} max|b-e| {np.abs(de).max():.6f} -> H5 {verdict(re < ra)}")
Output:
D-data ramp step dev 8.5e-15, spot peak dev 0.0e+00, hump max dev 0.0e+00 -> held
D-data noise seed 0: mean +0.0049, std 1.9989 -> held
D-data noise seed 1: mean -0.0158, std 1.9919 -> held
D-data noise seed 2: mean -0.0046, std 1.9940 -> held
C-patch R s trim% full h (xtrim) shrunk r_s, xtrim, h
3 1 24 3 ( 0) 3.0, 0, 3
5 1 24 4 ( 1) 5.0, 1, 4
10 1 24 8 ( 2) 10.0, 2, 8
20 2 24 16 ( 4) 10.0, 2, 8
50 4 32 34 (16) 12.5, 4, 9
C-patch against the hand-derived table -> held
C-index s=4, i=0..11: 0 0 0 0 0 0 1 1 1 1 2 2 -> held
C-clamp s=4, small length 3: 0 0 0 0 0 0 1 1 1 1 1 1 -> held
C-hand vectorized vs loop, 20x20, R=3: max diff 0.0e+00 -> held
C-anti (a) R=10: max(bg - I) 7.11e-15 -> failed
C-idem (a) R=10: max|open(open) - open| 7.11e-15 -> held
M1 pure ramp, max |error| (interior = >= 2R+2 px from every border)
R (a) int (a) whole (b) whole vs r-g(s-1)/2 (c) int vs r-G_d (d) int (d) whole
3 0.00e+00 0.00e+00 0.00e+00 0.00e+00 0.00e+00 3.00e-01
5 0.00e+00 3.55e-15 3.55e-15 0.00e+00 0.00e+00 5.00e-01
10 3.55e-15 7.11e-15 7.11e-15 1.42e-14 0.00e+00 1.00e+00
20 0.00e+00 3.55e-15 1.42e-14 7.11e-15 0.00e+00 2.00e+00
50 0.00e+00 0.00e+00 1.42e-14 7.11e-15 0.00e+00 5.00e+00
H1 (a), (d) exact in the interior -> held
H1b (a) exact on the whole image, (b) = r - g(s-1)/2 on the whole image -> held
H2a (c) = r - G_d in the interior -> held
H2 R G_d (discrete) G_c = R(sqrt(1+g^2)-1) |G_d - G_c|
3 0.000000 0.014963 0.014963
5 0.000000 0.024938 0.024938
10 0.049874 0.049876 0.000001
20 0.099749 0.099751 0.000003
50 0.249372 0.249378 0.000006
H2b G_d = 0 at R = 3, 5 and > 1e-3 at R = 10, 20, 50 -> held
H2c |G_d - G_c| <= 0.001 at R = 10, 20, 50 -> held
M2 recovered fraction of spot amplitude: mean [min, max] over 16 spots
input clean
R (a) (a)+ps (b) (b)+ps (c) (d)
3 0.8512 [0.8407, 0.8651] 0.8302 [0.8197, 0.8442] 0.8512 [0.8407, 0.8651] 0.8302 [0.8197, 0.8442] 0.6265 [0.6190, 0.6338] 0.6865 [0.6790, 0.6938]
5 0.8988 [0.8899, 0.9070] 0.8876 [0.8800, 0.8953] 0.8988 [0.8899, 0.9070] 0.8876 [0.8800, 0.8953] 0.8810 [0.8692, 0.8953] 0.9679 [0.9634, 0.9755]
10 0.9552 [0.9540, 0.9562] 0.9501 [0.9484, 0.9513] 0.9552 [0.9540, 0.9562] 0.9501 [0.9484, 0.9513] 0.9744 [0.9572, 0.9948] 0.9888 [0.9826, 0.9939]
20 0.9753 [0.9734, 0.9767] 0.9727 [0.9708, 0.9745] 0.9910 [0.9884, 0.9932] 0.9896 [0.9868, 0.9915] 1.0017 [0.9831, 1.0255] 0.9948 [0.9904, 0.9982]
50 0.9895 [0.9884, 0.9914] 0.9883 [0.9869, 0.9905] 1.0064 [1.0003, 1.0151] 1.0061 [1.0002, 1.0149] 1.0243 [0.9988, 1.0687] 1.0074 [0.9970, 1.0741]
H3 clean (a): rises held, |rho(50) - 1| = 0.0105 -> held
H3 clean (a)+ps: rises held, |rho(50) - 1| = 0.0117 -> held
H3 clean (b): rises held, |rho(50) - 1| = 0.0064 -> held
H3 clean (b)+ps: rises held, |rho(50) - 1| = 0.0061 -> held
H3 clean (c): rises held, |rho(50) - 1| = 0.0243 -> held
H3 clean (d): rises held, |rho(50) - 1| = 0.0074 -> held
input noisy seed 0
R (a) (a)+ps (b) (b)+ps (c) (d)
3 0.8636 [0.8463, 0.8845] 0.8362 [0.8125, 0.8668] 0.8636 [0.8463, 0.8845] 0.8362 [0.8125, 0.8668] 0.6733 [0.6395, 0.7278] 0.7313 [0.6929, 0.7878]
5 0.9387 [0.8903, 0.9586] 0.8887 [0.8778, 0.9084] 0.9387 [0.8903, 0.9586] 0.8887 [0.8778, 0.9084] 0.9312 [0.8903, 0.9602] 1.0071 [0.9831, 1.0275]
10 1.0356 [1.0167, 1.0635] 0.9660 [0.9589, 0.9745] 1.0356 [1.0167, 1.0635] 0.9660 [0.9589, 0.9745] 1.0546 [1.0243, 1.0838] 1.0687 [1.0309, 1.1021]
20 1.0655 [1.0458, 1.0907] 0.9928 [0.9831, 0.9980] 1.0830 [1.0694, 1.1003] 1.0097 [1.0020, 1.0154] 1.0893 [1.0621, 1.1169] 1.0809 [1.0585, 1.1160]
50 1.0903 [1.0772, 1.1039] 1.0133 [1.0056, 1.0182] 1.1079 [1.0909, 1.1331] 1.0310 [1.0240, 1.0479] 1.1308 [1.0937, 1.1771] 1.1071 [1.0771, 1.2004]
H3 noisy seed 0 (a): rises held, |rho(50) - 1| = 0.0903 -> failed
H3 noisy seed 0 (a)+ps: rises held, |rho(50) - 1| = 0.0133 -> held
H3 noisy seed 0 (b): rises held, |rho(50) - 1| = 0.1079 -> failed
H3 noisy seed 0 (b)+ps: rises held, |rho(50) - 1| = 0.0310 -> held
H3 noisy seed 0 (c): rises held, |rho(50) - 1| = 0.1308 -> failed
H3 noisy seed 0 (d): rises held, |rho(50) - 1| = 0.1071 -> failed
input noisy seed 1
R (a) (a)+ps (b) (b)+ps (c) (d)
3 0.8762 [0.8301, 0.9312] 0.8357 [0.8139, 0.8562] 0.8762 [0.8301, 0.9312] 0.8357 [0.8139, 0.8562] 0.6760 [0.6420, 0.7241] 0.7330 [0.7013, 0.7841]
5 0.9400 [0.9062, 0.9541] 0.8932 [0.8697, 0.9068] 0.9400 [0.9062, 0.9541] 0.8932 [0.8697, 0.9068] 0.9350 [0.9043, 0.9944] 1.0168 [0.9925, 1.0402]
10 1.0347 [1.0163, 1.0523] 0.9682 [0.9607, 0.9772] 1.0347 [1.0163, 1.0523] 0.9682 [0.9607, 0.9772] 1.0579 [1.0301, 1.1305] 1.0690 [1.0288, 1.1022]
20 1.0672 [1.0510, 1.0824] 0.9953 [0.9890, 1.0073] 1.0834 [1.0683, 1.1000] 1.0098 [1.0020, 1.0192] 1.0960 [1.0616, 1.1660] 1.0800 [1.0476, 1.1146]
50 1.0930 [1.0754, 1.1192] 1.0140 [1.0078, 1.0267] 1.1094 [1.0979, 1.1353] 1.0290 [1.0188, 1.0361] 1.1311 [1.0871, 1.1827] 1.1031 [1.0732, 1.1878]
H3 noisy seed 1 (a): rises held, |rho(50) - 1| = 0.0930 -> failed
H3 noisy seed 1 (a)+ps: rises held, |rho(50) - 1| = 0.0140 -> held
H3 noisy seed 1 (b): rises held, |rho(50) - 1| = 0.1094 -> failed
H3 noisy seed 1 (b)+ps: rises held, |rho(50) - 1| = 0.0290 -> held
H3 noisy seed 1 (c): rises held, |rho(50) - 1| = 0.1311 -> failed
H3 noisy seed 1 (d): rises held, |rho(50) - 1| = 0.1031 -> failed
input noisy seed 2
R (a) (a)+ps (b) (b)+ps (c) (d)
3 0.8815 [0.8548, 0.9120] 0.8331 [0.8154, 0.8531] 0.8815 [0.8548, 0.9120] 0.8331 [0.8154, 0.8531] 0.6639 [0.6204, 0.7196] 0.7196 [0.6760, 0.7796]
5 0.9416 [0.9098, 0.9778] 0.8894 [0.8689, 0.9008] 0.9416 [0.9098, 0.9778] 0.8894 [0.8689, 0.9008] 0.9433 [0.9098, 0.9856] 1.0081 [0.9866, 1.0290]
10 1.0348 [1.0209, 1.0541] 0.9689 [0.9564, 0.9837] 1.0348 [1.0209, 1.0541] 0.9689 [0.9564, 0.9837] 1.0585 [1.0266, 1.1458] 1.0656 [1.0287, 1.0879]
20 1.0663 [1.0574, 1.0833] 0.9969 [0.9854, 1.0166] 1.0829 [1.0733, 1.0992] 1.0133 [1.0037, 1.0353] 1.0978 [1.0581, 1.1704] 1.0852 [1.0610, 1.1168]
50 1.0903 [1.0771, 1.1088] 1.0159 [1.0077, 1.0381] 1.1100 [1.0957, 1.1372] 1.0321 [1.0217, 1.0482] 1.1356 [1.0809, 1.2041] 1.1055 [1.0801, 1.1753]
H3 noisy seed 2 (a): rises held, |rho(50) - 1| = 0.0903 -> failed
H3 noisy seed 2 (a)+ps: rises held, |rho(50) - 1| = 0.0159 -> held
H3 noisy seed 2 (b): rises held, |rho(50) - 1| = 0.1100 -> failed
H3 noisy seed 2 (b)+ps: rises held, |rho(50) - 1| = 0.0321 -> held
H3 noisy seed 2 (c): rises held, |rho(50) - 1| = 0.1356 -> failed
H3 noisy seed 2 (d): rises held, |rho(50) - 1| = 0.1055 -> failed
M3 max |bg(16 I)/16 - bg(I)| on the clean image (pixels differing)
R (a) (b) (c) (d)
3 2.813e+00 ( 4205) 2.813e+00 ( 4205) 2.813e+00 (65478) 0.000e+00 ( 0)
5 4.625e+00 (11524) 4.625e+00 (11524) 4.562e+00 (65505) 0.000e+00 ( 0)
10 1.829e+00 (16556) 1.829e+00 (16556) 4.654e+00 (65520) 0.000e+00 ( 0)
20 1.214e+00 (16977) 1.613e+00 (27132) 6.170e+00 (65528) 0.000e+00 ( 0)
50 5.509e+00 (27908) 6.831e+00 (41342) 1.315e+01 (65532) 0.000e+00 ( 0)
H4 (d) exactly homogeneous, (a)-(c) deviate by more than 0.1 at every R -> held
M4 clean image, interior: (b) against (a) sphere and (e) ellipsoid (R, R, R/s)
R=20 s=2: RMS(b-a) 0.196193 max|b-a| 0.856827 RMS(b-e) 0.183962 max|b-e| 0.445010 -> H5 held
R=50 s=4: RMS(b-a) 1.404454 max|b-a| 2.058122 RMS(b-e) 0.903398 max|b-e| 1.080159 -> H5 held
Checks. The data check held, with noise standard deviations of 1.9989, 1.9919 and 1.9940 for seeds 0, 1 and 2. C-patch held: the half-widths equal the ones derived by hand from ImageJ’s rules, including Java’s half-up rounding of 8.5 to 9 for the shrunk patch at . C-index and C-clamp held, and C-hand held with a difference of exactly zero between the vectorized opening and the loop over ball positions. C-idem held at . C-anti failed as printed: the largest excess of the background over the image was , against a bar of 0.
The ramp. H1 held: in the interior the opening by ImageJ’s patch was within of the ramp at every radius, and the flat disk was exact. H1b held as well: (a) stayed within over the whole image, borders included, and (b) followed to within , an offset of at and at by that formula. The ball positions beyond the border are what make ImageJ’s opening exact up to the edge: the flat disk in SciPy’s reflect mode, exact inside, is off by 0.3, 0.5, 1, 2 and 5 over the whole image, which in our arithmetic is at each radius. H2a, H2b and H2c held. scikit-image’s background sat below the ramp by exactly , to within . That gap is zero at and 5, where no offset of the discrete kernel lies higher than its apex once the slope is added, and at larger radii it agrees with the sphere’s to within . The openings reproduce the ramp because their dilation adds back what their erosion removed (the derivation above); scikit-image’s function stops after the erosion and its lift by .
Spots. On the clean image H3 held for all six columns: the recovered fraction rose with the radius and ended within 0.05 of 1 at , at 0.0105, 0.0117, 0.0064, 0.0061, 0.0243 and 0.0074 from 1 for (a), (a)+ps, (b), (b)+ps, (c) and (d). Our expectation that part (ii) would fail for the flat disk on the clean image was not met: part (ii) held for (d), at 0.0074 from 1.
At small radii every method takes part of each spot into the background, in our reading because the patch is not much wider than a spot of : at the means run from 0.6265 for (c) to 0.8512 for (a). Columns (a) and (b) are identical up to , where the shrink factor is 1.
On the noisy images part (i) held in every column for every seed. Part (ii) failed for (a), at 0.0903, 0.0930 and 0.0903 from 1 for seeds 0, 1 and 2; for (b), at 0.1079, 0.1094 and 0.1100; for (c), at 0.1308, 0.1311 and 0.1356; and for (d), at 0.1071, 0.1031 and 0.1055.
Part (ii) held on the noisy images for (a)+ps, at 0.0133, 0.0140 and 0.0159, and for (b)+ps, at 0.0310, 0.0290 and 0.0321, for seeds 0, 1 and 2.
Scaling. H4 held. The flat top-hat’s background of the image scaled by 16 was the scaled background, bit for bit, at every radius, while the three ball methods differed by at least 1.214 grey levels (method (a) at ) and by up to 13.15 (scikit-image at ). By construction, a ball whose radius is in pixels and whose height is in grey levels is a different shape relative to the data once the data are scaled, so the same radius gives a different background for the same scene recorded at another gain or bit depth; our re-implementation shows this for (a) and (b). The header itself notes that a paraboloid can be fitted to any image values, even when they are much larger than a typical object size. scikit-image’s background changed at nearly every pixel (65,478 to 65,532 of 65,536), (a)’s at 4,205 to 27,908.
Shrinking. H5 held: at the shrink path was 0.183962 in RMS from the ellipsoid and 0.196193 from the sphere, and at 0.903398 against 1.404454. By the source’s own construction, dividing the radius by in all three axes keeps the ball’s footprint at full-resolution pixels but its height at grey levels, so the shrunk ball is a flattened ellipsoid of semi-axes rather than a sphere, before the block minimum and interpolation add their own differences. By the same rule, a radius of 50 entered in the dialog gives a ball only 12.5 grey levels high.
Ecosystem and Integrations
- Python. PyImageJ is a Python wrapper for ImageJ2, and therefore Fiji, which also reaches ImageJ 1.x through the legacy bridge; the wiki’s PyImageJ page names NumPy, SciPy, scikit-image, CellProfiler, OpenCV and ITK as tools it can be combined with.
- Other applications. ImageJ2’s parameterized commands can run headless and inside KNIME, CellProfiler and OMERO (ImageJ2 wiki page). The manuscript source describes an
OMEROLocationthrough which SCIFIO reads images from an OMERO server. - File formats. SCIFIO handles input in ImageJ2; the wiki’s Spatial Calibration page notes that calibration is read from the file when Fiji, “maybe using bio-formats”, can read it. Bio-Formats is a separate GPL project with a BSD-2 core (Licensing page). Image File Formats describes TIFF and the generic containers.
- Build and dependencies. ImageJ 1.x is available as the Maven artifact
net.imagej:ij, with versions up to 1.48q in the SciJava Maven repository and from 1.48r on Maven Central; the README warns that versions before 1.53k may not match the repository’s tags exactly. SciJava components extend thepom-scijavaparent, whose Bill of Materials fixes compatible versions, depend only on release versions so that builds are reproducible, and follow semantic versioning (Architecture page). - Community. The README points to the ImageJ mailing list and the Image.sc Forum for support; Bioimage Analysis describes the forum.
Alternatives
- scikit-image offers much of ImageJ’s classical toolbox as Python functions on NumPy arrays, including the
rolling_ballcompared above, which is not ImageJ’s algorithm: it returns an erosion lifted by the ball’s height, uses an untrimmed ball and does not shrink. - OpenCV provides classical image-processing operators as a library for C++ and Python.
- CellProfiler, ilastik, QuPath, napari and Icy are other open tools of the field; Bioimage Analysis describes the first four from their papers and official pages and names Icy.
Versions and Compatibility
As of November 2026, the newest tag in the tag listing of ImageJ 1.x’s GitHub mirror is v1.54r, a commit labelled “2025.09.25 (Release version)”, and its release notes list 1.54r on 25 September 2025 after 1.54q on 2 September 2025. Version names are a number and a letter. This article read ImageJ 1.x at that tag and the ImageJ wiki at commit 1b2f9f6 (14 November 2026); nothing is claimed about Fiji’s or ImageJ2’s current release numbers, which were not read. The ImageJ2 page calls its ImgLib2-based N-dimensional data structures “still in beta”, and the manuscript, from 2017, says the ImageJ Common data model was still stabilizing. ImageJ Legacy keeps 1.x macros and plugins running inside ImageJ2 and Fiji, as described above. The example ran with NumPy 2.3.5, SciPy 1.16.3 and scikit-image 0.25.2 under Python; it did not run ImageJ.
Limitations
- Legal status. ImageJ 1.x is public domain under U.S. law only, and the wiki states that contributed code makes the legal status of ImageJ as a whole unclear; Fiji’s GPL and each plugin’s own licence apply on top.
- Hidden state. Results can depend on more than the command and its parameters: 16-bit to 8-bit conversion scales by the current display range, Subtract Background’s dialog remembers its settings and its light-background preference while a macro call resets them, and the thresholder bins 16-bit data into 256 levels. Bioimage Analysis’s reporting guidance, to give exact versions and key parameters, applies here in full.
- Units. Some parameters are in pixels and grey levels, not calibrated units: the rolling ball’s radius is in pixels and its height in grey levels, so, as the example shows, the same radius gives a different background when the image is scaled, and the shrink path flattens the ball. Gaussian Blur’s σ is in pixels unless scaled units are chosen.
- Two data models. By default an ImageJ 1.x
ImagePlusand an ImageJ2Datasetcannot be interchanged, since they have different class hierarchies and theDatasetis the more expressive; the legacy layer maps one to the other (manuscript source).
Related
- Fluorescence Microscopy
Fluorescence microscopy as an imaging sensor, covering fluorescence and fluorophores, excitation and emission filters and channels, widefield, confocal, light-sheet and related variants, photon-limited noise, photobleaching and phototoxicity, spectral bleed-through and unmixing, and deconvolution in outline.
- scikit-image
The Python image processing library that works on NumPy arrays, with its modules, its conventions for data types and coordinates, its versions and licence, and an example that checks those conventions on a synthetic image.
- Thresholding
Segmenting an image by comparing each pixel's intensity with a threshold, chosen by hand, from the histogram as in Otsu's method, or from each pixel's neighborhood as in Sauvola's method.
- Cell Segmentation
Finding every cell or nucleus in a microscopy or histology image and giving each its own mask, so that cells can be counted, measured and tracked, with classical threshold-and-watershed pipelines, learned methods such as StarDist, Cellpose and HoVer-Net, and the instance-matching metrics and benchmarks used to compare them.
- Gaussian Filter
A linear smoothing filter that replaces each pixel by an average of its neighbors weighted by a Gaussian, whose standard deviation sets the scale of the detail removed.
- Optical Microscopy
Light microscopy as an imaging sensor, covering the optical path and Köhler illumination, objectives and numerical aperture, the diffraction-limited point-spread function and the Abbe, Rayleigh and Sparrow resolution criteria, brightfield, darkfield, phase contrast and differential interference contrast, cameras and Nyquist sampling, and the artifacts that image analysis has to handle.
References
- ImageJ wiki (2026). ImageJ, _pages/software/imagej/index.md, imagej/imagej.github.io at commit 1b2f9f6 (CC BY 3.0, https://creativecommons.org/licenses/by/3.0/).
- ImageJ wiki (2026). ImageJ2, _pages/software/imagej2/index.md, imagej/imagej.github.io at commit 1b2f9f6 (CC BY 3.0, https://creativecommons.org/licenses/by/3.0/).
- ImageJ wiki (2026). Fiji, _pages/software/fiji/index.md, imagej/imagej.github.io at commit 1b2f9f6 (CC BY 3.0, https://creativecommons.org/licenses/by/3.0/).
- ImageJ wiki (2026). Licensing, _pages/licensing/index.md, imagej/imagej.github.io at commit 1b2f9f6 (CC BY 3.0, https://creativecommons.org/licenses/by/3.0/).
- ImageJ wiki (2026). Architecture, _pages/develop/architecture.md, imagej/imagej.github.io at commit 1b2f9f6 (CC BY 3.0, https://creativecommons.org/licenses/by/3.0/).
- ImageJ wiki (2026). Update Sites, _pages/update-sites/index.md, imagej/imagej.github.io at commit 1b2f9f6 (CC BY 3.0, https://creativecommons.org/licenses/by/3.0/).
- ImageJ wiki (2026). Hosted Update Site Terms of Service, _pages/update-sites/tos.md, imagej/imagej.github.io at commit 1b2f9f6 (CC BY 3.0, https://creativecommons.org/licenses/by/3.0/).
- ImageJ wiki (2026). Spatial Calibration, _pages/imaging/spatial-calibration.md, imagej/imagej.github.io at commit 1b2f9f6 (CC BY 3.0, https://creativecommons.org/licenses/by/3.0/).
- ImageJ wiki (2026). PyImageJ, _pages/scripting/pyimagej.md, imagej/imagej.github.io at commit 1b2f9f6 (CC BY 3.0, https://creativecommons.org/licenses/by/3.0/).
- ImageJ wiki (2026). Auto Threshold, _pages/plugins/auto-threshold.md, imagej/imagej.github.io at commit 1b2f9f6 (CC BY 3.0, https://creativecommons.org/licenses/by/3.0/).
- ImageJ wiki (2026). Rolling Ball Background Subtraction, _pages/plugins/rolling-ball-background-subtraction.md, imagej/imagej.github.io at commit 1b2f9f6 (CC BY 3.0, https://creativecommons.org/licenses/by/3.0/).
- ImageJ (2025). Subtract Background, ij/plugin/filter/BackgroundSubtracter.java, ImageJ 1.54r source code (GitHub mirror imagej/ImageJ, tag v1.54r, commit 62db90a).
- ImageJ (2025). Gaussian Blur, ij/plugin/filter/GaussianBlur.java, ImageJ 1.54r source code (GitHub mirror imagej/ImageJ, tag v1.54r).
- ImageJ (2025). Type conversion, ij/process/TypeConverter.java, ImageJ 1.54r source code (GitHub mirror imagej/ImageJ, tag v1.54r).
- ImageJ (2025). README.md, LICENSE.txt (ImageJ Disclaimer) and release-notes.html, ImageJ 1.54r source code (GitHub mirror imagej/ImageJ, tag v1.54r).
- Rueden, C. T., Schindelin, J., Hiner, M. C., DeZonia, B. E., Walter, A. E., Arena, E. T. & Eliceiri, K. W. (2017). ImageJ2: ImageJ for the next generation of scientific image data. BMC Bioinformatics, 18, 529.
- Rueden, C. T. et al. imagej2.tex, the manuscript source of the ImageJ2 paper, imagej/imagej2-manuscript-2017 at commit 57b1dcf (the authors' copy read for this article).
- Fiji. LICENSE.txt (GNU General Public License v3.0), fiji/fiji repository (read 16 November 2026).
- scikit-image team (2025). Source of rolling_ball and ball_kernel, skimage/restoration/_rolling_ball.py and _rolling_ball_cy.pyx, scikit-image 0.25.2 source code.
- SciPy developers (2025). Source of grey_opening, scipy/ndimage/_morphology.py, SciPy 1.16.3 source code.
- Sternberg, S. R. (1983). Biomedical Image Processing. Computer (IEEE) (not read).
- Schneider, C. A., Rasband, W. S. & Eliceiri, K. W. (2012). NIH Image to ImageJ: 25 years of image analysis. Nature Methods, 9(7), 671–675 (not read).
- Schindelin, J., Arganda-Carreras, I., Frise, E., Kaynig, V., Longair, M., Pietzsch, T., Preibisch, S., Rueden, C., Saalfeld, S., Schmid, B., Tinevez, J.-Y., White, D. J., Hartenstein, V., Eliceiri, K., Tomancak, P. & Cardona, A. (2012). Fiji: an open-source platform for biological-image analysis. Nature Methods, 9(7), 676–682 (not read).