/** * Creates an annular kernel (a doughnut). * The kernel width is {@code 2*outerRadius + 1}. * The kernel's key element is at position {@code x=outerRadius, y=outerRadius}. * <p> * Calling this method with {@code innerRadius == 0} is equivalent to * calling {@link #createCircle } * * @param outerRadius the radius of the annulus * @param innerRadius the radius of the 'hole' * @param type a {@link ValueType} constant * @param centreValue the value to assign to the kernel centre (key element) * * @return a new {@code KernelJAI} object * * @throws IllegalArgumentException if {@code outerRadius <= 0} or * {@code innerRadius >= outerRadius} * * @deprecated Please use {@link #createAnnulua(int, int, ValueType)} instead and * set the centre element value on the returned kernel if that is * required. */ public static KernelJAI createAnnulus(int outerRadius, int innerRadius, ValueType type, float centreValue) { KernelJAI kernel = createAnnulus(outerRadius, innerRadius, type); return KernelUtil.setElement(kernel, outerRadius, outerRadius, centreValue); }