final public int getPixelInterpolated(double x, double y) { if (interpolationMethod==BILINEAR) { if (x<0.0 || y<0.0 || x>=width-1 || y>=height-1) return 0; else return (int)Math.round(getInterpolatedPixel(x, y, pixels)); } else if (interpolationMethod==BICUBIC) { int value = (int)(getBicubicInterpolatedPixel(x, y, this)+0.5); if (value<0) value = 0; if (value>255) value = 255; return value; } else return getPixel((int)(x+0.5), (int)(y+0.5)); }
final public int getPixelInterpolated(double x, double y) { if (interpolationMethod==BILINEAR) { if (x<0.0 || y<0.0 || x>=width-1 || y>=height-1) return 0; else return (int)Math.round(getInterpolatedPixel(x, y, pixels)); } else if (interpolationMethod==BICUBIC) { int value = (int)(getBicubicInterpolatedPixel(x, y, this)+0.5); if (value<0) value = 0; if (value>255) value = 255; return value; } else return getPixel((int)(x+0.5), (int)(y+0.5)); }
case ImagePlus.GRAY8: { final ByteProcessor bp = (ByteProcessor) stack.getProcessor(z + 1); final int v = bp.getPixel(x, y); if (cm == null) { final float fv = v / 255.0f; case ImagePlus.COLOR_256: { final ByteProcessor bp = (ByteProcessor) stack.getProcessor(z + 1); final int v = bp.getPixel(x, y); result[i] = new Color3f((reds[v] & 0xFF) / 255.0f,