@Override public float get(float x, float y) { return (float)cp.getInterpolatedRGBPixel(x, y); } }
private float[] getLine(ImageProcessor ip, double x1, double y1, double x2, double y2, float[] data) { double dx = x2-x1; double dy = y2-y1; int n = (int)Math.round(Math.sqrt(dx*dx + dy*dy)); if (data==null) data = new float[n]; double xinc = dx/n; double yinc = dy/n; double rx = x1; double ry = y1; for (int i=0; i<n; i++) { if (rgb) { int rgbPixel = ((ColorProcessor)ip).getInterpolatedRGBPixel(rx, ry); data[i] = Float.intBitsToFloat(rgbPixel&0xffffff); } else data[i] = (float)ip.getInterpolatedValue(rx, ry); rx += xinc; ry += yinc; } return data; }
private float[] getLine(ImageProcessor ip, double x1, double y1, double x2, double y2, float[] data) { double dx = x2-x1; double dy = y2-y1; int n = (int)Math.round(Math.sqrt(dx*dx + dy*dy)); if (data==null) data = new float[n]; double xinc = dx/n; double yinc = dy/n; double rx = x1; double ry = y1; for (int i=0; i<n; i++) { if (notFloat) data[i] = (float)ip.getInterpolatedPixel(rx, ry); else if (rgb) { int rgbPixel = ((ColorProcessor)ip).getInterpolatedRGBPixel(rx, ry); data[i] = Float.intBitsToFloat(rgbPixel&0xffffff); } else data[i] = (float)ip.getInterpolatedValue(rx, ry); rx += xinc; ry += yinc; } return data; }
private float[] getLine(ImageProcessor ip, double x1, double y1, double x2, double y2, float[] data) { double dx = x2-x1; double dy = y2-y1; int n = (int)Math.round(Math.sqrt(dx*dx + dy*dy)); if (data==null) data = new float[n]; double xinc = dx/n; double yinc = dy/n; double rx = x1; double ry = y1; for (int i=0; i<n; i++) { if (notFloat) data[i] = (float)ip.getInterpolatedPixel(rx, ry); else if (rgb) { int rgbPixel = ((ColorProcessor)ip).getInterpolatedRGBPixel(rx, ry); data[i] = Float.intBitsToFloat(rgbPixel&0xffffff); } else data[i] = (float)ip.getInterpolatedValue(rx, ry); rx += xinc; ry += yinc; } return data; }
data[i] = (float) ip.getInterpolatedPixel(rx, ry); else if (rgb) { final int rgbPixel = ((ColorProcessor) ip).getInterpolatedRGBPixel( rx, ry); data[i] = Float.intBitsToFloat(rgbPixel & 0xffffff);
values[index] = (float)ip.getInterpolatedPixel(rx, ry); else if (rgb) { int rgbPixel = ((ColorProcessor)ip).getInterpolatedRGBPixel(rx, ry); values[index] = Float.intBitsToFloat(rgbPixel&0xffffff); } else
values[index] = (float)ip.getInterpolatedPixel(rx, ry); else if (rgb) { int rgbPixel = ((ColorProcessor)ip).getInterpolatedRGBPixel(rx, ry); values[index] = Float.intBitsToFloat(rgbPixel&0xffffff); } else
else if (rgb) { final int rgbPixel = ((ColorProcessor) ip) .getInterpolatedRGBPixel(rx, ry); values[index] = Float .intBitsToFloat(rgbPixel & 0xffffff);
regip.putPixel(x, y, ((ColorProcessor) ip).getInterpolatedRGBPixel(x - p[0], y - p[1]));