private static void saveOverSampledComplexImage(final double[] overSampledRow, final int ty, final int tx0, final int tw, final int xSt, final double widthRatioByHeightRatio, final ProductData iData, final ProductData qData, final Tile iTargetTile) { int k = xSt * 2; for (int tx = tx0; tx < tx0 + tw; ++tx) { final int index = iTargetTile.getDataBufferIndex(tx, ty); iData.setElemDoubleAt(index, widthRatioByHeightRatio * overSampledRow[k++]); qData.setElemDoubleAt(index, widthRatioByHeightRatio * overSampledRow[k++]); } }
private static void copyLine2Of2(final float[] srcLine, final ProductData destBuffer, final int currentLineIndex, final int sourceStepX) { final int destLength = destBuffer.getNumElems(); final int srcLength = srcLine.length / 2; for (int x = currentLineIndex, i = 0; x < destLength && i < srcLength; ++x, i += sourceStepX) { destBuffer.setElemDoubleAt(x, srcLine[(i << 1) + 1]); } }
private static void copyLine1Of2(final float[] srcLine, final ProductData destBuffer, final int currentLineIndex, final int sourceStepX) { final int destLength = destBuffer.getNumElems(); final int srcLength = srcLine.length / 2; for (int x = currentLineIndex, i = 0; x < destLength && i < srcLength; ++x, i += sourceStepX) { destBuffer.setElemDoubleAt(x, srcLine[i << 1]); } }
private static void saveOverSampledComplexImage(final double[] overSampledRow, final int ty, final int tx0, final int tw, final int xSt, final double widthRatioByHeightRatio, final ProductData tgtData, final Tile targetTile) { int k = xSt * 2; for (int tx = tx0; tx < tx0 + tw; ++tx) { final double i = overSampledRow[k++]; final double q = overSampledRow[k++]; tgtData.setElemDoubleAt(targetTile.getDataBufferIndex(tx, ty), widthRatioByHeightRatio * Math.sqrt(i * i + q * q)); } }
private void saveToTargetBand(final Resampling.Index resamplingIndex, final ResamplingRaster[] slvResamplingRasters, final ProductData[] targetBuffers, final int tgtIdx) throws Exception { int i=0; for (ProductData targetBuffer : targetBuffers) { targetBuffer.setElemDoubleAt(tgtIdx, selectedResampling.resample(slvResamplingRasters[i], resamplingIndex)); ++i; } }
private static void copyLine1Of2(final short[] srcLine, final ProductData destBuffer, final int currentLineIndex, final int sourceStepX) { final int destLength = destBuffer.getNumElems(); final int srcLength = srcLine.length / 2; for (int x = currentLineIndex, i = 0; x < destLength && i < srcLength; ++x, i += sourceStepX) { destBuffer.setElemDoubleAt(x, srcLine[i << 1]); } }
private static void copyLine2Of2(final short[] srcLine, final ProductData destBuffer, final int currentLineIndex, final int sourceStepX) { final int destLength = destBuffer.getNumElems(); final int srcLength = srcLine.length / 2; for (int x = currentLineIndex, i = 0; x < destLength && i < srcLength; ++x, i += sourceStepX) { destBuffer.setElemDoubleAt(x, srcLine[(i << 1) + 1]); } }
public static void pushDoubleMatrix(DoubleMatrix data, Tile tile, Rectangle rect, int y0, int x0) { final ProductData samples = tile.getRawSamples(); // checkout final int width = (int) rect.getWidth(); for (int y = 0, rowIdx = y0; y < rect.getHeight(); y++, rowIdx++) { final int stride = y * width; for (int x = 0, columnIdx = x0; x < rect.getWidth(); x++, columnIdx++) { samples.setElemDoubleAt(stride + x, data.get(rowIdx, columnIdx)); } } tile.setRawSamples(samples); // commit samples.dispose(); }
public static void pushDoubleMatrix(FloatMatrix data, Tile tile, Rectangle rect) { final ProductData samples = tile.getRawSamples(); // checkout final int width = (int) rect.getWidth(); for (int y = 0, rowIdx = 0; y < rect.getHeight(); y++, rowIdx++) { final int stride = y * width; for (int x = 0, columnIdx = 0; x < rect.getWidth(); x++, columnIdx++) { samples.setElemDoubleAt(stride + x, (double) data.get(rowIdx, columnIdx)); } } tile.setRawSamples(samples); // commit samples.dispose(); }
is = r * w + c; id = r * w + w - c - 1; destBuffer.setElemDoubleAt(id, dArray[is]);
is = r * w + c; id = (h - r - 1) * w + c; destBuffer.setElemDoubleAt(id, dArray[is]);
sample = noDataValue; trgBuffer.setElemDoubleAt(trgIndex, sample); } catch (Exception e) { throw new OperatorException(e.getMessage()); trgBuffer.setElemDoubleAt(trgIndex, noDataValue); trgIndex.calculateStride(y); for (int x = targetRectangle.x; x < maxX; ++x, ++index) { trgBuffer.setElemDoubleAt(trgIndex.getIndex(x), noDataValue);
for (int tx = tx0; tx < maxx; tx++) { filteredValue = getFilteredValue(tx, ty, sourceRaster1, sourceRaster2, bandUnitType); trgData.setElemDoubleAt(targetTile.getDataBufferIndex(tx, ty), filteredValue);
demBuffer.setElemDoubleAt(index, alt);
trgData.setElemDoubleAt(trgIdx, dn);
targetData.setElemDoubleAt(trgIndex.getIndex(x), displacement);
destBuffer.setElemDoubleAt(destPos++, lineData.getElemDoubleAt(x * numBands + bandIndex));
destBuffer.setElemDoubleAt(destPos++, lineData.getElemDoubleAt(x));
targetData.setElemDoubleAt(trgIndex.getIndex(x), height);
destBuffer.setElemDoubleAt(destPos++, lineData.getElemDoubleAt(x * numBands + bandIndex));