private static void fillImageAsInt(TiledImage img, Number[] array, int width, int height) { int k = 0; for (int y = 0; y < height; y++) { for (int x = 0; x < width; x++) { img.setSample(x, y, 0, array[k++].intValue()); } } }
private static void fillImageAsByte(TiledImage img, Number[] array, int width, int height) { int k = 0; for (int y = 0; y < height; y++) { for (int x = 0; x < width; x++) { img.setSample(x, y, 0, array[k++].byteValue()); } } }
private static void fillImageAsInt(TiledImage img, Number[] array, int width, int height) { int k = 0; for (int y = 0; y < height; y++) { for (int x = 0; x < width; x++) { img.setSample(x, y, 0, array[k++].intValue()); } } }
private static void fillImageAsShort(TiledImage img, Number[] array, int width, int height) { int k = 0; for (int y = 0; y < height; y++) { for (int x = 0; x < width; x++) { img.setSample(x, y, 0, array[k++].shortValue()); } } }
private static void fillImageAsFloat(TiledImage img, Number[] array, int width, int height) { int k = 0; for (int y = 0; y < height; y++) { for (int x = 0; x < width; x++) { img.setSample(x, y, 0, array[k++].floatValue()); } } }
private static void fillImageAsShort(TiledImage img, Number[] array, int width, int height) { int k = 0; for (int y = 0; y < height; y++) { for (int x = 0; x < width; x++) { img.setSample(x, y, 0, array[k++].shortValue()); } } }
private static void fillImageAsShort(TiledImage img, Number[] array, int width, int height) { int k = 0; for (int y = 0; y < height; y++) { for (int x = 0; x < width; x++) { img.setSample(x, y, 0, array[k++].shortValue()); } } }
private static void fillImageAsByte(TiledImage img, Number[] array, int width, int height) { int k = 0; for (int y = 0; y < height; y++) { for (int x = 0; x < width; x++) { img.setSample(x, y, 0, array[k++].byteValue()); } } }
private static void fillImageAsDouble(TiledImage img, Number[] array, int width, int height) { int k = 0; for (int y = 0; y < height; y++) { for (int x = 0; x < width; x++) { img.setSample(x, y, 0, array[k++].doubleValue()); } } }
private static void fillImageAsDouble(TiledImage img, Number[] array, int width, int height) { int k = 0; for (int y = 0; y < height; y++) { for (int x = 0; x < width; x++) { img.setSample(x, y, 0, array[k++].doubleValue()); } } }
private static void fillImageAsInt(TiledImage img, Number[] array, int width, int height) { int k = 0; for (int y = 0; y < height; y++) { for (int x = 0; x < width; x++) { img.setSample(x, y, 0, array[k++].intValue()); } } }
private static void fillImageAsByte(TiledImage img, Number[] array, int width, int height) { int k = 0; for (int y = 0; y < height; y++) { for (int x = 0; x < width; x++) { img.setSample(x, y, 0, array[k++].byteValue()); } } }
private static void fillImageAsDouble(TiledImage img, Number[] array, int width, int height) { int k = 0; for (int y = 0; y < height; y++) { for (int x = 0; x < width; x++) { img.setSample(x, y, 0, array[k++].doubleValue()); } } }
private static void fillImageAsFloat(TiledImage img, Number[] array, int width, int height) { int k = 0; for (int y = 0; y < height; y++) { for (int x = 0; x < width; x++) { img.setSample(x, y, 0, array[k++].floatValue()); } } }
private static void fillImageAsShort(TiledImage img, Number[] array, int width, int height) { int k = 0; for (int y = 0; y < height; y++) { for (int x = 0; x < width; x++) { img.setSample(x, y, 0, array[k++].shortValue()); } } }
private static void fillImageAsFloat(TiledImage img, Number[] array, int width, int height) { int k = 0; for (int y = 0; y < height; y++) { for (int x = 0; x < width; x++) { img.setSample(x, y, 0, array[k++].floatValue()); } } }
private static void fillImageAsByte(TiledImage img, Number[] array, int width, int height) { int k = 0; for (int y = 0; y < height; y++) { for (int x = 0; x < width; x++) { img.setSample(x, y, 0, array[k++].byteValue()); } } }
protected TiledImage createRowValueImage() { TiledImage img = ImageUtilities.createConstantImage(IMG_WIDTH, IMG_WIDTH, 0.0); for (int y = 0; y < IMG_WIDTH; y++) { for (int x = 0; x < IMG_WIDTH; x++) { img.setSample(x, y, 0, y); } } return img; }
protected TiledImage createSequenceImage() { TiledImage img = ImageUtilities.createConstantImage(IMG_WIDTH, IMG_WIDTH, 0.0); int k = 0; for (int y = 0; y < IMG_WIDTH; y++) { for (int x = 0; x < IMG_WIDTH; x++) { img.setSample(x, y, 0, k++); } } return img; }
private void setSourceImage(Band sourceBand) { final TiledImage sourceImage = new TiledImage(0, 0, sourceBand.getSceneRasterWidth(), sourceBand.getSceneRasterHeight(), 0, 0, new SingleBandedSampleModel(DataBuffer.TYPE_INT, sourceBand.getSceneRasterWidth(), sourceBand.getSceneRasterHeight()), null); sourceImage.setSample(0, 0, 0, 123); sourceImage.setSample(1, 1, 0, 234); sourceImage.setSample(2, 2, 0, 345); sourceImage.setSample(3, 3, 0, 456); sourceBand.setSourceImage(sourceImage); }