edu.washington.biostr.sig.brainj3d.view3D.combiners
Class BinOpCombiner

java.lang.Object
  extended by edu.washington.biostr.sig.brainj3d.view3D.combiners.AbstractVolumeDataViewCombiner
      extended by edu.washington.biostr.sig.brainj3d.view3D.combiners.BinOpCombiner
All Implemented Interfaces:
VolumeDataViewCombiner
Direct Known Subclasses:
ANDCombiner, XORCombiner

public abstract class BinOpCombiner
extends AbstractVolumeDataViewCombiner

This class provides support for binary operator-like combiners. In general these combiners require a ColorLookupTable array of size one.

Author:
Peter

Constructor Summary
BinOpCombiner()
           
 
Method Summary
 void computeColors(double[][] valuesArray, ColorLookupTable[] colorTables, float[] baseColor, BlendFunction function, PreprocessingData prepData, float[] outColors)
          Computes colors given the specified inputs and modified outColors to hold the computed colors.
 int computeColorsSize(double[] values)
          Computes the size of array required to hold the colors array generated by this combiner.
 boolean needsManyColorTables()
          Returns true if the input parameters should be an array of ColorInputTables, one for each source view.
protected static double sigmoid(double val, double inflectionPoint)
          Computes a value along a sigmoid function using the specific value and inflection point.
protected static double sigmoidZero(double val)
          Computes a value along a sigmoid function using the specific value, where the inflection point is at zero.
 
Methods inherited from class edu.washington.biostr.sig.brainj3d.view3D.combiners.AbstractVolumeDataViewCombiner
clearOutColors, computeColors, computeColorsSize, insertColorAt, intToFloatArray, isValid
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface edu.washington.biostr.sig.brainj3d.view3D.combiners.VolumeDataViewCombiner
getName
 

Constructor Detail

BinOpCombiner

public BinOpCombiner()
Method Detail

computeColorsSize

public int computeColorsSize(double[] values)
Description copied from interface: VolumeDataViewCombiner
Computes the size of array required to hold the colors array generated by this combiner.

Parameters:
values - an array containing a list of vertices
Returns:
the size of array required to hold the colors array generated by this combiner.

computeColors

public void computeColors(double[][] valuesArray,
                          ColorLookupTable[] colorTables,
                          float[] baseColor,
                          BlendFunction function,
                          PreprocessingData prepData,
                          float[] outColors)
Description copied from class: AbstractVolumeDataViewCombiner
Computes colors given the specified inputs and modified outColors to hold the computed colors. Subclasses should override this method to implement thier combination schemes.

Specified by:
computeColors in interface VolumeDataViewCombiner
Specified by:
computeColors in class AbstractVolumeDataViewCombiner
Parameters:
valuesArray - should be in the format of [view index][vertex index]
colorTables - an array of ColorLookupTables, should be length one if needsManyColorTables() returns false, or the same length at the number of views in the valuesArray if needsManyColorTables() returns true
baseColor - the base color to be used in the blend function
function - the blend function to use to blend the base color with the mapped color from the ColorLookupTable(s).
prepData - the preprocessing data computed across each of the full sampled data sets
outColors - destination of computed colors, should be the same length as computeColorsSize(valuesArray)

needsManyColorTables

public boolean needsManyColorTables()
Description copied from interface: VolumeDataViewCombiner
Returns true if the input parameters should be an array of ColorInputTables, one for each source view. False implies that only one ColorInputTable should be used for input.

Returns:
true if the input parameters should be an array of ColorInputTables

sigmoid

protected static double sigmoid(double val,
                                double inflectionPoint)
Computes a value along a sigmoid function using the specific value and inflection point.

Parameters:
val -
inflectionPoint -
Returns:

sigmoidZero

protected static double sigmoidZero(double val)
Computes a value along a sigmoid function using the specific value, where the inflection point is at zero.

Parameters:
val -
Returns:


Copyright © 2006 University of Washington. All Rights Reserved.