Login  Register

subtracting median from sets of avi files

Posted by chris elliott on Jan 18, 2010; 4:01pm
URL: http://imagej.273.s1.nabble.com/subtracting-median-from-sets-of-avi-files-tp3689686.html

Hi (running 1.43n)

I have a directory full of avi files which show fly larva crawling on
varoous backgrounds. By hand, i can calculate and subtract the median
from the avi (which discriminates the larva wonderfully), and save to disk.

So I recorded the action:

open("Q:\\Julia_rpt\\marina\\30min\\ro54\\HL3 30' 1 uncomp.avi");
run("Z Project...", "start=1 stop=12 projection=Median");
imageCalculator("Subtract stack", "HL3 30' 1 uncomp.avi","MED_HL3 30' 1
uncomp.avi");
run("AVI... ", "compression=Uncompressed frame=0.1
save=[Q:\\Julia_rpt\\marina\\30min\\ro54\\test\\HL3 30' 1 uncomp.avi]");

and tried to put it in the batch mode window, modifying it like this to
pass the window id (as per ImageCalculatorDemo.txt)

id1 = getImageID;
run("Z Project...", "start=1 stop=12 projection=Median");
id2 = getImageID;
imageCalculator("Subtract stack", id1, id2);


I've got some problems with this:
1) i don't want to click "convert to grayscale" in the open dialog for
every file
2) how do I set the output for avi  ?  i don't see an option in the
Process > batch > macro dialog?

thanks
chris