uk.ac.essex.ia
Interface Operator

All Known Implementing Classes:
AbsoluteOperator, AddConstOperator, AddOperator, AffineTransformOperator, AndOperator, BandCombineOperator, BandSelectOperator, BoxFilterOperator, CompositeOperator, ConvolutionOperator, DivideOperator, EdgeOperator, ExpOperator, HoughLinesOperator, HSISegmentOperator, MatchCDFOperator, MultiplyOperator, OpenImageOperator, OperatorImpl, OperatorTemplate, OrConstantOperator, OrOperator, OverlayOperator, PatternOperator, SaveImageOperator, ShowImageOperator, SubtractConstOperator, SubtractOperator, XOrOperator

public interface Operator

An operator in ImageApp commonly represents some image processing algorithm (although not all do eg/ there are also operators that read/write image data to/from files). Operators consist of a widget to allow it to be drawn on screen and a class that actually handles performing the underlying algorithm. So OpViewer can treat all the different operators as one type, they all must implement this interface.

See Also:
OpViewer

Method Summary
 boolean acceptsInputFrom(Operator o)
          Check the operators that are allowed to output data to this operator
 java.awt.image.RenderedImage execute(java.awt.image.renderable.ParameterBlock inData)
          Execute this operator with the input data passed as a parameter
 int getAllowedInputs()
           
 int getAllowedOutputs()
           
 java.lang.String getHelpID()
          Return a String help id that is the one used in the java help mapping file
 java.net.URL getIcon()
          Get the URL to the icon for this operator
 java.awt.image.renderable.ParameterBlock getInputParameters()
           
 java.awt.image.renderable.ParameterBlock getInputParametersForWriting()
           
 OperatorDialog getOperatorDialog()
           
 DataTypeConstant getOutputData()
          Get the type of the data that is output from this operator.
 int getRequiredInputs()
           
 void setInputParameters(java.awt.image.renderable.ParameterBlock inputParameters)
          TODO: Should there be a different method when params have been read??
 void setOperatorDialog(OperatorDialog dialog)
           
 void showOperatorDialog()
          Show a GUI that allows users to modify the parameters for the underlying operation
 

Method Detail

showOperatorDialog

void showOperatorDialog()
Show a GUI that allows users to modify the parameters for the underlying operation


setOperatorDialog

void setOperatorDialog(OperatorDialog dialog)
Parameters:
dialog - - The OperatorDialog that handles getting this operators parameters

getOperatorDialog

OperatorDialog getOperatorDialog()
Returns:
OperatorDialog - The dialog that handles getting this operators parameters

getHelpID

java.lang.String getHelpID()
Return a String help id that is the one used in the java help mapping file

Returns:
String - The JavaHelp mapping id

getAllowedInputs

int getAllowedInputs()
Returns:
int - The number of input connections that this Operator allows

getAllowedOutputs

int getAllowedOutputs()
Returns:
int - The number of output connections that this Operator allows

getRequiredInputs

int getRequiredInputs()
Returns:
int - The number of input connections that are required by this operator

acceptsInputFrom

boolean acceptsInputFrom(Operator o)
Check the operators that are allowed to output data to this operator

Parameters:
o - -The Operator to check
Returns:
true if o is allowed to output data to this operator, false otherwise

getOutputData

DataTypeConstant getOutputData()
Get the type of the data that is output from this operator. This should be one of the constants defined in DataTypeConstant

Returns:
DataTypeConstant - that corresponds to a data type

execute

java.awt.image.RenderedImage execute(java.awt.image.renderable.ParameterBlock inData)
                                     throws java.lang.Exception
Execute this operator with the input data passed as a parameter

Parameters:
inData - - The input data to this operator
Throws:
java.lang.Exception

getIcon

java.net.URL getIcon()
Get the URL to the icon for this operator

Returns:

getInputParameters

java.awt.image.renderable.ParameterBlock getInputParameters()
Returns:

setInputParameters

void setInputParameters(java.awt.image.renderable.ParameterBlock inputParameters)
TODO: Should there be a different method when params have been read??

Parameters:
inputParameters -

getInputParametersForWriting

java.awt.image.renderable.ParameterBlock getInputParametersForWriting()
Returns: