/** Returns {@code this} where {@code array/buffer[i] = b[offset:offset + length]} */ public abstract UByteIndexer put(long i, int[] b, int offset, int length); /** Returns {@code this} where {@code array/buffer[i * strides[0] + j] = b} */
/** Returns {@code this} where {@code array/buffer[i * strides[0] + j] = b[offset:offset + length]} */ public abstract UByteIndexer put(long i, long j, int[] b, int offset, int length); /** Returns {@code this} where {@code array/buffer[i * strides[0] + j * strides[1] + k] = b} */
/** Returns {@code this} where {@code array/buffer[index(indices)] = b[offset:offset + length]} */ public abstract UByteIndexer put(long[] indices, int[] b, int offset, int length);
@Override public UByteIndexer putDouble(long[] indices, double b) { return put(indices, (int)b); } }
private void erodePoints(boolean[] arrayToErode) { for (int i = 0; i < getWidth() * getHeight(); i++) { erosionIndexer.put(i, arrayToErode[i] ? 1 : 0); } cvErode(nativeArrayToErode, nativeArrayToErode); for (int i = 0; i < getWidth() * getHeight(); i++) { arrayToErode[i] = erosionIndexer.get(i) == 1; } }