Last active
September 22, 2022 21:22
-
-
Save mutterer/3056cf0365e17c86accfb8513c5405a4 to your computer and use it in GitHub Desktop.
image overlay transparency adjustment tool
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
macro "Adjust Overlay Transparency Tool - C00cT0f20A" { | |
getCursorLoc(x, y, z, flags); | |
px=x; | |
while (flags&16>0) { | |
getCursorLoc(x, y, z, flags); | |
if (x!=px) { | |
Overlay.activateSelectionAndWait(Overlay.size-1); | |
run("Properties... ","opacity="+100*x/getWidth+" transparent"); | |
Overlay.removeSelection(Overlay.size-1); | |
Overlay.addSelection; | |
showStatus("Opacity: "+d2s(100*x/getWidth,0)); | |
px=x; | |
} | |
} | |
} | |
/* below code to obtain a sample image with overlay */ | |
/* | |
run("Blobs (25K)"); | |
id=getImageID; | |
run("Find Maxima...", "prominence=100 exclude light output=[Segmented Particles]"); | |
run("Analyze Particles...", "clear show=[Count Masks] exclude"); | |
rename('mask'); | |
run("Glasbey"); | |
run("RGB Color"); | |
changeValues(0xffffff, 0xffffff, 0); | |
selectImage(id); | |
run("Add Image...", "image=mask x=0 y=0 opacity=50 zero"); | |
close("\\Others"); | |
*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment