Deletes the current region of interest. Makes a copy of the ROI so it can be recovered by Edit/Selection/Restore Selection.
()
| 2299 | /** Deletes the current region of interest. Makes a copy of the ROI |
| 2300 | so it can be recovered by Edit/Selection/Restore Selection. */ |
| 2301 | public void deleteRoi() { |
| 2302 | if (roi==null) |
| 2303 | return; |
| 2304 | saveRoi(); |
| 2305 | if (!(IJ.altKeyDown()||IJ.shiftKeyDown())) { |
| 2306 | RoiManager rm = RoiManager.getRawInstance(); |
| 2307 | if (rm!=null) |
| 2308 | rm.deselect(roi); |
| 2309 | } |
| 2310 | if (roi!=null) |
| 2311 | roi.notifyListeners(RoiListener.DELETED); |
| 2312 | roi = null; |
| 2313 | if (ip!=null) |
| 2314 | ip.resetRoi(); |
| 2315 | draw(); |
| 2316 | } |
| 2317 | |
| 2318 | /** Removes the spatial scaling of this image. */ |
| 2319 | public void removeScale() { |
no test coverage detected