Last active
May 5, 2019 20:41
-
-
Save mutterer/7ecd19ff60c4db3b1c32cd2568986dcd to your computer and use it in GitHub Desktop.
An ImageJ macro for movie annotation, that overlays customisable reticles at each multipoint point, one per slice
This file contains 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
Overlay.remove; | |
n = roiManager('count'); | |
for (i=0; i<n; i++) { | |
roiManager('select', i); | |
getSelectionCoordinates(x,y); | |
addCross(9,12,1,'green'); | |
} | |
Overlay.show; | |
run ("Select None"); | |
exit(); | |
// id: inner diameter | |
// od: outer diameter | |
// w: line width | |
// col: color | |
function addCross(id,od,w,col) { | |
addTick(0,0,id,od,w,col); | |
addTick(0,0,-1*id,-1*od,w,col); | |
addTick(id,od,0,0,w,col); | |
addTick(-1*id,-1*od,0,0,w,col); | |
} | |
function addTick(x0,x1,y0,y1,w,col) { | |
makeLine(x[0]+x0,y[0]+y0,x[0]+x1,y[0]+y1); | |
run("Add Selection...", "stroke=&col width=&w"); | |
Overlay.setPosition(i+1); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment