hades.models.imaging
Class ParametrizedFilter

java.lang.Object
  extended byhades.simulator.SimObject
      extended byhades.models.imaging.ParametrizedFilter
All Implemented Interfaces:
java.lang.Cloneable, ContextToolTip, java.io.Serializable, Simulatable
Direct Known Subclasses:
AffineTransformationFilter, ConstantColorFilter, CropFilter, GammaFilter, GridFilter, InsideRangeFilter, LookupFilter, PerspectiveTransformationFilter, PurpleDetectionFilter, RandomFilter, ResizeFilter, RotationFilter, SaturationFilter, SelectRegionFilter, ShearFilter, ThresholdFilter, TwoInputFilter

public class ParametrizedFilter
extends SimObject
implements Simulatable, java.io.Serializable

ParametrizedFilter - stub baseclass for simple per-pixel image filters Signals are expected to be ImageSignals.

See Also:
Serialized Form

Field Summary
protected  double d0
           
protected  double d1
           
protected  double d2
           
protected  double d3
           
protected  double d4
           
protected  double d5
           
protected  double d6
           
protected  double d7
           
protected  double d8
           
protected  double d9
           
protected  java.awt.Image inputImage
           
protected  java.awt.Image outputImage
           
protected  int p0
           
protected  int p1
           
protected  int p2
           
protected  int p3
           
protected  int p4
           
protected  int p5
           
protected  int p6
           
protected  int p7
           
protected  Port port_A
           
protected  Port port_Y
           
protected  double t_delay
           
 
Fields inherited from class hades.simulator.SimObject
classloader, console, debug, editor, name, parent, ports, propertySheet, simulator, symbol, versionId, visible
 
Constructor Summary
ParametrizedFilter()
           
 
Method Summary
 int _clip(int min, int max, int value)
           
 double _toDouble(java.lang.String s)
           
 int _toInt(java.lang.String s)
           
 void applyValuesHook()
           
 void buildPorts()
           
 void checkApplyCallsEvaluate()
          check whether to call evaluate() from apply() in the property sheet.
 void configure()
          create and display a 'ConfigDialog' to set the parameters for a SimObject.
 SimObject copy()
          copy(): This function is used to create a clone of the current SimObject.
 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)
          evaluate(): called by the simulation engine on all events that concern this object.
 java.awt.Image filter(java.awt.Image inputImage)
           
 java.awt.image.BufferedImage getBufferedImage(java.awt.Image image)
           
 java.awt.image.BufferedImage getClone(java.awt.Image image)
           
 double getD0()
           
 double getD1()
           
 double getD2()
           
 double getD3()
           
 double getD4()
           
 double getD5()
           
 double getD6()
           
 double getD7()
           
 double getD8()
           
 double getD9()
           
 int getP0()
           
 int getP1()
           
 int getP2()
           
 int getP3()
           
 int getP4()
           
 int getP5()
           
 int getP6()
           
 int getP7()
           
 java.lang.String[] getPropertySheetFieldNames()
           
 boolean initialize(java.lang.String s)
          initialize a ParametrizedFilter from a String that contains the integer version id and (up to eight) integer paramters.
 void msg(java.lang.String s)
           
 void setD0(double v)
           
 void setD0(java.lang.String s)
           
 void setD1(double v)
           
 void setD1(java.lang.String s)
           
 void setD2(double v)
           
 void setD2(java.lang.String s)
           
 void setD3(double v)
           
 void setD3(java.lang.String s)
           
 void setD4(double v)
           
 void setD4(java.lang.String s)
           
 void setD5(double v)
           
 void setD5(java.lang.String s)
           
 void setD6(double v)
           
 void setD6(java.lang.String s)
           
 void setD7(double v)
           
 void setD7(java.lang.String s)
           
 void setD8(double v)
           
 void setD8(java.lang.String s)
           
 void setD9(double v)
           
 void setD9(java.lang.String s)
           
 void setP0(int v)
           
 void setP0(java.lang.String s)
           
 void setP1(int v)
           
 void setP1(java.lang.String s)
           
 void setP2(int v)
           
 void setP2(java.lang.String s)
           
 void setP3(int v)
           
 void setP3(java.lang.String s)
           
 void setP4(int v)
           
 void setP4(java.lang.String s)
           
 void setP5(int v)
           
 void setP5(java.lang.String s)
           
 void setP6(int v)
           
 void setP6(java.lang.String s)
           
 void setP7(int v)
           
 void setP7(java.lang.String s)
           
 java.lang.String toString()
          toString() - the usual info method
 void write(java.io.PrintWriter ps)
           
 
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
message
 

Field Detail

port_A

protected Port port_A

port_Y

protected Port port_Y

inputImage

protected java.awt.Image inputImage

outputImage

protected java.awt.Image outputImage

t_delay

protected double t_delay

p0

protected int p0

p1

protected int p1

p2

protected int p2

p3

protected int p3

p4

protected int p4

p5

protected int p5

p6

protected int p6

p7

protected int p7

d0

protected double d0

d1

protected double d1

d2

protected double d2

d3

protected double d3

d4

protected double d4

d5

protected double d5

d6

protected double d6

d7

protected double d7

d8

protected double d8

d9

protected double d9
Constructor Detail

ParametrizedFilter

public ParametrizedFilter()
Method Detail

buildPorts

public void buildPorts()

elaborate

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
Overrides:
elaborate in class SimObject

evaluate

public void evaluate(java.lang.Object arg)
Description copied from interface: Simulatable
evaluate(): called by the simulation engine on all events that concern this object. The object is responsible for updating its internal state and for scheduling all pending output events.

Specified by:
evaluate in interface Simulatable
Overrides:
evaluate in class SimObject
Parameters:
arg - an arbitrary object argument

filter

public java.awt.Image filter(java.awt.Image inputImage)

getBufferedImage

public java.awt.image.BufferedImage getBufferedImage(java.awt.Image image)

getClone

public java.awt.image.BufferedImage getClone(java.awt.Image image)

checkApplyCallsEvaluate

public void checkApplyCallsEvaluate()
check whether to call evaluate() from apply() in the property sheet. We do this only when the SetupManager property "hades.models.imaging.ParametrizedFilter.applyCallsEvaluate" is "true". The motivation is to automatically propagate parameter changes through the image filter pipeline. This is more user-friendly at the cost of some performance.


applyValuesHook

public void applyValuesHook()

getP0

public int getP0()

getP1

public int getP1()

getP2

public int getP2()

getP3

public int getP3()

getP4

public int getP4()

getP5

public int getP5()

getP6

public int getP6()

getP7

public int getP7()

setP0

public void setP0(int v)

setP1

public void setP1(int v)

setP2

public void setP2(int v)

setP3

public void setP3(int v)

setP4

public void setP4(int v)

setP5

public void setP5(int v)

setP6

public void setP6(int v)

setP7

public void setP7(int v)

setP0

public void setP0(java.lang.String s)

setP1

public void setP1(java.lang.String s)

setP2

public void setP2(java.lang.String s)

setP3

public void setP3(java.lang.String s)

setP4

public void setP4(java.lang.String s)

setP5

public void setP5(java.lang.String s)

setP6

public void setP6(java.lang.String s)

setP7

public void setP7(java.lang.String s)

getD0

public double getD0()

getD1

public double getD1()

getD2

public double getD2()

getD3

public double getD3()

getD4

public double getD4()

getD5

public double getD5()

getD6

public double getD6()

getD7

public double getD7()

getD8

public double getD8()

getD9

public double getD9()

setD0

public void setD0(double v)

setD1

public void setD1(double v)

setD2

public void setD2(double v)

setD3

public void setD3(double v)

setD4

public void setD4(double v)

setD5

public void setD5(double v)

setD6

public void setD6(double v)

setD7

public void setD7(double v)

setD8

public void setD8(double v)

setD9

public void setD9(double v)

setD0

public void setD0(java.lang.String s)

setD1

public void setD1(java.lang.String s)

setD2

public void setD2(java.lang.String s)

setD3

public void setD3(java.lang.String s)

setD4

public void setD4(java.lang.String s)

setD5

public void setD5(java.lang.String s)

setD6

public void setD6(java.lang.String s)

setD7

public void setD7(java.lang.String s)

setD8

public void setD8(java.lang.String s)

setD9

public void setD9(java.lang.String s)

_toInt

public int _toInt(java.lang.String s)

_toDouble

public double _toDouble(java.lang.String s)

_clip

public int _clip(int min,
                 int max,
                 int value)

getPropertySheetFieldNames

public java.lang.String[] getPropertySheetFieldNames()

configure

public void configure()
Description copied from class: SimObject
create and display a 'ConfigDialog' to set the parameters for a SimObject. The default ConfigDialog for the base class (SimObject) itself is empty except for the 'instance name' of the SimObject.

Overrides:
configure in class SimObject

copy

public SimObject copy()
Description copied from class: SimObject
copy(): This function is used to create a clone of the current SimObject.

I am not yet sure about the correct and best semantic for copy(). Currently a new object of the current class is created by calling the default constructor.

Overrides:
copy in class SimObject

initialize

public boolean initialize(java.lang.String s)
initialize a ParametrizedFilter from a String that contains the integer version id and (up to eight) integer paramters. '1001 0 1 2 3 4 5 -6 -7'

Overrides:
initialize in class SimObject

write

public void write(java.io.PrintWriter ps)
Overrides:
write in class SimObject

msg

public void msg(java.lang.String s)

toString

public java.lang.String toString()
toString() - the usual info method

Overrides:
toString in class SimObject