MCPcopy Create free account
hub / github.com/AstroImageJ/astroimagej / openRoi

Method openRoi

ij/src/main/java/ij/plugin/RoiReader.java:33–45  ·  view source on GitHub ↗
(String dir, String name)

Source from the content-addressed store, hash-verified

31 }
32
33 public void openRoi(String dir, String name) throws IOException {
34 String path = dir+name;
35 RoiDecoder rd = new RoiDecoder(path);
36 Roi roi = rd.getRoi();
37 Rectangle r = roi.getBounds();
38 ImagePlus img = WindowManager.getCurrentImage();
39 if (img==null || img.getWidth()<(r.x+r.width) || img.getHeight()<(r.y+r.height)) {
40 ImageProcessor ip = new ByteProcessor(r.x+r.width+10, r.y+r.height+10);
41 img = new ImagePlus(name, ip);
42 img.show();
43 }
44 img.setRoi(roi);
45 }
46
47}

Callers 1

runMethod · 0.95

Calls 7

getRoiMethod · 0.95
getBoundsMethod · 0.95
getCurrentImageMethod · 0.95
getWidthMethod · 0.95
getHeightMethod · 0.95
showMethod · 0.95
setRoiMethod · 0.95

Tested by

no test coverage detected