-
Notifications
You must be signed in to change notification settings - Fork 29
/
Copy pathROIBrushTool.txt
35 lines (25 loc) · 1010 Bytes
/
ROIBrushTool.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
var brushWidth = 10;
var leftClick=16, alt=9;
requires("1.37c");
print("ImageJ version:", call("ij.IJ.getVersion")); // same as getVersion()
print("java.version:", call("java.lang.System.getProperty", "java.version"));
print("user.home:", call("java.lang.System.getProperty", "user.home"));
print("user.dir:", call("java.lang.System.getProperty", "user.dir"));
print("Images URL:", call("ij.Prefs.getImagesURL"));
print("Plugins path:", call("ij.Menus.getPlugInsPath"));
macro "Roi Brush Tool - C111o11ff" {
requires("1.37c");
while (true) {
getCursorLoc(x, y, z, flags);
if (flags&leftClick==0) exit();
if (flags&alt==0){
call("ROIBrush_.label", x,y,z,flags,brushWidth);
}else{
call("ROIBrush_.unlabel", x,y,z,flags,brushWidth);
}
wait(10);
}
}
macro 'Roi Brush Tool Options...' {
brushWidth = getNumber("Roi Brush Width (pixels):", brushWidth);
}