Added Generate operator

1 view
Skip to first unread message

Michael Bedward

unread,
Jan 23, 2013, 1:26:56 AM1/23/13
to jai-...@googlegroups.com
Hello all,

To make it easier to write unit tests for RangeLookup and other things
I wanted an easy way of generating images with random data, gradients
etc. You can do this sort of thing with Jiffle (but only for double
images) or with an ImageFunction (float or double) but I wanted
something easy that would support all image data types and any number
of bands.

So, I've added a simple Generate operation. It takes three parameters:

image width
image height
generators

The generators param is either a single object, or an array of
objects, implementing a simple Generator interface. Presently, you
pass in one generator per destination image band but it might be more
convenient to change the interface so that a single Generator can
provide data for any number of bands.

There are some initial sources on master plus a demo program with
examples of generating a single band double image, and a three band
byte image:

https://github.com/mbedward/jaitools/blob/master/demo/src/main/java/org/jaitools/demo/generate/GenerateDemo.java

Let me know if you think this is useful or not.

Michael
Reply all
Reply to author
Forward
0 new messages