This started out as work on a "Random" operation to generate images with random values via objects that implement a RandomGenerator interface. However, I now realize that the same scheme can be used to generate systematic data (e.g. gradients and other patterns). JAI ImageFunction can be used to do this for float and double images but it would be nice to have something more flexible, easier to use and capable of supporting all image data types.
The idea is to have a simple Generator interface something like:
public interface Generator {
ImageDataType getType();
Number getValue(int imageX, int imageY);
}
Passing the image coordinates to the getValue method allows, for instance, spatially auto-correlated random values to be generated easily.
The operation will take three args:
width
height
generators
where the generators arg can be either a single Generator object or an array of objects (one for each band of the result image).
This started out as work on a "Random" operation to generate images with random values via objects that implement a RandomGenerator interface. However, I now realize that the same scheme can be used to generate systematic data (e.g. gradients and other patterns). JAI ImageFunction can be used to do this for float and double images but it would be nice to have something more flexible, easier to use and capable of supporting all image data types.
The idea is to have a simple Generator interface something like:
Passing the image coordinates to the getValue method allows, for instance, spatially auto-correlated random values to be generated easily.
The operation will take three args:
where the generators arg can be either a single Generator object or an array of objects (one for each band of the result image).