/** Inserts the pixels contained in 'data' into a horizontal line starting at (x,y). */ public void putRow(int x, int y, int[] data, int length) { for (int i=0; i<length; i++) putPixel(x++, y, data[i]); }
public void putColumn(ImageProcessor ip, int x, int y, float[] data, int length) { if (rgb) { for (int i=0; i<length; i++) ip.putPixel(x, y++, Float.floatToIntBits(data[i])); } else { for (int i=0; i<length; i++) ip.putPixelValue(x, y++, data[i]); } }
public void putRow(ImageProcessor ip, int x, int y, float[] data, int length) { if (rgb) { for (int i=0; i<length; i++) ip.putPixel(x++, y, Float.floatToIntBits(data[i])); } else { for (int i=0; i<length; i++) ip.putPixelValue(x++, y, data[i]); } }
/** Sets a pixel in the image using an int array of samples. RGB pixels have three samples, all others have one. */ public void putPixel(int x, int y, int[] iArray) { putPixel(x, y, iArray[0]); }
private void putColumn(final ImageProcessor ip, final int x, int y, final float[] data, final int length) { if (rgb) { for (int i = 0; i < length; i++) ip.putPixel(x, y++, Float.floatToIntBits(data[i])); } else { for (int i = 0; i < length; i++) ip.putPixelValue(x, y++, data[i]); } }
/** Inserts the pixels contained in 'data' into a column starting at (x,y). */ public void putColumn(int x, int y, int[] data, int length) { //if (x>=0 && x<width && y>=0 && (y+length)<=height) // ((ShortProcessor)this).putColumn2(x, y, data, length); //else for (int i=0; i<length; i++) putPixel(x, y++, data[i]); }
public void putRow(ImageProcessor ip, int x, int y, float[] data, int length) { if (rgb) { for (int i=0; i<length; i++) ip.putPixel(x++, y, Float.floatToIntBits(data[i])); } else { for (int i=0; i<length; i++) ip.putPixelValue(x++, y, data[i]); } }
/** Sets a pixel in the image using an int array of samples. RGB pixels have three samples, all others have one. */ public void putPixel(int x, int y, int[] iArray) { putPixel(x, y, iArray[0]); }
public void putColumn(ImageProcessor ip, int x, int y, float[] data, int length) { if (rgb) { for (int i=0; i<length; i++) ip.putPixel(x, y++, Float.floatToIntBits(data[i])); } else { for (int i=0; i<length; i++) ip.putPixelValue(x, y++, data[i]); } }
/** Inserts the pixels contained in 'data' into a column starting at (x,y). */ public void putColumn(int x, int y, int[] data, int length) { //if (x>=0 && x<width && y>=0 && (y+length)<=height) // ((ShortProcessor)this).putColumn2(x, y, data, length); //else for (int i=0; i<length; i++) putPixel(x, y++, data[i]); }
public void putRow(ImageProcessor ip, int x, int y, float[] data, int length) { if (rgb) { for (int i=0; i<length; i++) ip.putPixel(x++, y, Float.floatToIntBits(data[i])); } else { for (int i=0; i<length; i++) ip.putPixelValue(x++, y, data[i]); } }
public void putPixel(int x, int y, int value) { record("putPixel", new Object[] {new Integer(x), new Integer(y), new Integer(value)}, new Class[] {int.class, int.class, int.class}); proc.putPixel(x, y, value); }
private void putRow(final ImageProcessor ip, int x, final int y, final float[] data, final int length) { if (rgb) { for (int i = 0; i < length; i++) ip.putPixel(x++, y, Float.floatToIntBits(data[i])); } else { for (int i = 0; i < length; i++) ip.putPixelValue(x++, y, data[i]); } }
public void putPixel(int x, int y, int[] iArray) { record("putPixel", new Object[] {new Integer(x), new Integer(y), iArray}, new Class[] {int.class, int.class, int[].class}); proc.putPixel(x, y, iArray); }
public void putPixel(int x, int y, int[] iArray) { record("putPixel", new Object[] {new Integer(x), new Integer(y), iArray}, new Class[] {int.class, int.class, int[].class}); proc.putPixel(x, y, iArray); }
public void putPixel(int x, int y, int value) { record("putPixel", new Object[] {new Integer(x), new Integer(y), new Integer(value)}, new Class[] {int.class, int.class, int.class}); proc.putPixel(x, y, value); }
public ImageProcessor getMask() { if (cachedMask!=null && cachedMask.getPixels()!=null) return cachedMask; ImageProcessor mask = new ByteProcessor(width, height); for (int i=0; i<nPoints; i++) mask.putPixel((int)Math.round(xpf[i]), (int)Math.round(ypf[i]), 255); cachedMask = mask; return mask; }
public ImageProcessor getMask() { if (cachedMask!=null && cachedMask.getPixels()!=null) return cachedMask; ImageProcessor mask = new ByteProcessor(width, height); for (int i=0; i<nPoints; i++) mask.putPixel((int)Math.round(xpf[i]), (int)Math.round(ypf[i]), 255); cachedMask = mask; return mask; }
ImageProcessor shrink(ImageProcessor ip, ImageProcessor ip2, boolean hasEdgePixels) { if (hasEdgePixels) { int width = ip.getWidth(); int height = ip.getHeight(); for (int y=0; y<height; y++) for (int x=0; x<width; x++) ip.putPixel(x, y, ip2.getPixel(x+1, y+1)); } return ip; }
ImageProcessor shrink(ImageProcessor ip, ImageProcessor ip2, boolean hasEdgePixels) { if (hasEdgePixels) { int width = ip.getWidth(); int height = ip.getHeight(); for (int y=0; y<height; y++) for (int x=0; x<width; x++) ip.putPixel(x, y, ip2.getPixel(x+1, y+1)); } return ip; }