有没有办法和#34; Stack Combine" 3个并排堆叠。
图像>筹码>工具>结合
并排支持2个堆栈的组合。解决这个问题的两种方法:
run("Combine...", "stack1=STAC1_NAME stack2=STACK2_NAME");
run("Combine...", "stack1=[Combined Stacks] stack2=STACK3_NAME");
是否有另一种方法可以做到这一点,因为例如并排组合20个堆栈。
已添加代码段/
//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");
}
答案 0 :(得分:1)
根据文件,没有:
http://imagej.net/Stack_Manipulation
http://imagej.net/Stack-slice_Manipulations
但是,您可以使用combine方法轻松批处理整个堆栈文件夹,请参阅:
http://imagej.net/Batch_Processing
这是一个示例宏
例如(调整路径! - 为此脚本命名堆栈'stack1','stack2',....):
input = "C:\\Users\\test\\Pictures\\combine";
open("C:\\Users\\test\\Pictures\\combine\\stack1.tif");
rename("combinedStack");
list = getFileList(input);
for (i = 1; i < list.length; i++){
open(list[i]);
title=getTitle();
run("Combine...", "stack1="+title+" stack2=combinedStack");
rename("combinedStack");
}