edu.unh.sdb.datasource
Class TransferFunction
java.lang.Object
edu.unh.sdb.datasource.TransferFunction
public abstract class TransferFunction
- extends java.lang.Object
- Author:
- dlipsa
Converts a datum read from a RGB data source into rgba array of 4 bytes ready
to be stored into a texture.
Converts a datum read from a CT data source (which contains ints in the
range 0-4096) into a rgba array of 4 bytes. First it scales the CT value to
a value in the range 0-255 and then duplicates that value for all components.
Method Summary |
abstract void |
classifyVoxel(DataBlock src,
IndexSpaceID srcId,
DataBlock dest,
IndexSpaceID destId,
TransferFunction.Feature feature)
|
void |
classifyVoxels(DataBlock src,
ISBounds srcBounds,
DataBlock dest,
TransferFunction.Feature feature)
|
abstract void |
convert(Datum datum,
byte[] texture,
int index)
|
abstract void |
convert(Values values,
byte[] texture)
|
abstract Datum |
createDatum()
|
static TransferFunction |
createDefault(DataSource dataSource)
|
abstract TransferFunction.Type |
getType()
|
protected static javax.vecmath.Vector3d |
gradient(DataBlock block,
IndexSpaceID id,
int attr)
|
abstract boolean |
isFirstBigger(byte[] t1,
int i1,
byte[] t2,
int i2)
|
abstract void |
shadeVoxel(DataBlock src,
IndexSpaceID srcId,
DataBlock dest,
IndexSpaceID destId,
javax.vecmath.Vector3d L,
javax.vecmath.Vector3d H,
double distFromPicturePlane)
|
protected static double |
shadeVoxel(DataBlock src,
IndexSpaceID srcId,
int attr,
javax.vecmath.Vector3d L,
javax.vecmath.Vector3d H,
double d)
|
void |
shadeVoxels(DataBlock src,
ISBounds srcBounds,
DataBlock dest,
javax.vecmath.Vector3d L,
javax.vecmath.Vector3d H,
double distFromPicturePlane)
|
abstract void |
trilinearInterpolation(TransferFunction.Block block,
Datum datum,
IndexSpaceID lower)
|
static double |
trilinearInterpolation(TransferFunction.Block block,
IndexSpaceID lower,
int attr)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TransferFunction
public TransferFunction()
convert
public abstract void convert(Datum datum,
byte[] texture,
int index)
convert
public abstract void convert(Values values,
byte[] texture)
isFirstBigger
public abstract boolean isFirstBigger(byte[] t1,
int i1,
byte[] t2,
int i2)
createDatum
public abstract Datum createDatum()
trilinearInterpolation
public abstract void trilinearInterpolation(TransferFunction.Block block,
Datum datum,
IndexSpaceID lower)
getType
public abstract TransferFunction.Type getType()
classifyVoxel
public abstract void classifyVoxel(DataBlock src,
IndexSpaceID srcId,
DataBlock dest,
IndexSpaceID destId,
TransferFunction.Feature feature)
shadeVoxel
public abstract void shadeVoxel(DataBlock src,
IndexSpaceID srcId,
DataBlock dest,
IndexSpaceID destId,
javax.vecmath.Vector3d L,
javax.vecmath.Vector3d H,
double distFromPicturePlane)
shadeVoxels
public void shadeVoxels(DataBlock src,
ISBounds srcBounds,
DataBlock dest,
javax.vecmath.Vector3d L,
javax.vecmath.Vector3d H,
double distFromPicturePlane)
classifyVoxels
public void classifyVoxels(DataBlock src,
ISBounds srcBounds,
DataBlock dest,
TransferFunction.Feature feature)
createDefault
public static TransferFunction createDefault(DataSource dataSource)
trilinearInterpolation
public static double trilinearInterpolation(TransferFunction.Block block,
IndexSpaceID lower,
int attr)
shadeVoxel
protected static double shadeVoxel(DataBlock src,
IndexSpaceID srcId,
int attr,
javax.vecmath.Vector3d L,
javax.vecmath.Vector3d H,
double d)
gradient
protected static javax.vecmath.Vector3d gradient(DataBlock block,
IndexSpaceID id,
int attr)