Last active
September 11, 2019 18:21
-
-
Save craigmccauley/952d7115d6457537939af2daca47e3c7 to your computer and use it in GitHub Desktop.
ImageJ Measure , increase size of box, measure again
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
//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