Is there a way to "Stack Combine" 3 stacks side by side.
Image>Stacks>Tools>Combine
Supports the combination of 2 stacks, side by side. The two ways around this:
- Combine the first 2 then combine the combined image to the third stack
- Create a macro that does the above
run("Combine...", "stack1=STAC1_NAME stack2=STACK2_NAME");
run("Combine...", "stack1=[Combined Stacks] stack2=STACK3_NAME");
Is there another way to do this, since, for example combining 20 stacks side-by-side.
Code Snippet added/
//Specify Folders here//
output = "PATH";
combined = "PATH";
original= "PATH";
//Batch Mode for ImageJ
setBatchMode(true);
list = getFileList(input);
for (i = 0; i < list.length; i++) {
combine(original, output, combined, list[i]);
}
setBatchMode(false);
function combine(original, output, combined, filename) {
//Open Outline & Overlay for Combine Stack//
name_outline = filename + "_outline.png";
name_overlay = filename + "_overlay.png";
name_ellipse = filename + "_ellipse.png";
name_original = replace(filename, "_watershed.tif", ".tif");
open(original + name_original);
run("RGB Color");
open(output + name_overlay);
run("RGB Color");
open(output + name_outline);
run("RGB Color");
open(output + name_ellipse);
run("RGB Color");
run("Combine...", "stack1=filename stack2=name_overlay");
rename("combinedstack01");
run("Combine...", "stack1=name_outline stack2=name_ellipse");
rename("combinedstack02");
run("Combine...", "stack1=combinedstack01 stack2=combinedstack02");
saveAs("PNG", combined + filename + "_comb.png");
run("Close All");
}