http://imagej.273.s1.nabble.com/Adding-to-the-Roi-Manager-with-a-name-tp5015947p5015949.html
> On Mar 18, 2016, at 11:24 PM, Stein Rørvik <
[hidden email]> wrote:
>
> A suggestion for an improvement to the macro language:
>
> roiManager("Add") adds the current ROI. To set a name for that, you need to retrieve the index and use the rename command.
> It would be a lot simpler if the "Add" command just could have a second otional parameter "Name".
>
> The code could then be
>
> roiManager("Add", "MyRoiName");
>
> instead of the current equivalent
>
> roiManager("Add");
> i = roiManager("count");
> roiManager("select", i);
> roiManager("rename", "MyRoiName”);
You can set the name of an ROI and add it to the ROI Manager with two lines of code: