artofillusion.image
Class ComplexImage

java.lang.Object
  extended by artofillusion.image.ComplexImage

public class ComplexImage
extends java.lang.Object

This class stores an image, with optional additional floating point values for each pixel. It is intended to be extensible, so that as features are added to the renderers, the amount of information available for each pixel can grow.


Field Summary
static int ALPHA
           
static int BLUE
           
static int DEPTH
           
static int GREEN
           
static int NOISE
           
static int OBJECT
           
static int RED
           
 
Constructor Summary
ComplexImage(java.awt.Image image)
          Construct a ComplexImage which wraps an Image object.
 
Method Summary
 ComplexImage duplicate()
          Create a duplicate of this object.
 int getHeight()
          Get the height of the image.
 java.awt.Image getImage()
          Get the Image object.
 float getPixelComponent(int x, int y, int component)
          Get the floating point value of a component for a pixel.
 int getWidth()
          Get the width of the image.
 boolean hasFloatData(int component)
          Determine whether floating point data is available for a particular component.
 void rebuildImage()
          Rebuild the Image from the floating point components.
 void setComponentValues(int component, float[] values)
          Set the floating point values of a particular component for each pixel.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

BLUE

public static final int BLUE
See Also:
Constant Field Values

GREEN

public static final int GREEN
See Also:
Constant Field Values

RED

public static final int RED
See Also:
Constant Field Values

ALPHA

public static final int ALPHA
See Also:
Constant Field Values

DEPTH

public static final int DEPTH
See Also:
Constant Field Values

OBJECT

public static final int OBJECT
See Also:
Constant Field Values

NOISE

public static final int NOISE
See Also:
Constant Field Values
Constructor Detail

ComplexImage

public ComplexImage(java.awt.Image image)
Construct a ComplexImage which wraps an Image object.

Method Detail

setComponentValues

public void setComponentValues(int component,
                               float[] values)
Set the floating point values of a particular component for each pixel. The length of the value array should be equal to the number of pixels in the image, and the values should be ordered by rows.


getWidth

public int getWidth()
Get the width of the image.


getHeight

public int getHeight()
Get the height of the image.


getImage

public java.awt.Image getImage()
Get the Image object.


hasFloatData

public boolean hasFloatData(int component)
Determine whether floating point data is available for a particular component.


getPixelComponent

public float getPixelComponent(int x,
                               int y,
                               int component)
Get the floating point value of a component for a pixel.


duplicate

public ComplexImage duplicate()
Create a duplicate of this object. The new ComplexImage will refer to the same Image object as the other, but all other fields will be cloned.


rebuildImage

public void rebuildImage()
Rebuild the Image from the floating point components. This should be called after the components have been modified.



Copyright © 1999-2011 by Peter Eastman.