Skip to content

Instantly share code, notes, and snippets.

@craigmccauley
Last active September 11, 2019 18:21
Show Gist options
  • Save craigmccauley/952d7115d6457537939af2daca47e3c7 to your computer and use it in GitHub Desktop.
Save craigmccauley/952d7115d6457537939af2daca47e3c7 to your computer and use it in GitHub Desktop.
ImageJ Measure , increase size of box, measure again
//capture image
//resize + 1 on all sides
//capture image
run("Measure");
var rectangleX, rectangleY, rectangleWidth, rectangleHeight;
getSelectionBounds(rectangleX, rectangleY, rectangleWidth, rectangleHeight);
rectangleX -= 1;
rectangleY -= 1;
rectangleWidth += 2;
rectangleHeight +=2;
makeRectangle(rectangleX, rectangleY, rectangleWidth, rectangleHeight);
run("Measure");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment