I’m running into a problem keeping an ROI from the Manager selected, when using a macro. It seems to be related to the “Update” command. Hopefully someone can tell me the fix.
The workflow is to Open ImageJ (1.52k), and a stored set of ROIs, then start a macro containing this simple coding:
//Getting set up for the session
waitForUser(“Open a JPEG image if there is not one open”);
run(“Duplicate…”, " ");
//Preparing area to be measured
waitForUser(“EITHER\n Place an existing ROI\n \n OR\n Create ROI and send to the ROI Manager (t)\n - Rename it”);
setBackgroundColor(0, 0, 0);
If a new ROI is created, there is no problem, the macro moves through the next steps. However, if an existing ROI is chosen, the message ‘Exactly one item in the list must be selected’ is generated at the “Update” step, and the originally selected ROI is no longer selected in the Manager. Why?
Would anyone have a solution for how to handle this?