public abstract class ExternalFunction extends ImageTransform
Modifier and Type | Field and Description |
---|---|
protected FunctionWidget |
controls
Controls for this external function transform.
|
protected String |
function
The name of the external function to execute.
|
protected int |
numRange
Range component count for each image.
|
protected FunctionParam[] |
paramList
List of parameters and associated default values.
|
protected String[] |
params
Parameter values for passing to the function.
|
protected int |
resX
Width of each image.
|
protected int |
resY
Height of each image.
|
MICRON, micronHeight, micronStep, micronWidth, xType, yType, zType
Constructor and Description |
---|
ExternalFunction()
Creates an uninitialized external function transform.
|
ExternalFunction(DataTransform parent,
String name,
String function)
Creates an external function transform from the given transform.
|
Modifier and Type | Method and Description |
---|---|
abstract FlatField |
evaluate(FlatField input,
String[] params)
Evaluates the function for the given input data and parameter values.
|
String |
getCacheId(int[] pos,
boolean global)
Gets a string id uniquely describing this data transform at the given
dimensional position, for the purposes of thumbnail caching.
|
JComponent |
getControls()
Gets associated GUI controls for this transform.
|
Data |
getData(TransformLink link,
int[] pos,
int dim,
DataCache cache)
Retrieves the data corresponding to the given dimensional position, for the
given display dimensionality.
|
int |
getImageHeight()
Gets height of each image.
|
int |
getImageWidth()
Gets width of each image.
|
String[] |
getParameterDefaults()
Gets the default parameter values for this external function transform.
|
String[] |
getParameterNames()
Gets the name of each parameter for this external function transform.
|
String[] |
getParameters()
Gets the current parameter values for this external function transform.
|
int |
getRangeCount()
Gets number of range components at each pixel.
|
void |
initState(Dynamic dyn)
Modifies this object's state to match that of the given object.
|
boolean |
isCompatible(Dynamic dyn)
Tests whether the given dynamic object can be used as an argument to
initState, for initializing this dynamic object.
|
boolean |
isValidDimension(int dim)
Gets whether this transform provides data of the given dimensionality.
|
boolean |
matches(Dynamic dyn)
Tests whether two dynamic objects are equivalent.
|
abstract FunctionParam[] |
params()
Gets the input parameter names and corresponding default values.
|
abstract int[] |
predict(int width,
int height,
int num,
String[] params)
Predicts the width, height and number of output planes, given the width,
height and number of input planes, and parameter values.
|
void |
restoreState(Element el)
Restores the current state from the given DOM element ("ExternalFunction").
|
void |
saveState(Element el)
Writes the current state to the given DOM element ("DataTransforms").
|
void |
setParameters(String[] params)
Assigns the parameters for this external function transform.
|
protected void |
setParameters(String[] params,
boolean notify)
Assigns the parameters for this external function transform.
|
canDisplay3D, getHTMLDescription, getImage, getImageUnits, getMicronHeight, getMicronStep, getMicronStep, getMicronWidth, getRangeTypes, getSuggestedMaps, getType, getXType, getYType, getZType, getZUnit, isImmediate
addTransformListener, canDisplay2D, discard, displayChanged, getDimTypes, getFont, getLabels, getLengths, getName, getParent, getThumbHandler, getTransformId, getUnitDescription, makeLabels, notifyListeners, removeTransformListener, setFont, toString
protected String function
protected FunctionParam[] paramList
protected String[] params
protected int numRange
protected int resX
protected int resY
protected FunctionWidget controls
public ExternalFunction()
public ExternalFunction(DataTransform parent, String name, String function)
public abstract int[] predict(int width, int height, int num, String[] params)
public abstract FunctionParam[] params()
public abstract FlatField evaluate(FlatField input, String[] params)
public void setParameters(String[] params)
protected void setParameters(String[] params, boolean notify)
public String[] getParameterNames()
public String[] getParameterDefaults()
public String[] getParameters()
public int getImageWidth()
getImageWidth
in class ImageTransform
public int getImageHeight()
getImageHeight
in class ImageTransform
public int getRangeCount()
getRangeCount
in class ImageTransform
public Data getData(TransformLink link, int[] pos, int dim, DataCache cache)
getData
in class ImageTransform
public boolean isValidDimension(int dim)
isValidDimension
in class DataTransform
public String getCacheId(int[] pos, boolean global)
getCacheId
in class DataTransform
public JComponent getControls()
getControls
in class DataTransform
public boolean matches(Dynamic dyn)
matches
in interface Dynamic
matches
in class DataTransform
public boolean isCompatible(Dynamic dyn)
isCompatible
in interface Dynamic
isCompatible
in class DataTransform
public void initState(Dynamic dyn)
initState
in interface Dynamic
initState
in class DataTransform
public void saveState(Element el) throws SaveException
saveState
in interface Saveable
saveState
in class ImageTransform
SaveException
public void restoreState(Element el) throws SaveException
restoreState
in interface Saveable
restoreState
in class ImageTransform
SaveException
Copyright © 2015–2022 SciJava. All rights reserved.