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

Method getPolygon

ij/src/main/java/ij/gui/Roi.java:589–601  ·  view source on GitHub ↗

Returns the outline of this selection as a Polygon. @see ij.process.ImageProcessor#setRoi @see ij.process.ImageProcessor#drawPolygon @see ij.process.ImageProcessor#fillPolygon

()

Source from the content-addressed store, hash-verified

587 @see ij.process.ImageProcessor#fillPolygon
588 */
589 public Polygon getPolygon() {
590 int[] xpoints = new int[4];
591 int[] ypoints = new int[4];
592 xpoints[0] = x;
593 ypoints[0] = y;
594 xpoints[1] = x+width;
595 ypoints[1] = y;
596 xpoints[2] = x+width;
597 ypoints[2] = y+height;
598 xpoints[3] = x;
599 ypoints[3] = y+height;
600 return new Polygon(xpoints, ypoints, 4);
601 }
602
603 /** Returns the outline of this selection as a FloatPolygon */
604 public FloatPolygon getFloatPolygon() {

Callers 8

getCoordinatesMethod · 0.95
getStatisticsMethod · 0.95
fitCircleMethod · 0.95
areaToLineMethod · 0.95
saveXYCoordinatesMethod · 0.95
mouseReleasedMethod · 0.95
getFloatPolygonMethod · 0.95
cropMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected