|
BIJ API |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--VolumeJ.VJClassifier | +--VolumeJ.VJClassifierLevoy
This class implements the Levoy tent classification function with indexing.
It implements a table for the rgb and alpha lookup.
It can be subclassed for variations on the indexing and lookup methods.
A spectrum type color table is used for indexing color lookup.
Reference: Levoy, 1988, IEEE CGA, 5(3), 29-37
Copyright (c) 1999-2002, Michael Abramoff. All rights reserved.
Field Summary | |
protected float |
fractionMagnitude
|
protected byte[] |
lut
|
protected int |
maskIndex
|
protected int |
maskIntensity
|
protected int |
maskMagnitude
|
protected int |
maxIntensity
|
protected int |
nrIndexBits
|
protected int |
nrIntensityBits
|
protected int |
nrMagnitudeBits
|
protected float[] |
opacityTable
|
protected float |
threshold
|
protected float |
width
|
Fields inherited from class VolumeJ.VJClassifier |
description, GRAYSCALE, RGB, secondaryClassifier |
Constructor Summary | |
VJClassifierLevoy()
Default instantiation. |
|
VJClassifierLevoy(int nrIntensityBits,
int nrMagnitudeBits,
int nrIndexBits)
Instantiation of new classifier. |
Method Summary | |
VJAlphaColor |
alphacolor(VJValue v)
Slice view classification. |
VJAlphaColor |
alphacolor(VJValue v,
VJGradient g)
Classify the (interpolated) voxel value and gradient magnitude into a alpha and rgb-value. |
protected void |
defaultLUT()
Make a LUT obtained from a spectrum. |
int |
does()
Tell calling program that this classifier will return RGB values. |
boolean |
doesCutouts()
Tells the calling program it can process cutouts (slice faces). |
boolean |
doesIndex()
Tells renderer this classifier can process indices in the voxel values. |
float |
getThreshold()
Get the classifier threshold. |
boolean |
hasLUT()
Tell renderer that this classifier has user settable LUT. |
protected float |
opacityCompute(float dfxi,
float intensity,
float threshold,
float width)
Implements Levoy's gradient tent function for precomputation. |
boolean |
setLUT(byte[] reds,
byte[] greens,
byte[] blues)
Set the LUT to a user-defined LUT. |
void |
setThreshold(float threshold)
Set center of gradient tent function. |
void |
setupOpacities(float oversampling)
Compute the opacities for a range of voxel values and gradient values. |
void |
setWidth(float width)
Set width of gradient tent function. |
java.lang.String |
toLongString()
This method can be overloaded as necessary |
java.lang.String |
toString()
Tell calling program name of this classifier. |
boolean |
visible(VJValue v)
Tells renderer that all voxels are potentially visible. |
Methods inherited from class VolumeJ.VJClassifier |
getSecondaryClassifier, setSecondaryClassifier, trace |
Methods inherited from class java.lang.Object |
|
Field Detail |
protected float[] opacityTable
protected byte[] lut
protected float threshold
protected float width
protected int maxIntensity
protected int maskMagnitude
protected int maskIndex
protected float fractionMagnitude
protected int nrIndexBits
protected int nrMagnitudeBits
protected int nrIntensityBits
protected int maskIntensity
Constructor Detail |
public VJClassifierLevoy()
public VJClassifierLevoy(int nrIntensityBits, int nrMagnitudeBits, int nrIndexBits)
nrIntensityBits:
- the number of intensity bits available for the opacity table index.nrMagnitudeBits
- the number of gradient magnitude bits available for the opacity table index.nrIndexBits
- the number of bits available indexing for the opacity table index.Method Detail |
public void setWidth(float width)
public float getThreshold()
VJClassifier
getThreshold
in class VJClassifier
public void setThreshold(float threshold)
threshold
- the center value.public boolean visible(VJValue v)
visible
in class VJClassifier
public int does()
does
in class VJClassifier
public boolean hasLUT()
hasLUT
in class VJClassifier
public boolean doesIndex()
doesIndex
in class VJClassifier
public boolean doesCutouts()
doesCutouts
in class VJClassifier
public java.lang.String toString()
toString
in class VJClassifier
public java.lang.String toLongString()
VJClassifier
toLongString
in class VJClassifier
public VJAlphaColor alphacolor(VJValue v, VJGradient g)
alphacolor
in class VJClassifier
v
- the VJValue, the interpolated value at this location.g
- the gradient at this locationpublic VJAlphaColor alphacolor(VJValue v)
alphacolor
in class VJClassifier
public void setupOpacities(float oversampling)
oversampling
- the oversampling ratio.protected void defaultLUT()
public boolean setLUT(byte[] reds, byte[] greens, byte[] blues)
setLUT
in class VJClassifier
reds,
- greens, blues byte[] containing the RGB values for the LUT.protected float opacityCompute(float dfxi, float intensity, float threshold, float width)
dfxi[0-255]
- the magnitude of the gradient.intensity
- of the voxel.threshold
- the center of the tent function.width,
- the width of the tent function.
|
BIJ API |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |