◐ Shell
reader mode source ↗
Skip to content
Permalink
base repository: scijava/scijava
base: main
...
head repository: scijava/scijava
Checking mergeability… Don’t worry, you can still create the pull request.
  • 2 commits
  • 1,022 files changed
  • 2 contributors

Commits on May 26, 2026

  1. Implement image.equation op

    This implementation brings back the image.equation Op from ImageJ Ops,
    but using Parsington instead of JavaScript for deterministic evaluation.
    
    - Equation.java — the image.equation Op with a Computer signature
      (String, RandomAccessibleInterval<T>)). Parses the expression once
      into a SyntaxTree, then iterates pixels with a localizing cursor,
      updating position before each evaluation. Any per-pixel runtime error
      yields NaN.
    
    - EquationEvaluator.java — extends Parsington's DefaultTreeEvaluator.
      Exposes p[0..n], x/y/z/t, pi/e, and reflects every public-static
      numeric java.lang.Math method.
    
    - EquationTest.java — 10 tests covering constants, p[i], axis
      shorthands, single- and multi-arg math, pi/e, a 3D image,
      reproducibility, random() distribution, and the NaN-on-bad-expression
      contract.
    
    Adds parsington as a dependency to scijava-ops-image.
    
    Notable design notes:
    - parens(...) returns the single arg unwrapped, or an Object[] for
      multi-arg, so function() can pick Math overloads.
    - brackets(...) returns a marker BracketIndex so function(fn, args)
      can distinguish p[i] from cos(x).
    - Multi-arg function args came through as unresolved Variable tokens;
      resolved via Parsington's value(arg) before reflection.
    - Single-threaded for now — Parsington's evaluator is stateful, and the
      op is documented as a demo helper, so top performance is not critical.
    
    Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
    ctrueden and claude committed May 26, 2026
    Configuration menu
    Copy the full SHA
    2c3c2bc View commit details
  2. Configuration menu
    Copy the full SHA
    a689e52 View commit details
    Browse the repository at this point in the history
Loading