0

I am trying to record a macro on Fiji (ImageJ). I cannot find how to introduce the use of the mouse for a ROI rectangular selection. The macro keeps the registered position, in the example (2290, 1224 , 160, 314). I want them to be different for each image. If possible to draw the ROI rectangle with the mouse for each new image. Thanks !

setOption("BlackBackground", false);
run("Make Binary");
run("ROI Manager...");
makeRectangle(2290, 1224, 160, 314);
run("Strahler Analysis", "max.=6 output=[Color Map (CM)] protect method=[shortest branch]");
selectWindow("StrahlerMask_7502.jpg");
saveAs("Jpeg", "/home/StrahlerMask_7502.jpg");
4

1 回答 1

2

使用waitForUser(string)宏功能。

例如:

setOption("BlackBackground", false);
run("Make Binary");
waitForUser("Please create a selection to indicate\nthe root for Strahler Analysis, then\nclick OK to proceed.");
run("Strahler Analysis", "max.=6 output=[Color Map (CM)] protect method=[shortest branch]");
selectWindow("StrahlerMask_7502.jpg");
saveAs("Jpeg", "/home/StrahlerMask_7502.jpg");
于 2015-06-20T20:18:12.193 回答