edu.washington.biostr.sig.brainj3d.viewvolume.colors
Class AlphaWeightedFunction

java.lang.Object
  extended by edu.washington.biostr.sig.brainj3d.viewvolume.colors.BlendFunction
      extended by edu.washington.biostr.sig.brainj3d.viewvolume.colors.AlphaWeightedFunction

public class AlphaWeightedFunction
extends BlendFunction

This blend function averages the two blend functions by using the two color's alpha values as weights.

Author:
Peter

Constructor Summary
AlphaWeightedFunction()
           
 
Method Summary
 void calculateColor(float[] color1, float[] color2, float[] outColor)
          Computes a blended color using the volume color and base color and returns the blended color through the outColor parameter.
 String getName()
          Gets the name of this blend function.
 
Methods inherited from class edu.washington.biostr.sig.brainj3d.viewvolume.colors.BlendFunction
allowDefaultConstructor, calculateColor, createNew, equals, getDesiredParameterNames, getDesiredParameters, getDesiredParamterDefaultValues, getParametersTitle, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AlphaWeightedFunction

public AlphaWeightedFunction()
Method Detail

getName

public String getName()
Description copied from class: BlendFunction
Gets the name of this blend function.

Specified by:
getName in class BlendFunction
Returns:
the name of this blend function

calculateColor

public void calculateColor(float[] color1,
                           float[] color2,
                           float[] outColor)
Description copied from class: BlendFunction
Computes a blended color using the volume color and base color and returns the blended color through the outColor parameter.

Specified by:
calculateColor in class BlendFunction
Parameters:
color1 - a color in the form [r, g, b, a] representing the computed volume data color
color2 - a color in the form [r, g, b, a] representing the base color of the surface
outColor - 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


Copyright © 2006 University of Washington. All Rights Reserved.