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

Method trySimplify

ij/src/main/java/ij/gui/ShapeRoi.java:519–522  ·  view source on GitHub ↗

Attempts to convert this ShapeRoi into a single non-composite Roi. For showing as a Roi, one should apply copyAttributes @return an ij.gui.Roi object, which is either the non-composite roi, or this ShapeRoi (if such a conversion is not possible) or null if this is an empty roi.

()

Source from the content-addressed store, hash-verified

517 * this is an empty roi.
518 */
519 public Roi trySimplify() {
520 Roi roi = shapeToRoi();
521 return (roi==null) ? this : roi;
522 }
523
524 /**Implements the rules of conversion from <code>java.awt.geom.GeneralPath</code> to <code>ij.gui.Roi</code>.
525 * @param nSegments The number of segments that compose the path (= number of vertices for a polygon)

Callers 6

combineRoisMethod · 0.95
andMethod · 0.95
getRoiMethod · 0.95
getInverseMethod · 0.95
modifyRoiMethod · 0.95
xorMethod · 0.95

Calls 1

shapeToRoiMethod · 0.95

Tested by

no test coverage detected