org.intamap.generators
Class ImageGenerator

java.lang.Object
  extended by org.intamap.generators.ImageGenerator

public class ImageGenerator
extends Object

Generates image(s) from an interpolate response representing each of the sets of predicted values. The colour scheme of the images can be modified.

Author:
Richard Jones

Constructor Summary
ImageGenerator()
          Creates a new image generator with the default colour.
ImageGenerator(Colour colour)
          Creates a new image generator with the given colour.
 
Method Summary
 BufferedImage generateImage(InterpolateResponse response, org.uncertml.statistics.Statistic statistic)
          Generates an image for a single set of predicted values using min/max values derived from the range of the set.
 BufferedImage generateImage(InterpolateResponse response, org.uncertml.statistics.Statistic statistic, double min, double max)
          Generates an image for a single set of predicted values using the given min/max values.
 Map<org.uncertml.statistics.Statistic,BufferedImage> generateImages(InterpolateResponse response)
          Generates images for each set of predicted values using min/max values derived from the range of each set.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ImageGenerator

public ImageGenerator()
Creates a new image generator with the default colour.


ImageGenerator

public ImageGenerator(Colour colour)
Creates a new image generator with the given colour.

Parameters:
colour - the colour
Method Detail

generateImage

public BufferedImage generateImage(InterpolateResponse response,
                                   org.uncertml.statistics.Statistic statistic)
                            throws GeneratorException
Generates an image for a single set of predicted values using min/max values derived from the range of the set.

Parameters:
response - the interpolate response to generate the image from
statistic - the predicted values statistic to generate the image for
Returns:
the generated image
Throws:
GeneratorException - if the domain in the response is not a grid or does not contain any statistics

generateImage

public BufferedImage generateImage(InterpolateResponse response,
                                   org.uncertml.statistics.Statistic statistic,
                                   double min,
                                   double max)
                            throws GeneratorException
Generates an image for a single set of predicted values using the given min/max values.

Parameters:
response - the interpolate response to generate the image from
statistic - the predicted values statistic to generate the image for
min - the minimum value
max - the maximum value
Returns:
the generated image
Throws:
GeneratorException - if the domain in the response is not a grid or does not contain any statistics

generateImages

public Map<org.uncertml.statistics.Statistic,BufferedImage> generateImages(InterpolateResponse response)
                                                                    throws GeneratorException
Generates images for each set of predicted values using min/max values derived from the range of each set.

Parameters:
response - the interpolate response to generate images from
Returns:
a map containing the images generated, where the key for each image is the predicted values statistic
Throws:
GeneratorException - if the domain in the response is not a grid or does not contain any statistics