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

Method toBoundingBox

ij/src/main/java/ij/plugin/Selection.java:761–775  ·  view source on GitHub ↗
(ImagePlus imp)

Source from the content-addressed store, hash-verified

759 }
760
761 void toBoundingBox(ImagePlus imp) {
762 Roi roi = imp.getRoi();
763 if (roi==null) {
764 noRoi("To Bounding Box");
765 return;
766 }
767 if (!imp.okToDeleteRoi())
768 return;
769 Undo.setup(Undo.ROI, imp);
770 Rectangle r = roi.getBounds();
771 imp.deleteRoi();
772 Roi roi2 = new Roi(r.x, r.y, r.width, r.height);
773 transferProperties(roi, roi2);
774 imp.setRoi(roi2);
775 }
776
777 void addToRoiManager(ImagePlus imp) {
778 if (IJ.macroRunning() && Interpreter.isBatchModeRoiManager())

Callers 1

runMethod · 0.95

Calls 8

noRoiMethod · 0.95
setupMethod · 0.95
getBoundsMethod · 0.95
transferPropertiesMethod · 0.95
okToDeleteRoiMethod · 0.80
deleteRoiMethod · 0.80
getRoiMethod · 0.45
setRoiMethod · 0.45

Tested by

no test coverage detected