ColorThresholdのMacroをはしらせたところで生成された文の、min[0~2],max[0~2]に定数or変数入れれば良さそう。(長いですね)
以下、Macroに自動生成された文
// Color Thresholder 1.49v
// Autogenerated macro, single images only!
min=newArray(3);
max=newArray(3);
filter=newArray(3);
a=getTitle();
run("HSB Stack");
run("Convert Stack to Images");
selectWindow("Hue");
rename("0");
selectWindow("Saturation");
rename("1");
selectWindow("Brightness");
rename("2");
min[0]=0;//HueのMin
max[0]=255;//HueのMax
filter[0]="pass";
min[1]=0;//SaturationのMin
max[1]=255;//SaturationのMax
filter[1]="pass";
min[2]=145;//BrightnessのMin
max[2]=255;//BrightnessのMax
filter[2]="pass";
for (i=0;i<3;i++){
selectWindow(""+i);
setThreshold(min[i], max[i]);
run("Convert to Mask");
if (filter[i]=="stop") run("Invert");
}
imageCalculator("AND create", "0","1");
imageCalculator("AND create", "Result of 0","2");
for (i=0;i<3;i++){
selectWindow(""+i);
close();
}
selectWindow("Result of 0");
close();
selectWindow("Result of Result of 0");
rename(a);
// Colour Thresholding------------- |
|