Login  Register

Re: subtracting median from sets of avi files

Posted by chris elliott on Jan 19, 2010; 12:15pm
URL: http://imagej.273.s1.nabble.com/subtracting-median-from-sets-of-avi-files-tp3689686p3689688.html

Rasband, Wayne (NIH/NIMH) [E] wrote:

>
> Here is a macro that subtracts the median from an AVI and saves the result as another AVI. The &path notation it uses to pass file path variables in run() function calls requires ImageJ 1.43k or later.
>
>   requires("1.43k");
>   setBatchMode(true);
>   path1 = "/Users/wayne/images/test.avi";
>   path2 = "/Users/wayne/images/test2.avi";
>   run("AVI...", "select=&path1 convert");
>   avi = getImageID;
>   run("Z Project...", "projection=Median");
>   median = getImageID;
>   imageCalculator("Subtract stack", avi, median);
>   selectImage(avi);
>   run("AVI... ", "compression=Uncompressed frame=5 save=&path2");
>
> -wayne

Thank you very much for such prompt help - it worked very efficiently
chris