Dear Imagers,
is anyone aware of a way in IJ to fit each pixel in a timelapse series to a given equation, then output a stack with those fitted curves? Seems very parallel-izable, and pretty useful as well, say for bleach correction etc. For my current purposes, I would just like to fit a (y=mx+b) line for each pixel. Thanks, Jacob Keller -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
Good day Jacob,
I see no reason why a macro couldn't do that but the main question concerns your requirement: "[...] then output a stack with those fitted curves?" How do you imagine this stack? Same temporal resolution as the original stack? In the past we saw questions regarding pixel-wise, i.e. 1D FFT of a stack and I even wrote a plugin that does this. So where do you see a problem with fits? If yes, this shouldn't pose big problems. Regards Herbie :::::::::::::::::::::::::::::::::::::::::: Am 04.05.18 um 04:47 schrieb Jacob Keller: > Dear Imagers, > > is anyone aware of a way in IJ to fit each pixel in a timelapse series to a > given equation, then output a stack with those fitted curves? Seems very > parallel-izable, and pretty useful as well, say for bleach correction etc. > For my current purposes, I would just like to fit a (y=mx+b) line for each > pixel. > > Thanks, > > Jacob Keller > > -- > ImageJ mailing list: http://imagej.nih.gov/ij/list.html > -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
In reply to this post by Jacob Keller-2
Jacob,
if you want to go with a macro solution, I recommend to first transform the stack so that its slices contain one spatial coordinate and the time coordinate. Then, for every slice, use "run("Image to Results")" and from this matrix get 1D arrays as a function of time by the new table macro functions. Then, for every slice, fit the 1D arrays with the macro fit function and write the arrays back to the table by the new table macro functions. Finally, for every slice, write the table with the new values back using "run("Results to Image")". Redo the transform. HTH Herbie :::::::::::::::::::::::::::::::::::::::::: Am 04.05.18 um 04:47 schrieb Jacob Keller: > Dear Imagers, > > is anyone aware of a way in IJ to fit each pixel in a timelapse series to a > given equation, then output a stack with those fitted curves? Seems very > parallel-izable, and pretty useful as well, say for bleach correction etc. > For my current purposes, I would just like to fit a (y=mx+b) line for each > pixel. > > Thanks, > > Jacob Keller > > -- > ImageJ mailing list: http://imagej.nih.gov/ij/list.html > -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
In reply to this post by Jacob Keller-2
Hi Jacob,
to start with, you can try the Stack Fitter http://imagejdocu.tudor.lu/doku.php?id=plugin:stack:stack_fitter:start It is not parallelized (I did not have time for it), and its output is not the fitted curves but a stack with the fit parameters. In a macro, you can use Process>Math and Process>Image Calculator to create a stack of the fit itself. Or modify the source code for that kind of output. Michael ________________________________________________________________ On 04/05/2018 04:47, Jacob Keller wrote: > Dear Imagers, > > is anyone aware of a way in IJ to fit each pixel in a timelapse series to a > given equation, then output a stack with those fitted curves? Seems very > parallel-izable, and pretty useful as well, say for bleach correction etc. > For my current purposes, I would just like to fit a (y=mx+b) line for each > pixel. > > Thanks, > > Jacob Keller -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
In reply to this post by Jacob Keller-2
Greetings,
If by 'fit each pixel in a timelapse series' you mean you would like to process each voxel's values through the frame dimension. I got tired of rewriting this every time I needed, both processing and looking at trends, so ... see attached. (note: the listserv will not allow me to attach java files). I was going to upload them to where all the other community provided plugins are, although at present I could not find reference to how/where to upload plugins. Enjoy, Fred On Thu, May 3, 2018 9:47 pm, Jacob Keller wrote: > Dear Imagers, > > is anyone aware of a way in IJ to fit each pixel in a timelapse series to a given equation, then output a stack with those fitted curves? Seems very parallel-izable, and pretty useful as well, say for bleach correction etc. For my current purposes, I would just like to fit a (y=mx+b) line for each pixel. > > Thanks, > > Jacob Keller > > -- > ImageJ mailing list: http://imagej.nih.gov/ij/list.html > -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
Free forum by Nabble | Edit this page |