Skip to content

Conversation

@gselzer
Copy link
Member

@gselzer gselzer commented Feb 10, 2025

This PR brings a modified version of work that @elevans started to improve FFT operations written as Functions. It now enables (and tests) that the following Op call works:

var img = ...
var fft = ops.op("filter.fft").input(img).apply(); // output type optional

The main modification I added on top was extracting all of the FFT Ops into a single FFT.java class, rewriting them as static methods in the process. This obviates the many miscellaneous, ambiguously-named files in the package.

elevans and others added 2 commits February 10, 2025 11:53
Running `out = ops.op("filter.fft").arity1().input(img).apply()` returns
a blank image. This is because the wrong image dimensions are being used
for the FFT result. This is an example of when adaptation fails. SciJava
Ops adapts the FFT Op into a function and assumes that the output image
dimensions are the same as the input. Generally this is a safe
assumption, but this is an example where the output image dimensions
are in fact different. This commit adds a new Op that depends on
`FFTMethodsOpF` and returns the FFT result as a ComplexFloatType. This
is consistent with the old imagej-ops usage.
This commit throws all of them, rewritten as static methods, into one
class, and adds a test to ensure proper matching of function FFT Ops
@gselzer gselzer requested a review from elevans February 10, 2025 20:04
@gselzer gselzer self-assigned this Feb 10, 2025
@imagesc-bot
Copy link

This pull request has been mentioned on Image.sc Forum. There might be relevant details there:

https://forum.image.sc/t/fiji-friends-weekly-dev-update-thread/103718/60

Copy link
Member

@ctrueden ctrueden left a comment

Choose a reason for hiding this comment

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

Awesome! Thank you for following through on this improvement. 👍

@ctrueden ctrueden merged commit b20d3e0 into main Feb 11, 2025
1 check passed
@ctrueden ctrueden deleted the scijava-ops-image/fft-function branch February 11, 2025 15:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants