Skip to content

Instantly share code, notes, and snippets.

View cwood1967's full-sized avatar

Chris Wood cwood1967

  • Stowers Institute
  • Kansas City, MO
View GitHub Profile
@cwood1967
cwood1967 / ClickForRoi.java
Created October 21, 2016 15:19
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");
}