Login  Register

Macro recorded in image to stack

Posted by Adrián Villalba on Apr 12, 2017; 1:23pm
URL: http://imagej.273.s1.nabble.com/Macro-recorded-in-image-to-stack-tp5018521.html

Dear all,

I have recorded a macro that works fine for single images but when i do
File > Impor sequence and I apply the macro to the stack it gives me
different values than the recorded one used for each single image.

Do you know how can i modify the macro to use it for each image in a stack?
The main reason i want to use the macro in a stack is only to avoid running
the macro individually for each image rather than run the macro one for all
the different images i have.

If it helps, this is the macro:

title = getTitle();
  run("Split Channels");
  selectWindow(title+" (blue)");
  close();
  selectWindow(title+" (red)");
  close();
  selectWindow(title+" (green)");
  // process the green channel;
run("Gaussian Blur...", "sigma=5");


setThreshold(40, 255);

setOption("BlackBackground", false);


run("Convert to Mask");

run("Erode");
run("Analyze Particles...", "size=400-Infinity show=[Overlay Masks] display
exclude clear summarize in_situ");



Thank you in advance,


--

   - Adrián Villalba Felipe.
   https://es.linkedin.com/in/adrianvillalba

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