VolumeJ
Class VJClassifier

java.lang.Object
  |
  +--VolumeJ.VJClassifier
Direct Known Subclasses:
OFClassifier, VJClassifierInteger, VJClassifierIsosurface, VJClassifierLevoy

public abstract class VJClassifier
extends java.lang.Object

This class is the superclass for all classifiers. Copyright (c) 1999-2002, Michael Abramoff. All rights reserved.


Field Summary
protected  java.lang.String description
          A short description of the classifier.
static int GRAYSCALE
          Classifier can return a RGB VJAlphaColor.
static int RGB
          Classifier can return a RGB VJAlphaColor.
protected  VJClassifier secondaryClassifier
          Contains a secondary classifier if needed in alphacolor.
 
Constructor Summary
VJClassifier()
           
 
Method Summary
 VJAlphaColor alphacolor(VJValue value)
          This method can be overloaded as necessary.
abstract  VJAlphaColor alphacolor(VJValue value, VJGradient g)
          The classification method, defining how a value/gradient combination will be classified as an VJAlphaColor (argb).
abstract  int does()
          Returns the type of VJAlphaColor this classifier generates: RGB or GRAYSCALE.
 boolean doesCutouts()
          This method can be overloaded as necessary.
abstract  boolean doesIndex()
          Tell renderer whether this classifier can process indices in the voxel value.
 VJClassifier getSecondaryClassifier()
           
abstract  float getThreshold()
          Get the classifier threshold.
abstract  boolean hasLUT()
          Return whether or not this classifier supports a user loadable LUT.
 boolean setLUT(byte[] reds, byte[] greens, byte[] blues)
          Set up a user-defined LUT.
 void setSecondaryClassifier(VJClassifier classifier)
          Sets an alternative classifier.
 java.lang.String toLongString()
          This method can be overloaded as necessary
 java.lang.String toString()
          Return a String with information of this classifier.
 java.lang.String trace(VJValue v, VJGradient g)
          For debugging: print value, index and gradient.
abstract  boolean visible(VJValue value)
          Tell renderer whether this voxel will be visible.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

RGB

public static final int RGB
Classifier can return a RGB VJAlphaColor.

GRAYSCALE

public static final int GRAYSCALE
Classifier can return a RGB VJAlphaColor.

secondaryClassifier

protected VJClassifier secondaryClassifier
Contains a secondary classifier if needed in alphacolor.

description

protected java.lang.String description
A short description of the classifier.
Constructor Detail

VJClassifier

public VJClassifier()
Method Detail

getThreshold

public abstract float getThreshold()
Get the classifier threshold.

alphacolor

public abstract VJAlphaColor alphacolor(VJValue value,
                                        VJGradient g)
The classification method, defining how a value/gradient combination will be classified as an VJAlphaColor (argb).

does

public abstract int does()
Returns the type of VJAlphaColor this classifier generates: RGB or GRAYSCALE.

visible

public abstract boolean visible(VJValue value)
Tell renderer whether this voxel will be visible. Used for optimizations.

doesIndex

public abstract boolean doesIndex()
Tell renderer whether this classifier can process indices in the voxel value.

hasLUT

public abstract boolean hasLUT()
Return whether or not this classifier supports a user loadable LUT.

toString

public java.lang.String toString()
Return a String with information of this classifier.
Overrides:
toString in class java.lang.Object

setLUT

public boolean setLUT(byte[] reds,
                      byte[] greens,
                      byte[] blues)
Set up a user-defined LUT. Overload if hasLUT returns true.

setSecondaryClassifier

public void setSecondaryClassifier(VJClassifier classifier)
Sets an alternative classifier.

getSecondaryClassifier

public VJClassifier getSecondaryClassifier()

toLongString

public java.lang.String toLongString()
This method can be overloaded as necessary

doesCutouts

public boolean doesCutouts()
This method can be overloaded as necessary. Tell renderer whether this classifier can process cutout (slice faces).

alphacolor

public VJAlphaColor alphacolor(VJValue value)
This method can be overloaded as necessary. If cutouts can be processed, overload this method.

trace

public java.lang.String trace(VJValue v,
                              VJGradient g)
For debugging: print value, index and gradient.