artofillusion.image.filter
Class DepthOfFieldFilter

java.lang.Object
  extended by artofillusion.image.filter.ImageFilter
      extended by artofillusion.image.filter.DepthOfFieldFilter

public class DepthOfFieldFilter
extends ImageFilter

This is an image filter which blurs parts of an image to simulate a depth of field effect.


Constructor Summary
DepthOfFieldFilter()
           
 
Method Summary
 void filterImage(ComplexImage image, Scene scene, SceneCamera camera, CoordinateSystem cameraPos)
          Apply the filter to an image.
 Widget getConfigPanel(java.lang.Runnable changeCallback)
          Get a Widget with which the user can specify options for the filter.
 int getDesiredComponents()
          Get a list of all the image components required by this filter.
 java.lang.String getName()
          Get the name of this filter.
 Property[] getProperties()
          Get a list of Properties which affect the behavior of the filter.
 void initFromStream(java.io.DataInputStream in, Scene theScene)
          Reconstruct this filter from its serialized representation.
 void writeToStream(java.io.DataOutputStream out, Scene theScene)
          Write a serialized description of this filter to a stream.
 
Methods inherited from class artofillusion.image.filter.ImageFilter
copy, duplicate, getParameters, getParameterValues, getPropertyValue, setParameterValue, setPropertyValue
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DepthOfFieldFilter

public DepthOfFieldFilter()
Method Detail

getName

public java.lang.String getName()
Get the name of this filter.

Specified by:
getName in class ImageFilter

getDesiredComponents

public int getDesiredComponents()
Description copied from class: ImageFilter
Get a list of all the image components required by this filter. This should be a sum of the constants defined in ComplexImage. The renderer will attempt to provide all requested components, but some renderers may not support all components. The filter should therefore be prepared for the possibility that some components may be null (aside from the basic red, green, blue, and alpha components, which are always available).

Overrides:
getDesiredComponents in class ImageFilter

filterImage

public void filterImage(ComplexImage image,
                        Scene scene,
                        SceneCamera camera,
                        CoordinateSystem cameraPos)
Apply the filter to an image.

Specified by:
filterImage in class ImageFilter
Parameters:
image - the image to filter
scene - the Scene which was rendered to create the image
camera - the camera from which the Scene was rendered
cameraPos - the position of the camera in the scene

getProperties

public Property[] getProperties()
Description copied from class: ImageFilter
Get a list of Properties which affect the behavior of the filter.

Overrides:
getProperties in class ImageFilter

getConfigPanel

public Widget getConfigPanel(java.lang.Runnable changeCallback)
Description copied from class: ImageFilter
Get a Widget with which the user can specify options for the filter.

Overrides:
getConfigPanel in class ImageFilter
Parameters:
changeCallback - a Runnable which should be invoked whenever the filter's configuration changes, so the containing window can update its preview

writeToStream

public void writeToStream(java.io.DataOutputStream out,
                          Scene theScene)
                   throws java.io.IOException
Write a serialized description of this filter to a stream.

Specified by:
writeToStream in class ImageFilter
Throws:
java.io.IOException

initFromStream

public void initFromStream(java.io.DataInputStream in,
                           Scene theScene)
                    throws java.io.IOException
Reconstruct this filter from its serialized representation.

Specified by:
initFromStream in class ImageFilter
Throws:
java.io.IOException


Copyright © 1999-2011 by Peter Eastman.