static IBWImage iBWImageFromFunction(IF2_IntInt_Double f, int w, int h) { ret new IBWImage { public int getWidth() { ret w; } public int getHeight() { ret h; } public float getFloatPixel(int x, int y) { ret (float) f.get(x, y); } }; }