/** * Creates a {@link RealMaskRealInterval} which wraps the given {@link Roi}. * * @param roi the Roi to be wrapped */ public IrregularPolylineRoiWrapper(final PolygonRoi roi) { this.roi = roi; if (!roi.isLine()) throw new IllegalArgumentException("Cannot wrap " + roi .getTypeAsString() + " as Polyline with non-zero width"); }
/** * Wraps an ImageJ 1.x {@link PolygonRoi} as an ImgLib2 {@link Polygon2D}. * * @param poly the {@code PolygonRoi} to be wrapped */ public PolygonRoiWrapper(final PolygonRoi poly) { super(poly); if (poly.getType() != Roi.POLYGON) throw new IllegalArgumentException( "Cannot wrap " + poly.getTypeAsString() + " as Polygon2D"); if (poly.isSplineFit()) throw new IllegalArgumentException("Cannot wrap " + "spline fitted polygons"); }
/** * Wraps an ImageJ 1.x {@link PolygonRoi} as an ImgLib2 {@link Polygon2D}. * * @param poly the {@code PolygonRoi} to be wrapped */ public UnmodifiablePolygonRoiWrapper(final PolygonRoi poly) { super(poly); if (poly.getType() != Roi.FREEROI && poly.getType() != Roi.TRACED_ROI) throw new IllegalArgumentException("Cannot wrap " + poly .getTypeAsString() + " as Polygon2D"); }
/** * Wraps an ImageJ 1.x {@link PolygonRoi} as an ImgLib2 {@link Polyline}. * * @param poly the {@code PolygonRoi} to be wrapped */ public PolylineRoiWrapper(final PolygonRoi poly) { super(poly); if (poly.getType() != Roi.POLYLINE) throw new IllegalArgumentException( "Cannot wrap " + poly.getTypeAsString() + " as Polyline"); if (poly.getStrokeWidth() != 0) throw new IllegalArgumentException( "Cannot wrap polylines with non-zero width"); if (poly.isSplineFit()) throw new IllegalArgumentException("Cannot wrap " + "spline fitted polylines"); }
/** * Wraps an ImageJ 1.x {@link PolygonRoi} as an ImgLib2 {@link Polyline}. * * @param poly the {@code PolygonRoi} to be wrapped */ public UnmodifiablePolylineRoiWrapper(final PolygonRoi poly) { super(poly); if (poly.getType() != Roi.FREELINE && poly.getType() != Roi.ANGLE) throw new IllegalArgumentException("Cannot wrap " + poly .getTypeAsString() + " as Polyline"); if (poly.getStrokeWidth() != 0) throw new IllegalArgumentException( "Cannot wrap polylines with non-zero width"); if (poly.isSplineFit()) throw new IllegalArgumentException("Cannot wrap " + "spline fitted polylines"); }
String st1 = roi.getTypeAsString(); String points = "1"; for (int i = 0; i < xCoordinates.length; i++){
String st1 = roi.getTypeAsString(); String points = "1"; for (int i = 0; i < xCoordinates.length; i++){