GeezerVison is showing github.com — Missing `image.equation` function from imagej-ops · Issue #287 · scijava/scijava
Missing image.equation function from imagej-ops #287
Description
I'm working through converting the ImageJ/Fiji script templates to use SciJava Ops. The Richardson-Lucy Total Variation deconvolution imagej-ops Groovy script uses the equation function in the image namespace to create a grid image:
grid_img = ops.run("create.img", [x_dim, y_dim], new FloatType())
formula = "p[0]^2 * p[1]"
ops.image().equation(grid_img, formula)
If I remember correctly the equation function depends on JavaScript (Nashorn) which may complicate things. I'm not necessarily advocating that we add this to SciJava Ops, and as I understand it this is not a highly used function.
Activity
gselzer commented on May 26, 2026
If I remember correctly the equation function depends on JavaScript (Nashorn) which may complicate things.
Your memory is correct! Here's the commit where it was deleted.
I'm not necessarily advocating that we add this to SciJava Ops, and as I understand it this is not a highly used function.
I think this could actually be a fun Op to write. You could imagine an Op that:
ctrueden commented on May 26, 2026
I pushed a branch implementing image.equation with Parsington. All tests pass when compiled, including newly crafted unit tests, but I was unable to test manually in IntelliJ, due to the dreaded org.scijava.ops.api.OpMatchingException: No Ops found matching this request. When I look for ops.yaml in scijava-ops-image, I find nothing:
$ find . -name ops.yaml
./scijava-ops-flim/target/classes/ops.yaml
./scijava-ops-flim/target/test-classes/ops.yaml
./scijava-ops-engine/target/test-classes/ops.yaml
./scijava-ops-benchmarks/target/classes/ops.yaml
./scijava-ops-benchmarks/target/test-classes/ops.yaml
./scijava-ops-opencv/target/classes/ops.yaml
./scijava-ops-opencv/target/test-classes/ops.yaml
./scijava-ops-opencv/src/main/resources/ops.yaml
./scijava-ops-tutorial/target/classes/ops.yaml
./scijava-ops-tutorial/target/test-classes/ops.yaml
@gselzer Any hints on why the new Op is getting discovered for the unit tests, but not in my IDE?
Reacted by Gabriel Selzer
gselzer commented on May 27, 2026
@ctrueden I'm not sure in your case, but it might have to do with IntelliJ doing the builds. I do know that IntelliJ's Build -> Build Project is (currently) incapable of generating ops.yaml files. Here's what I tried:
git checkout scijava-ops-image/image-equation. mvn clean install. Build completes with passing tests. EquationTest fails in IntelliJ. CreateImgTest (arbitrarily chosen) fails in IntelliJ
git checkout main. mvn clean install. Build completes with passing tests. CreateImgTest passes in IntelliJ.
git checkout scijava-ops-image/image-equation^. mvn clean install. Build completes with passing tests. EquationTest passes in IntelliJ. CreateImgTest passes in IntelliJ.
git checkout scijava-ops-image/image-equation. mvn clean install. Build completes with passing tests. EquationTest passes in IntelliJ. CreateImgTest passes in IntelliJ
- IntelliJ
Build -> Build Project. EquationTest fails in IntelliJ.
In the past, I always found a CLI build necessary when I wrote a new Op. So maybe see if IntelliJ is automatically building or something?
Metadata
Metadata
Development
No branches or pull requestsIssue actions