macro "Add to ROI manager and outline in Overlay - Prefs" { /* Sets prefs for 'Add to ROI manager and outline in Overlay' script v230713: 1st version */ macroL = "Roi_Manager_Add_and_Outline_in_Overlay-Prefs_v230718.ijm"; saveSettings(); shadowChoices = newArray("black", "off-black", "dark_gray", "gray", "light_gray", "off-white", "white"); colorChoicesStd = newArray("red", "green", "blue", "cyan", "magenta", "yellow", "pink", "orange", "violet"); colorChoicesMod = newArray("garnet", "gold", "aqua_modern", "blue_accent_modern", "blue_dark_modern", "blue_modern", "blue_honolulu", "gray_modern", "green_dark_modern", "green_modern", "green_modern_accent", "green_spring_accent", "orange_modern", "pink_modern", "purple_modern", "red_n_modern", "red_modern", "tan_modern", "violet_modern", "yellow_modern"); colorChoicesNeon = newArray("jazzberry_jam", "radical_red", "wild_watermelon", "outrageous_orange", "supernova_orange", "atomic_tangerine", "neon_carrot", "sunglow", "laser_lemon", "electric_lime", "screamin'_green", "magic_mint", "blizzard_blue", "dodger_blue", "shocking_pink", "razzle_dazzle_rose", "hot_magenta"); colorChoices = Array.concat(colorChoicesStd, colorChoicesMod, colorChoicesNeon, shadowChoices); Dialog.create("Set prefs: " + macroL); Dialog.addChoice("Color of ROI overlay outline", colorChoices, call("ij.Prefs.get", "asc.roi.stroke.color","yellow")); Dialog.addNumber("Stroke width width of ROI overlay", parseInt(call("ij.Prefs.get", "asc.roi.stroke.width",1)), 0, 3, "pixels"); Dialog.addChoice("Gray of shadow overlay outline", Array.concat("none",shadowChoices), call("ij.Prefs.get", "asc.roi.shadow.color","none")); Dialog.addNumber("Shadow drop as multiplier of stroke width", parseInt(call("ij.Prefs.get", "asc.roi.shadowdrop.multiplier",1)), 0, 3, "multiplier"); Dialog.addChoice("Color of ROI overlay fill", Array.concat("none",colorChoices), call("ij.Prefs.get", "asc.roi.fill.color","none")); Dialog.addCheckbox("Confirmation beep",call("ij.Prefs.get", "asc.roi.confirm.beep",true)); Dialog.show(); strokeColor = Dialog.getChoice(); strokeWidth = Dialog.getNumber(); shadowColor = Dialog.getChoice(); shadowDropN = Dialog.getNumber(); fillColor = Dialog.getChoice(); confirmBeep = Dialog.getCheckbox(); call("ij.Prefs.set", "asc.roi.stroke.color",strokeColor); call("ij.Prefs.set", "asc.roi.stroke.width",strokeWidth); call("ij.Prefs.set", "asc.roi.confirm.beep",confirmBeep); call("ij.Prefs.set", "asc.roi.shadowdrop.multiplier",shadowDropN); call("ij.Prefs.set", "asc.roi.fill.color",fillColor); call("ij.Prefs.set", "asc.roi.prefs.macro",macroL);