Example #1
0
 /**
  * Creates a new polygon or polyline ROI from float x and y arrays. Type must be Roi.POLYGON,
  * Roi.FREEROI, Roi.POLYLINE, Roi.FREELINE or Roi.ANGLE.
  */
 public PolygonRoi(float[] xPoints, float[] yPoints, int nPoints, int type) {
   super(0, 0, null);
   init1(nPoints, type);
   xpf = xPoints;
   ypf = yPoints;
   subPixel = true;
   xp2 = new int[nPoints];
   yp2 = new int[nPoints];
   init2(type);
 }
Example #2
0
 /**
  * Creates a new polygon or polyline ROI from float x and y arrays. Type must be Roi.POLYGON,
  * Roi.FREEROI, Roi.POLYLINE, Roi.FREELINE or Roi.ANGLE.
  */
 public PolygonRoi(float[] xPoints, float[] yPoints, int nPoints, int type) {
   super(0, 0, null);
   if (xPoints == null || yPoints == null) throw new IllegalArgumentException("Null argument");
   init1(nPoints, type);
   xpf = xPoints;
   ypf = yPoints;
   subPixel = true;
   xp2 = new int[nPoints];
   yp2 = new int[nPoints];
   init2(type);
 }
Example #3
0
 /**
  * Creates a new polygon or polyline ROI from x and y coordinate arrays. Type must be Roi.POLYGON,
  * Roi.FREEROI, Roi.TRACED_ROI, Roi.POLYLINE, Roi.FREELINE or Roi.ANGLE.
  */
 public PolygonRoi(int[] xPoints, int[] yPoints, int nPoints, int type) {
   super(0, 0, null);
   init1(nPoints, type);
   xp = xPoints;
   yp = yPoints;
   if (type != TRACED_ROI) {
     xp = new int[nPoints];
     yp = new int[nPoints];
     for (int i = 0; i < nPoints; i++) {
       xp[i] = xPoints[i];
       yp[i] = yPoints[i];
     }
   }
   xp2 = new int[nPoints];
   yp2 = new int[nPoints];
   init2(type);
 }
Example #4
0
 /**
  * Creates a new polygon or polyline ROI from x and y coordinate arrays. Type must be Roi.POLYGON,
  * Roi.FREEROI, Roi.TRACED_ROI, Roi.POLYLINE, Roi.FREELINE or Roi.ANGLE.
  */
 public PolygonRoi(int[] xPoints, int[] yPoints, int nPoints, int type) {
   super(0, 0, null);
   if (xPoints == null || yPoints == null) throw new IllegalArgumentException("null argument");
   if (nPoints < 1) throw new IllegalArgumentException("npoints<1");
   init1(nPoints, type);
   xp = xPoints;
   yp = yPoints;
   if (type != TRACED_ROI) {
     xp = new int[nPoints];
     yp = new int[nPoints];
     for (int i = 0; i < nPoints; i++) {
       xp[i] = xPoints[i];
       yp[i] = yPoints[i];
     }
   }
   xp2 = new int[nPoints];
   yp2 = new int[nPoints];
   init2(type);
 }