@Test public void distanceRectangle() { KernelJAI kernel = KernelFactory.createRectangle( RECTW, RECTH, KernelFactory.ValueType.DISTANCE, RECT_KEYX, RECT_KEYY); Evaluator e = new Evaluator() { public float eval(int maskValue, double dist2) { if (maskValue == 0) { return 0; } else { return (float) Math.sqrt(dist2); } } }; assertKernel(kernel, RECT, e); }
public static KernelJAI createRectangle(int width, int height) { return createConstantRectangle(width, height, 1.0f); }
KernelFactory { public static KernelJAI createRectangle(int width, int height) { return createConstantRectangle(width, height, 1.0f); } }
KernelFactory { public static KernelJAI createRectangle(int width, int height) { return createConstantRectangle(width, height, 1.0f); }  }
KernelFactory { public static KernelJAI createRectangle(int width, int height) { return createConstantRectangle(width, height, 1.0f); }  static KernelJAI createCircle(int radius); static KernelJAI createConstantCircle(int radius, float value); static KernelJAI createCircle(int radius, ValueType type, float centreValue); static KernelJAI createCircle(int radius, ValueType type); static KernelJAI createAnnulus(int outerRadius, int innerRadius, ValueType type, float centreValue); static KernelJAI createConstantAnnulus(int outerRadius, int innerRadius, float value); static KernelJAI createAnnulus(int outerRadius, int innerRadius, ValueType type); static KernelJAI createRectangle(int width, int height); static KernelJAI createConstantRectangle(int width, int height, float value); static KernelJAI createConstantRectangle(int width, int height,
            int keyX, int keyY,  float value); static KernelJAI createRectangle(
            int width, int height, ValueType type, int keyX, int keyY, float keyValue); static KernelJAI createRectangle(
            int width, int height, ValueType type, int keyX, int keyY); static KernelJAI createFromShape(Shape shape, AffineTransform transform, ValueType type, int keyX, int keyY, float keyValue); }
KernelFactory { public static KernelJAI createRectangle(int width, int height) { return createConstantRectangle(width, height, 1.0f); }  static KernelJAI createCircle(int radius); static KernelJAI createConstantCircle(int radius, float value); static KernelJAI createCircle(int radius, ValueType type, float centreValue); static KernelJAI createCircle(int radius, ValueType type); static KernelJAI createAnnulus(int outerRadius, int innerRadius, ValueType type, float centreValue); static KernelJAI createConstantAnnulus(int outerRadius, int innerRadius, float value); static KernelJAI createAnnulus(int outerRadius, int innerRadius, ValueType type); static KernelJAI createRectangle(int width, int height); static KernelJAI createConstantRectangle(int width, int height, float value); static KernelJAI createConstantRectangle(int width, int height,
            int keyX, int keyY,  float value); static KernelJAI createRectangle(
            int width, int height, ValueType type, int keyX, int keyY, float keyValue); static KernelJAI createRectangle(
            int width, int height, ValueType type, int keyX, int keyY); static KernelJAI createFromShape(Shape shape, AffineTransform transform, ValueType type, int keyX, int keyY, float keyValue);  }