Class RandomFilter

  extended byhades.simulator.SimObject
      extended byhades.models.imaging.ParametrizedFilter
          extended byhades.models.imaging.RandomFilter
All Implemented Interfaces:
java.lang.Cloneable, ContextToolTip, java.io.Serializable, Simulatable

public class RandomFilter
extends ParametrizedFilter

RandomFilter - create a random color output image. The color is specified as RGB via the six parameters P0, ..., P5, where P0 and P1 specify the lower and upper limits for the red component, while P2 and P3, and P4 and P5 specify the limits for green and blue. If P6 and P7 are greater than zero, they are interpreted as the output image size. If P6 and P7 are zero and the input image (port A) is not null, the output image is of the same size as the input image.

For example, setting P0=0, P1=255, P2=P3=P4=P5=0, P6=100, P7=80 will generate a random image with equally distributed red component, no blue, no green, and image size 100x80.

See Also:
Serialized Form

Field Summary
Fields inherited from class hades.models.imaging.ParametrizedFilter
d0, d1, d2, d3, d4, d5, d6, d7, d8, d9, inputImage, outputImage, p0, p1, p2, p3, p4, p5, p6, p7, port_A, port_Y, t_delay
Fields inherited from class hades.simulator.SimObject
classloader, console, debug, editor, name, parent, ports, propertySheet, simulator, symbol, versionId, visible
Constructor Summary
Method Summary
 void elaborate(java.lang.Object arg)
          elaborate(): This method is called by the simulation engine to initialize the simulation object.
 void evaluate(java.lang.Object arg)
          we need to override this, because our parent class implementation will silently ignore null input images.
 java.awt.Image filter(java.awt.Image inputImage)
 java.lang.String[] getPropertySheetFieldNames()
Methods inherited from class hades.models.imaging.ParametrizedFilter
_clip, _toDouble, _toInt, applyValuesHook, buildPorts, checkApplyCallsEvaluate, configure, copy, getBufferedImage, getClone, getD0, getD1, getD2, getD3, getD4, getD5, getD6, getD7, getD8, getD9, getP0, getP1, getP2, getP3, getP4, getP5, getP6, getP7, initialize, msg, setD0, setD0, setD1, setD1, setD2, setD2, setD3, setD3, setD4, setD4, setD5, setD5, setD6, setD6, setD7, setD7, setD8, setD8, setD9, setD9, setP0, setP0, setP1, setP1, setP2, setP2, setP3, setP3, setP4, setP4, setP5, setP5, setP6, setP6, setP7, setP7, toString, write
Methods inherited from class hades.simulator.SimObject
constructDynamicSymbol, getBindkey, getClassLoader, getDebug, getEditor, getExternalResources, getFullName, getName, getParent, getPort, getPorts, getPropertySheet, getResourceAsStream, getSimulator, getSymbol, getSymbolResourceName, getToolTip, getVersionId, isVisible, keyPressed, message, mousePressed, needsDynamicSymbol, needsExternalResources, setClassLoader, setConsole, setDebug, setEditor, setName, setParent, setPorts, setSimulator, setSymbol, setVersionId, setVisible, tearDown
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface hades.simulator.Simulatable

Constructor Detail


public RandomFilter()
Method Detail


public java.awt.Image filter(java.awt.Image inputImage)
filter in class ParametrizedFilter


public void evaluate(java.lang.Object arg)
we need to override this, because our parent class implementation will silently ignore null input images. We, however, want to synthesize an image in that case.

Specified by:
evaluate in interface Simulatable
evaluate in class ParametrizedFilter


public void elaborate(java.lang.Object arg)
Description copied from interface: Simulatable
elaborate(): This method is called by the simulation engine to initialize the simulation object.

Specified by:
elaborate in interface Simulatable
elaborate in class ParametrizedFilter


public java.lang.String[] getPropertySheetFieldNames()
getPropertySheetFieldNames in class ParametrizedFilter