Skip to content

Commit 8369440

Browse files
committed
Update ROI Manager Tools for IJ 1.50b
The ROI Manager now uses an ArrayList instead of a HashTable to store ROIs, thus, multiple ROIs can now have the same name.
1 parent 13bc8ab commit 8369440

File tree

1 file changed

+12
-17
lines changed

1 file changed

+12
-17
lines changed

Tools/Toolsets/ROI Manager Tools.ijm

Lines changed: 12 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*
44
* ImageJ toolset that renames selections stored in the ROI Manager. Supersedes the
55
* 'Rename and Save ROI Set.txt' macro. Save this file in ImageJ/macros/toolsets/,
6-
* then use the '>>' drop down menu to activate it. Requires IJ 1.49 or newer.
6+
* then use the '>>' drop down menu to activate it. Requires IJ 1.50b or newer.
77
*
88
* TF, 2015.08, Change log: See https://github.com/tferr/Scripts/releases
99
*/
@@ -14,7 +14,7 @@ var suffixs= getPrefList("suffixes");
1414
var oldstr= "", newstr= "", usenames;
1515

1616
macro "AutoRun" {
17-
requires("1.49v");
17+
requires("1.50b");
1818
setOption("Display label", true);
1919
run("ROI Manager...");
2020
}
@@ -43,11 +43,6 @@ macro "Settings Menu Tool - C037D3eD4eD5eD6bD6cD6dD7aD89D98Da7Db6Dc6Dd6De4De5D2a
4343
+"\"<tt>[0-9&&[^1]]\</tt>\" to find a digit that is not 1, or \"<tt>-.*-\</tt>\" to "
4444
+"find<br>any character sequence flanked by hyphens. You may need to<br>"
4545
+"escape metacharacters ('.', '[', ']', '^', '$', etc.) by a backslash.";
46-
if (rplc) {
47-
help+= "<br><br>"
48-
+"Note that replaced patterns should always give rise to unique<br>"
49-
+"names as the ROI Manager cannot cope with duplicated entries.";
50-
}
5146
Dialog.create(cmd);
5247
Dialog.addString("Find:", oldstr, 18);
5348
if (rplc)
@@ -143,18 +138,18 @@ macro "Save all regions Menu Tool - C037D11D12D13D14D15D16D17D18D19D1aD1bD1cD21D
143138
}
144139

145140
macro "Help Action Tool - C037T3e16?" {
146-
help= "<html>The ROI Manager <i>Rename...</i> command cannot rename multiple ROIs, requiring user<br>"
147-
+"input each time it is used. This set of tools addresses this issue by using 3 types of<br>"
148-
+"predefined labels: \"Tags\", \"Prefixes\" and \"Suffixes\", specified in the <i>Settings</i> Menu.<br>"
149-
+"Tags rename ROIs, prefixes and suffixes are appended to the listed name.<br><br>"
141+
help= "<html>The ROI Manager <i>Rename...</i> command requires user input each time it is used,<br>"
142+
+"becoming combersome when working with multip ROIs. This set of tools addresses<br>"
143+
+"this issue by using 3 types of predefined labels: \"Tags\", \"Prefixes\" and \"Suffixes\",<br>"
144+
+"specified in the <i>Settings</i> Menu. Tags rename ROIs, prefixes and suffixes are<br>"
145+
+"appended to the ROI name.<br><br>"
150146
+"To rename multiple ROIs, press <i>Deselect</i> in the ROI Manager, and choose a label<br>"
151-
+"from one of menus. Alternatively, choose <i>Rename by pattern...</i> from the Settings<br>"
152-
+"menu. In both cases, you can specify the Range of ROIs to be renamed, as when<br>"
147+
+"from one of menus. Alternatively, choose <i>Rename by pattern...</i> from the <i>Settings</i><br>"
148+
+"menu. In both cases, you can specify the range of ROIs to be renamed, as when<br>"
153149
+"using the ROI Manager <i>Properties...</i> command.<br><br>"
154-
+"To rename single ROIs, use the <i>Selection cycler</i> to walk through the listed ROIs one<<br>"
155-
+"item at a time.<br><br>"
156-
+"Use the <i>Save</i> menu to store all ROIs in a .zip file named after the active image.<br><br>"
157-
+"You may need to stretch the ROI Manager window to accommodate long ROI names.";
150+
+"To rename single ROIs, use the <i>Selection cycler</i> to walk through the listed ROIs<br>"
151+
+"one item at a time.<br><br>"
152+
+"Use the <i>Save</i> menu to store all ROIs in a .zip file named after the active image.";
158153
showMessage("ROI Manager Tools", help);
159154
}
160155

0 commit comments

Comments
 (0)