Hello ImageJ users:
I'd like to create a macro or plugin that generates a sequence of difference images from a time-lapse image sequence. For example, suppose I have a time-lapse sequence of 1000 images. I'd like the macro/plugin to create a new sequence of 999 images where each frame is the resultant subtraction of the next frame minus the previous frame (Frame[N+1] minus Frame[N]). I think this operation is simple enough that I could code it myself, but I just wanted to check and see if anyone else knew of an existing ImageJ plugin or macro that already does this. No sense in re-creating the wheel. Thanks! John Oreopoulos Research Assistant Spectral Applied Research Richmond Hill, Ontario Canada www.spectral.ca |
Am 08.12.2011 18:24, schrieb John Oreopoulos:
> Hello ImageJ users: > > I'd like to create a macro or plugin that generates a sequence of difference images from a time-lapse image sequence. For example, suppose I have a time-lapse sequence of 1000 images. I'd like the macro/plugin to create a new sequence of 999 images where each frame is the resultant subtraction of the next frame minus the previous frame (Frame[N+1] minus Frame[N]). I think this operation is simple enough that I could code it myself, but I just wanted to check and see if anyone else knew of an existing ImageJ plugin or macro that already does this. No sense in re-creating the wheel. > Hey.. I don't know if this has exactly been done before but you find useful fragments to create your own macro here. Simply hit Strg+Shift+N to paste the macro into editor.. BatchConvert http://rsb.info.nih.gov/ij/macros/BatchConvert.txt imageCalculator http://rsb.info.nih.gov/ij/macros/ImageCalculatorDemo.txt Maybe someone else has even more hints or you find better starting points in the docs. Regards, Rainer -- Rainer M. Engel www.scientific-media.de |
In reply to this post by John Oreopoulos
John,
You might try : http://rsb.info.nih.gov/ij/macros/Slice-to-Slice%20Difference.txt Jerome On 8 December 2011 18:24, John Oreopoulos <[hidden email]>wrote: > Hello ImageJ users: > > I'd like to create a macro or plugin that generates a sequence of > difference images from a time-lapse image sequence. For example, suppose I > have a time-lapse sequence of 1000 images. I'd like the macro/plugin to > create a new sequence of 999 images where each frame is the resultant > subtraction of the next frame minus the previous frame (Frame[N+1] minus > Frame[N]). I think this operation is simple enough that I could code it > myself, but I just wanted to check and see if anyone else knew of an > existing ImageJ plugin or macro that already does this. No sense in > re-creating the wheel. > > Thanks! > > > John Oreopoulos > Research Assistant > Spectral Applied Research > Richmond Hill, Ontario > Canada > www.spectral.ca > |
Thank you all for your replies so far the Slice-to-Slice difference macro looks perfect. Michael, I wouldn't mind checking out what you have as well.
Thanks again. John Oreopoulos On 2011-12-08, at 1:02 PM, Jerome Mutterer wrote: > John, > > You might try : > > http://rsb.info.nih.gov/ij/macros/Slice-to-Slice%20Difference.txt > > Jerome > > On 8 December 2011 18:24, John Oreopoulos <[hidden email]>wrote: > >> Hello ImageJ users: >> >> I'd like to create a macro or plugin that generates a sequence of >> difference images from a time-lapse image sequence. For example, suppose I >> have a time-lapse sequence of 1000 images. I'd like the macro/plugin to >> create a new sequence of 999 images where each frame is the resultant >> subtraction of the next frame minus the previous frame (Frame[N+1] minus >> Frame[N]). I think this operation is simple enough that I could code it >> myself, but I just wanted to check and see if anyone else knew of an >> existing ImageJ plugin or macro that already does this. No sense in >> re-creating the wheel. >> >> Thanks! >> >> >> John Oreopoulos >> Research Assistant >> Spectral Applied Research >> Richmond Hill, Ontario >> Canada >> www.spectral.ca >> |
In reply to this post by John Oreopoulos
Isn't this just plugins-stacks-deltaFdown (or deltaF up)? As described here:
http://www.macbiophotonics.ca/imagej/t.htm#t_deltaF Michael ? Michael J. Schell, Ph.D., CIV, USUHS Assist. Professor Dept. of Pharmacology Uniformed Services University 4301 Jones Bridge Rd. Bethesda, MD 20814-3220 tel: (301) 295-3249 [hidden email] >>> "Rainer M. Engel" 12/08/11 12:52 PM >>> Am 08.12.2011 18:24, schrieb John Oreopoulos: > Hello ImageJ users: > > I'd like to create a macro or plugin that generates a sequence of difference images from a time-lapse image sequence. For example, suppose I have a time-lapse sequence of 1000 images. I'd like the macro/plugin to create a new sequence of 999 images where each frame is the resultant subtraction of the next frame minus the previous frame (Frame[N+1] minus Frame[N]). I think this operation is simple enough that I could code it myself, but I just wanted to check and see if anyone else knew of an existing ImageJ plugin or macro that already does this. No sense in re-creating the wheel. > Hey.. I don't know if this has exactly been done before but you find useful fragments to create your own macro here. Simply hit Strg+Shift+N to paste the macro into editor.. BatchConvert http://rsb.info.nih.gov/ij/macros/BatchConvert.txt imageCalculator http://rsb.info.nih.gov/ij/macros/ImageCalculatorDemo.txt Maybe someone else has even more hints or you find better starting points in the docs. Regards, Rainer -- Rainer M. Engel www.scientific-media.de Classification: UNCLASSIFIED Caveats: None Classification: UNCLASSIFIED Caveats: None |
Yes you're right, I even had this plugin already installed from the macbiophotonics package and didn't realize it was there. Thanks for pointing this out.
John Oreopoulos On 2011-12-08, at 1:27 PM, Michael Schell wrote: > Isn't this just plugins-stacks-deltaFdown (or deltaF up)? As described here: > > > http://www.macbiophotonics.ca/imagej/t.htm#t_deltaF > > > Michael > > > ? > Michael J. Schell, Ph.D., CIV, USUHS > Assist. Professor > Dept. of Pharmacology > Uniformed Services University > 4301 Jones Bridge Rd. > Bethesda, MD 20814-3220 > tel: (301) 295-3249 > [hidden email] >>>> "Rainer M. Engel" 12/08/11 12:52 PM >>> > Am 08.12.2011 18:24, schrieb John Oreopoulos: >> Hello ImageJ users: >> >> I'd like to create a macro or plugin that generates a sequence of difference images from a time-lapse image sequence. For example, suppose I have a time-lapse sequence of 1000 images. I'd like the macro/plugin to create a new sequence of 999 images where each frame is the resultant subtraction of the next frame minus the previous frame (Frame[N+1] minus Frame[N]). I think this operation is simple enough that I could code it myself, but I just wanted to check and see if anyone else knew of an existing ImageJ plugin or macro that already does this. No sense in re-creating the wheel. >> > > Hey.. I don't know if this has exactly been done before but you find > useful fragments to create your own macro here. > > Simply hit Strg+Shift+N to paste the macro into editor.. > > > BatchConvert > http://rsb.info.nih.gov/ij/macros/BatchConvert.txt > > imageCalculator > http://rsb.info.nih.gov/ij/macros/ImageCalculatorDemo.txt > > > Maybe someone else has even more hints or you find better starting > points in the docs. > > Regards, > Rainer > > -- > Rainer M. Engel > www.scientific-media.de > > > Classification: UNCLASSIFIED > Caveats: None > > > Classification: UNCLASSIFIED > Caveats: None |
In reply to this post by John Oreopoulos
> I'd like to create a macro or plugin that generates a sequence of
> difference images from a time-lapse image sequence [..] where each frame > is the resultant subtraction of the next frame minus the previous > frame (Frame[N+1] minus Frame[N]). You can check out this plug-in of mine, http://www.msc.univ-paris-diderot.fr/~daerr/tmp/Stack_Differentiator.class (GPLed source at: http://www.msc.univ-paris-diderot.fr/~daerr/tmp/Stack_Differentiator.java ) which offers a preview, different formulas and adjustable parameters: static final String[] ops = {"([n] - [n-a])*b + c", "[n] - [n-a]*b + c", "([n] - [a])*b + c", "[n] - [a]*b + c", "([n] - c):b + [n-a]", "[n] + [n-a]*b - c", "([n] - c):b + [a]", "[n] + [a]*b - c"}; It was written back in 2002, so it doesn't make use neither of Java 1.5's Enumerations, nor ImageJ's own preview mechanism (through the ExtendedPlugInFilter interface). In particular it will not make use of multi-threading. But it works nicely, and we use it regularly as a nice way of detecting changes. Just drop the .class file into ImageJ's plugins directory, and restart ImageJ, as usual. hth Adrian |
Free forum by Nabble | Edit this page |