final int it = target.get( x, y ); final double f = alpha.getPixelInterpolated( t[ 0 ], t[ 1 ] ) / 255.0; final double v = it + f * ( is - it );
private void normalizeResult(ShortProcessor distMap, ImageProcessor labelImage) { this.fireStatusChanged(new AlgoEvent(this, "Normalization")); // size of image int sizeX = labelImage.getWidth(); int sizeY = labelImage.getHeight(); // normalization weight int w0 = weights[0]; for (int y = 0; y < sizeY; y++) { for (int x = 0; x < sizeX; x++) { if ((int) labelImage.getf(x, y) > 0) { distMap.set(x, y, distMap.get(x, y) / w0); } } } } }
private void normalizeResult(ShortProcessor distMap, ImageProcessor labelImage) { this.fireStatusChanged(new AlgoEvent(this, "Normalization")); // size of image int sizeX = labelImage.getWidth(); int sizeY = labelImage.getHeight(); // normalization weight int w0 = weights[0]; for (int y = 0; y < sizeY; y++) { for (int x = 0; x < sizeX; x++) { if ((int) labelImage.getf(x, y) > 0) { distMap.set(x, y, distMap.get(x, y) / w0); } } } } }