(String dir, String name)
| 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 | } |