[Insight-developers] Consistency in the output of forward/inverse FFT image filters

Cory Quammen cquammen at cs.unc.edu
Fri Aug 19 10:31:48 EDT 2011


[snip]

> The mask filter complained when I had a half image mask for the
> half frequency domain image.
>
> The mask filter has no way of knowing that the rest of the
> LargestPossibleRegion won't be used.

Yeah, the application that makes the mask would have to take into
account the half-image format.

>>> So if there is going to be work done on the FFT filters I would
>>> like to make sure that shifting, and masking work. I'd be willing
>>> to work on the test or at least example code.
>> Does FFTShiftImageFilter not work? It appeared to work fine for the
>> code sample you provided when VNL was used for the FFT.

> Would it work for only half of the image, or would it put the
> corners of the half image in the middle of the half image?

Ah, now I understand. No, it's not going to produce what you expect
for the half image. Like Gaetan said, the FFT shift filter could be
modified to optionally not shift the half dimension. If you think that
you would do that frequently, I can make a patch for it.

> I think most of what I'm worried about only comes into play when
> I have to write out the magnitude image, convert it to a
> meta-data destroying format, print it show it to my boss, create
> a mask in the gimp...

So either a mode in the FFT filter to produce the full output or
another filter that expands a half image would meet your needs using
the existing FFT shift filter?

[snip]
> I just want to make sure there's a documented way for the user to
> avoid potential headaches.

Agreed.

-- Cory

-- 
Cory Quammen
Research Associate
Department of Computer Science
The University of North Carolina at Chapel Hill


More information about the Insight-developers mailing list