org.jscience.computing.ai.util
Class ImageHelper

java.lang.Object
  extended by org.jscience.computing.ai.util.ImageHelper

public class ImageHelper
extends java.lang.Object

This utility class provides simple helper functions to aid image loading, saving and rendering within the Generation5 classes.


Constructor Summary
ImageHelper()
          Creates a new instance of ImageHelper
 
Method Summary
static void writeVisualizedImage(java.lang.String filename, int width, int height, Visualizable content)
          This function writes an image of a given Visualizable object.
static void writeVisualizedImage(java.lang.String filename, int width, int height, Visualizable content, boolean aa)
          This function writes an image of a given Visualizable object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ImageHelper

public ImageHelper()
Creates a new instance of ImageHelper

Method Detail

writeVisualizedImage

public static void writeVisualizedImage(java.lang.String filename,
                                        int width,
                                        int height,
                                        Visualizable content)
                                 throws java.io.IOException
This function writes an image of a given Visualizable object. The render function is called, rendering the image on to a graphics context before being written to an image.

Parameters:
filename - filename of the image to write
width - the width of the image in pixels
height - the height of the image in pixels
content - the visualizable content
Throws:
java.io.IOException - this exception is thrown by the javax.imageio classes if there is a problem writing the image
See Also:
Visualizable

writeVisualizedImage

public static void writeVisualizedImage(java.lang.String filename,
                                        int width,
                                        int height,
                                        Visualizable content,
                                        boolean aa)
                                 throws java.io.IOException
This function writes an image of a given Visualizable object. The render function is called, rendering the image on to a graphics context before being written to an image.

Parameters:
filename - filename of the image to write
width - the width of the image in pixels
height - the height of the image in pixels
content - the visualizable content
aa - should anti-aliasing be used?
Throws:
java.io.IOException - this exception is thrown by the javax.imageio classes if there is a problem writing the image
See Also:
Visualizable