Skip to content

Instantly share code, notes, and snippets.

@cwood1967
Created October 21, 2016 15:19
Show Gist options
  • Save cwood1967/1b8670bf4da011b736a26b72837c5f43 to your computer and use it in GitHub Desktop.
Save cwood1967/1b8670bf4da011b736a26b72837c5f43 to your computer and use it in GitHub Desktop.
How to draw an ROI
private void drawRoi(double x, double y) {
int x0 = (int)x - roiSize/2;
int y0 = (int)y - roiSize/2;
Roi roi = new Roi(x0, y0, roiSize, roiSize);
manager.add(imp, roi, 1);
manager.runCommand(imp, "Show All");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment