Skip to content

Instantly share code, notes, and snippets.

@mutterer
Created May 10, 2022 09:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mutterer/fceb6fd047b9cccdabd4c7bab977611b to your computer and use it in GitHub Desktop.
Save mutterer/fceb6fd047b9cccdabd4c7bab977611b to your computer and use it in GitHub Desktop.
a simplified IJ macro version of https://github.com/BIOP/ijp-LaRoMe
// a simplified IJ macro version of https://github.com/BIOP/ijp-LaRoMe
roiManager("reset");
run("Duplicate...","title=temp");
id=getImageID;
h=getHeight;
w=getWidth;
for (y=0;y<h;y++){
for (x=0;x<w;x++){
if (getPixel(x,y)>0) {
doWand(x,y);
roiManager("add");
setColor(0);
fill();
}
}
}
selectImage(id);
close();
roiManager("show all");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment