List of usage examples for java.awt.image DataBufferDouble DataBufferDouble
public DataBufferDouble(double[][] dataArray, int size)
From source file:org.esa.nest.gpf.ERSCalibrator.java
private static RenderedImage createRenderedImage(final double[] array, final int width, final int height) { // create rendered image with demension being width by height final SampleModel sampleModel = RasterFactory.createBandedSampleModel(DataBuffer.TYPE_DOUBLE, width, height, 1);/*from w w w . j a v a2 s. co m*/ final ColorModel colourModel = PlanarImage.createColorModel(sampleModel); final DataBufferDouble dataBuffer = new DataBufferDouble(array, array.length); final WritableRaster raster = RasterFactory.createWritableRaster(sampleModel, dataBuffer, new Point(0, 0)); return new BufferedImage(colourModel, raster, false, new Hashtable()); }
From source file:org.esa.nest.gpf.GCPSelectionOp.java
private static RenderedImage createRenderedImage(final double[] array, final int w, final int h) { // create rendered image with demension being width by height final SampleModel sampleModel = RasterFactory.createBandedSampleModel(DataBuffer.TYPE_DOUBLE, w, h, 1); final ColorModel colourModel = PlanarImage.createColorModel(sampleModel); final DataBufferDouble dataBuffer = new DataBufferDouble(array, array.length); final WritableRaster raster = RasterFactory.createWritableRaster(sampleModel, dataBuffer, new Point(0, 0)); return new BufferedImage(colourModel, raster, false, new Hashtable()); }
From source file:org.esa.nest.gpf.oceantools.WindFieldEstimationOp.java
private static RenderedImage createRenderedImage(double[] array, int width, int height) { // create rendered image with demension being width by height final SampleModel sampleModel = RasterFactory.createBandedSampleModel(DataBuffer.TYPE_DOUBLE, width, height, 1);//from w w w . j a v a2s. c om final ColorModel colourModel = PlanarImage.createColorModel(sampleModel); final DataBufferDouble dataBuffer = new DataBufferDouble(array, array.length); final WritableRaster raster = RasterFactory.createWritableRaster(sampleModel, dataBuffer, new Point(0, 0)); return new BufferedImage(colourModel, raster, false, new Hashtable()); }
From source file:org.esa.s1tbx.insar.gpf.coregistration.CrossCorrelationOp.java
private static RenderedImage createRenderedImage(final double[] array, final int w, final int h) { // create rendered image with dimension being width by height final SampleModel sampleModel = RasterFactory.createBandedSampleModel(DataBuffer.TYPE_DOUBLE, w, h, 1); final ColorModel colourModel = PlanarImage.createColorModel(sampleModel); final DataBufferDouble dataBuffer = new DataBufferDouble(array, array.length); final WritableRaster raster = RasterFactory.createWritableRaster(sampleModel, dataBuffer, new Point(0, 0)); return new BufferedImage(colourModel, raster, false, new Hashtable()); }