// Sets the list of overlay ROIs as metadata so it can be // retrieved using the Image>Show Info command requires("1.43r"); overlay = getInfo('overlay'); if (overlay=="") { setMetadata('No Overlay'); run("Show Info..."); } else { // remove leading '[Roi' and tailing ']' // and dedicate one line for each ROI list = substring(overlay, 4, lengthOf(overlay)-1); list = replace(list, ', Roi', '\n'); setMetadata('Info', 'Overlay:\n' + list); run("Show Info..."); }