Login  Register

Re: Rephrased FFT Question

Posted by bnorthan on Mar 20, 2014; 4:01pm
URL: http://imagej.273.s1.nabble.com/Rephrased-FFT-Question-tp5007000p5007017.html

Hi Rebecca

I am not aware of a simple solution, hopefully someone else knows.   But
someone had a similar problem a while back and it ended up being a fairly
involved discussion.  He had to write some macros.

http://imagej.1557.x6.nabble.com/Automating-Image-Processing-and-Problems-with-FFTJ-td5004660.html

As Herbie mentioned FFTJ is not macro-recordable, I have a slightly
modified version of FFTJ which is recordable and is available here

https://github.com/bnorthan/RogueImageJPlugins/releases

It is really just a copy of the original except with the small changes
talked about in the other thread.

I played around with calling FFTJ on individual points in a time series
using a python macro.  I think the logic is right but keep in mind it is a
hack and pretty slow.   The proper way to do it would be to perform all
calculations in one plugin.   This approach loops through every pixel,
copies a time profile to a temp image then runs the plugin over and over.

https://github.com/bnorthan/RogueImageJPlugins/blob/master/FFTJ_scriptable/macros/Time_Macro.py




On Thu, Mar 20, 2014 at 6:02 AM, Herbie <[hidden email]> wrote:

> Rebecca,
>
> if you manage to extract 1D-"images" from your time series of images,
> i.e. in fact pixel sequences as 1D-images, then you may use the
> FFTJ-PlugIn to perform 1D-FFTs of each of these series.
>
> <http://rsb.info.nih.gov/ij/plugins/fftj.html>
>
> You may use a macro to extract the n^2 1D-images (assuming that your
> images are of size n x n). To make use of the FFT speed advantage, your
> stack must consist of m images (time slices), where m is a power of two.
>
> The problem with FFTJ is, that it isn't perfectly macro-recordable. It
> shows a dialog for choosing the result format. In other words, to fully
> automatize processing by an IJ-macro, you need to modify the source code of
> FFTJ.
>
> HTH
>
> Herbie
>
> ::::::::::::::::::::::::::::::::::::::::
>
> On 20.03.14 02:04, Rebecca Keller wrote:
>
>> Thanks very much for this reference, but actually it is a bit
>> cumbersome to come in and out of imagej, since this "plugin" requires
>> ms excel for the fft'ing.
>>
>> Seems like it should be possible to get the current fft algorithm to
>> do a 1D FFT on each pixel over time, then re-output the timelapse
>> stack as a 2D image in frequency domain. Then it would be neat, for
>> example, to make a 2D image depth-coded by frequency. I, however,
>> just need to get the pixels which all have the same frequencies,
>> which should be easy enough to do using the 1D FFT pixelwise which I
>> suggested.
>>
>> JPK
>>
>> On Wed, Mar 19, 2014 at 5:18 PM, Eric Denarier <
>> [hidden email]> wrote:
>>
>>  Hi Rebecca, You may have a look to Claire Smith's CiliaFA macro. It
>>> reveals frequencies of intensity variation in different zone of a
>>> brightfield image. We are using it for high frequency Cilia
>>> beating. here is a link to the paper and macro :
>>> http://www.ciliajournal.com/content/1/1/14
>>>
>>>
>>> Rebecca Keller <[hidden email]> a écrit :
>>>
>>> Dear List,
>>>
>>>>
>>>> Let me rephrase: what I am trying to do is locate oscillations of
>>>> a certain frequency onto a 2D visual field, i.e., convert the
>>>> third dimension (time) of a time-lapse image series into
>>>> frequency space. Then I could scan through frequency space (the
>>>> new third dimension) to find groups of pixels with similar
>>>> oscillation frequencies.
>>>>
>>>> So I guess what would need to be done is a 1D FFT for each pixel.
>>>> Is there any way easily to do this with the current imagej
>>>> tools?
>>>>
>>>> JPK
>>>>
>>>> -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>>>>
>>>>
>>> -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>>>
>>>
>> -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>>
>>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html