|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.washington.biostr.sig.brainj3d.viewvolume.colors.BlendFunction
public abstract class BlendFunction
Base class for blend functions. Blend functions compute a new color based on a base color and the computed volume color. Because certian blend functions may require creating instances using special parameters, some Java reflection methods are included and should be overriden by subclasses that desire those abilities. The BlendFunctionFactory supports those operations. Even if default constructor instances should not be created, the BlendFunctionFactory still requires a default constructed instance to query the reflection commands upon.
BlendFunctionFactory| Constructor Summary | |
|---|---|
protected |
BlendFunction()
|
| Method Summary | |
|---|---|
boolean |
allowDefaultConstructor()
Returns true if instances of this blend function can be created using the default constructor. |
float[] |
calculateColor(float[] volumeColor,
float[] baseColor)
Computes a blended color using the the specified volume color and base color and returns the blended color as a new array. |
abstract void |
calculateColor(float[] volumeColor,
float[] baseColor,
float[] outColor)
Computes a blended color using the volume color and base color and returns the blended color through the outColor parameter. |
BlendFunction |
createNew(Object[] parameters)
Creates a new instance of this BlendFunction using the given parameters. |
boolean |
equals(Object obj)
The default implementation of this equals comparitor returns true if the class of this BlendFunction equals the class of the other object. |
String[] |
getDesiredParameterNames()
Gets an array of friendly names for each of the desired parameters for creating new instances of this BlendFunction. |
Class[] |
getDesiredParameters()
Gets an array of types for the desired parameters for creating new instances of this BlendFunction. |
Object[] |
getDesiredParamterDefaultValues()
Gets a new array of default values for each of the required parameters. |
abstract String |
getName()
Gets the name of this blend function. |
String |
getParametersTitle()
Gets a string representing the title to use when displaying an input box for entering the desired parameters for creating a new instance of this BlendFunction. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
protected BlendFunction()
| Method Detail |
|---|
public abstract String getName()
public abstract void calculateColor(float[] volumeColor,
float[] baseColor,
float[] outColor)
volumeColor - a color in the form [r, g, b, a] representing the computed
volume data colorbaseColor - a color in the form [r, g, b, a] representing the base color
of the surfaceoutColor - a preallocated color to hold the resulting blended color; output is of the form
[r, g, b, a]; this array need not be zero-initialized
public final float[] calculateColor(float[] volumeColor,
float[] baseColor)
volumeColor - a color in the form [r, g, b, a] representing the computed
volume data colorbaseColor - a color in the form [r, g, b, a] representing the base color
of the surface
[r, g, b, a]public boolean allowDefaultConstructor()
public BlendFunction createNew(Object[] parameters)
parameters -
public Class[] getDesiredParameters()
public String toString()
toString in class Objectpublic String[] getDesiredParameterNames()
public Object[] getDesiredParamterDefaultValues()
public String getParametersTitle()
public boolean equals(Object obj)
equals in class Objectobj - the object to compare this BlendFunction with
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||