public static BufferedImage grayUnsigned(GrayI src, BufferedImage dst, int normalize) { dst = checkInputs(src, dst); if (src.getDataType().isSigned()) throw new IllegalArgumentException("Can only convert unsigned images."); for (int y = 0; y < src.height; y++) { for (int x = 0; x < src.width; x++) { int v = src.get(x, y); int rgb = 255 * v / normalize; dst.setRGB(x, y, rgb << 16 | rgb << 8 | rgb); } } return dst; }
public static BufferedImage grayUnsigned(GrayI src, BufferedImage dst, int normalize) { dst = checkInputs(src, dst); if (src.getDataType().isSigned()) throw new IllegalArgumentException("Can only convert unsigned images."); for (int y = 0; y < src.height; y++) { for (int x = 0; x < src.width; x++) { int v = src.get(x, y); int rgb = 255 * v / normalize; dst.setRGB(x, y, rgb << 16 | rgb << 8 | rgb); } } return dst; }
largeSumType = "long"; if( !type.isSigned() ) { isSigned = false; if( byte.class == primitiveType) {
GrayI srcInt = (GrayI) src; if (src.getDataType().isSigned()) { double max = GImageStatistics.maxAbs(srcInt); return colorizeSign(srcInt, dst, (int) max);
GrayI srcInt = (GrayI) src; if (src.getDataType().isSigned()) { double max = GImageStatistics.maxAbs(srcInt); return colorizeSign(srcInt, dst, (int) max);