Benchmarking¶
Compares the distribution of orientation measured by seven tools, all with the cubic-spline gradient and the structure-tensor window σ = 1 wherever the tool exposes those choices, on four images of the test set. Two comparisons:
- masked — only pixels inside the structure masks; without Directionality (no mask support);
- full — every pixel of the image, without the direct gradient, whose unsmoothed histogram is dominated by the flat background.
Results¶
Inside the structure mask¶
Over the whole image¶
The seven tools¶
- OrientationJ (Fiji) — the Java plugin; its saved orientation maps are binned here.
- OrientationJ Python port — the Python port, the faithful reimplementation.
- OrientationPy — the Python successor, 2D and 3D; spline gradient, σ = 1, fiber orientation.
- GST operator — gst_operator.py, the
forward()of the minimal Python version: Gaussian-derivative gradient and Gaussian window, analytic in Fourier. - scikit-image —
feature.structure_tensor(finite-difference gradient), same tensor formula. - direct gradient — per-pixel angle perpendicular to the spline gradient, no tensor smoothing (σ = 0).
- Directionality (Fiji) — local-gradient method, its own histogram; no mask support, whole image.
All tools share the OrientationJ angle convention (verified on calibration sinusoids): degrees in [−90, +90], counter-clockwise from the horizontal of the displayed image. Histograms: 180 bins of 1°, normalized to probability per bin.
Files¶
| file | content |
|---|---|
| benchmark_orientation.ipynb | runs the five Python tools, loads the Fiji results, draws the comparison |
| macro-orientationj.ijm | Fiji macro — OrientationJ Analysis (spline, σ = 1), saves the orientation maps |
| macro-directionality.ijm | Fiji macro — Directionality plugin (GUI only: it saves the displayed table) |
| script-directionality.groovy | same as the macro through the plugin API, also works headless |

