Skip to content

Conversation

@gselzer
Copy link
Member

@gselzer gselzer commented Aug 19, 2024

This PR removes all 3D geometry Ops, in favor of direct reliance upon the imglib2-mesh library.

The main question, now, is what happens to the tests. If they are kept here, they are vulnerable to action-at-a-distance errors. If they are migrated to imglib-mesh2, we will need (at minimum) a test-scope dependency on the SciJava Ops Engine, which feels fishy. @ctrueden @tpietzsch thoughts?

Still a draft PR because this work is directly tied into imglib/imglib2-mesh#10. That PR must be merged and a release of imglib2-mesh must be made before this PR is merged.

@gselzer gselzer requested a review from ctrueden August 19, 2024 19:48
@gselzer gselzer force-pushed the scijava-ops-image/port-mesh-ops branch 3 times, most recently from 9e1e68f to c1074b5 Compare August 19, 2024 21:23
@gselzer
Copy link
Member Author

gselzer commented Aug 19, 2024

Also of note - as shown here, many geom Ops in imglib2-mesh return java Doubles, not ImgLib2 DoubleTypes. This is a departure from the original SciJava Ops Image geom Ops, so I changed the documentation.

@ctrueden ctrueden force-pushed the scijava-ops-image/port-mesh-ops branch 2 times, most recently from 1ada092 to 7d8cbb9 Compare November 25, 2024 13:56
@ctrueden ctrueden mentioned this pull request Nov 25, 2024
@ctrueden ctrueden force-pushed the scijava-ops-image/port-mesh-ops branch from 7d8cbb9 to 397ebe2 Compare November 25, 2024 13:59
@gselzer gselzer force-pushed the scijava-ops-image/port-mesh-ops branch from 397ebe2 to c4bf27d Compare January 15, 2025 23:00
@gselzer
Copy link
Member Author

gselzer commented Jan 15, 2025

This PR has been rebased on top of #280, because while the direct opification of imglib2-mesh cannot happen without imglib v7, imglib v7 can happen without the opification of imglib2-mesh!

mesh = ops.op("geom.marchingCubes").input(mask).apply()
println("mesh = ${mesh} [${mesh.triangles().size()} triangles, ${mesh.vertices().size()} vertices]")

meshVolume = ops.op("geom.size").input(mesh).apply().getRealDouble()
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@elevans @ctrueden let's debate whether this causes a breakage in backwards compatibility. On one hand, this line of code will no longer work unless we write a wrapper in this repo around it (and the whole point of this PR is to get rid of those), which would lead to it being a breaking change. This is pretty convincing for me, but playing devil's advocate, the apply() will return you an Object, and so you are violating the return type contract i.e. on paper we didn't do anything wrong.

I still lead towards this being a breaking change that requires a major version bump, though.

@gselzer gselzer force-pushed the scijava-ops-image/port-mesh-ops branch 2 times, most recently from 038090e to ac123a1 Compare January 16, 2025 16:29
ctrueden added a commit that referenced this pull request Jan 16, 2025
As a temporary hack, we pin imglib2-mesh to 1.0.0 to avoid Op
clashes, because imglib2-mesh 1.1.0 now integrates the geom Ops,
resulting in Op matching clashes until #267 is merged.
@gselzer gselzer force-pushed the scijava-ops-image/port-mesh-ops branch from 9b693fa to 603226c Compare January 16, 2025 19:08
hinerm and others added 4 commits January 16, 2025 13:08
These two updates need to be done together, because imglib2-mesh 1.1.0,
which adds the Ops manifest, is also updated to depend on imglib2 v7.

Co-authored-by: Curtis Rueden <ctrueden@wisc.edu>
It's a complicated method, so it's worthwhile to document the need and
rationale
This required changes to avoid using ${project.version} all over the
place. Many of these version declarations, while not necessary right
now, will result in fewer changes down the line
@ctrueden ctrueden marked this pull request as ready for review January 22, 2025 21:15
@ctrueden ctrueden merged commit 10e666b into main Jan 22, 2025
1 check passed
@ctrueden ctrueden deleted the scijava-ops-image/port-mesh-ops branch January 22, 2025 21:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants