Used the following macro for segmentation but it seems to only process the first image. Tried process_all for some functions and it still does not apply to the stack. Can anybody help me to figure out a way to apply the macro for he entire stack of images.
run("Enhance Contrast...", "saturated=0.3 normalize");
run("Distance Transform Watershed", "distances=[Borgefors (3,4)] output=[32 bits] normalize dynamic=1 connectivity=4");
setOption("ScaleConversions", true);
run("8-bit");
setAutoThreshold("Default dark");
//run("Threshold...");
setThreshold(1, 255);
setOption("BlackBackground", true);
run("Convert to Mask");
run("Erode");
run("Fill Holes");
run("Voronoi");
run("Invert");
//run("Brightness/Contrast...");
run("Enhance Contrast", "saturated=0.35");
run("Apply LUT");
setAutoThreshold("Default dark");
//run("Threshold...");
setThreshold(255, 255);
run("Convert to Mask");
run("Watershed Irregular Features", "erosion=11 convexity_threshold=0 separator_size=0-Infinity");
run("Distance Transform Watershed", "distances=[City-Block (1,2)] output=[16 bits] normalize dynamic=11 connectivity=4");