public final ProductData buildOutputProductData() { int widthCount = this.imageWidth + 2; int heightCount = this.imageHeight + 2; int[][] marker = buildMarkerMatrix(widthCount, heightCount); int elementCount = this.imageWidth * this.imageHeight; ProductData data = ProductData.createInstance(ProductData.TYPE_INT32, elementCount); for (int y = 1; y < heightCount - 1; y++) { for (int x = 1; x < widthCount - 1; x++) { int elementIndex = (this.imageWidth * (y - 1)) + (x - 1); data.setElemIntAt(elementIndex, marker[y][x]); //result.setValueAt(y-1, x-1, marker[y][x]); } } WeakReference<int[][]> referenceMarkerMatrix = new WeakReference<int[][]>(marker); referenceMarkerMatrix.clear(); return data; }
this.productData.setElemIntAt(sceneWidth * y + x, segmentationPixelValue);
final double v = srcBuffer.getElemDoubleAt(srcIndex.getIndex(tx)); if (noDataValue.equals(v)) { trgData.setElemIntAt(trgIndex.getIndex(tx), 0); continue; final double threshold = backgroundMean / kInLinearScale; if (v < threshold) { trgData.setElemIntAt(trgIndex.getIndex(tx), 1); } else { trgData.setElemIntAt(trgIndex.getIndex(tx), 0);
trgData.setElemIntAt(trgIndex.getIndex(tx), 0); continue; trgData.setElemIntAt(trgIndex.getIndex(tx), 0); continue; trgData.setElemIntAt(trgIndex.getIndex(tx), 1); } else { trgData.setElemIntAt(trgIndex.getIndex(tx), 0);
destStride = (h - r - 1) * w; for (int c = 0; c < w; c++) { destBuffer.setElemIntAt(destStride + c, dArray[srcStride + c]); destStride = (h - r) * w; for (int c = 0; c < w; c++) { destBuffer.setElemIntAt(destStride - c - 1, dArray[srcStride + c]);
destStride = (h - r - 1) * w; for (int c = 0; c < w; c++) { destBuffer.setElemIntAt(destStride + c, dArray[srcStride + c]); destStride = (h - r) * w; for (int c = 0; c < w; c++) { destBuffer.setElemIntAt(destStride - c - 1, dArray[srcStride + c]);
final int y = (int) pixel.y; if (x >= tx0 && x < tx0 + tw && y >= ty0 && y < ty0 + th) { trgData.setElemIntAt(targetTile.getDataBufferIndex(x, y), 1);
trgIndex.calculateStride(y); for (int x = tx0; x < maxX; ++x) { targetData.setElemIntAt(trgIndex.getIndex(x), mask[y][x]);
} else { if (isInt) trgData.setElemIntAt(tx - trgOffset, srcData.getElemIntAt(sx - srcOffset)); else trgData.setElemDoubleAt(tx - trgOffset, srcData.getElemDoubleAt(sx - srcOffset));
destStride = r * w + w; for (int c = 0; c < w; c++) { destBuffer.setElemIntAt(destStride - c - 1, dArray[srcStride + c]);
destStride = r * w + w; for (int c = 0; c < w; c++) { destBuffer.setElemIntAt(destStride - c - 1, dArray[srcStride + c]);
break; destBuffer.setElemIntAt(i, dataBuffer.getElem(i));