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.
()
| 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) |
no test coverage detected