public class Slice
extends java.lang.Object
Volume
over a DataSource
and a Plane
. The data is
read from a DataSource
.Constructor and Description |
---|
Slice(byte[] outsideColor,
byte[] insideColor,
Volume volume,
Plane plane,
DataSource dataSource)
Creates a new instance of Slice and sets its parameters
|
Modifier and Type | Method and Description |
---|---|
void |
calculateSliceTranslation()
Calculates the translation for the 2D projection of intersection polygon
such that the 2D polygon is stationary as the polygon move through the volume.
|
int[][] |
getBounds() |
int |
getBytesPerTexel() |
DataSource |
getDataSource() |
javax.vecmath.Point2d[] |
getIntersection2d() |
javax.vecmath.Point3d[] |
getIntersection3d() |
int |
getMaxProjectionAxis() |
float[] |
getNormalArray()
Required for ObliquePlaneIteratorInterface
|
Plane |
getPlane() |
int[] |
getPlaneShapeArray() |
ISBounds |
getSpaceBounds() |
int[] |
getSpaceShapeArray() |
javax.vecmath.Point2d[] |
getTextureCoordinates() |
byte[] |
getTextureData() |
int[] |
getTextureDimensions() |
Volume |
getVolume() |
void |
init()
Initialize the slice by allocating memory for the data to be read,
seting the default transfer function and performing other initialisations
This initialisation can be done once per iteration.
|
void |
log(java.lang.String fileName) |
static void |
projectTuple(javax.vecmath.Tuple3d source,
javax.vecmath.Tuple2d dest,
int axis)
Project the 'source' on a plane perpendicular on 'axis' and store the
result in 'dest'.
|
void |
read()
|
void |
setDataSource(DataSource dataSource)
Sets the data source where the volume is stored.
|
static void |
setGoodScanConversionOrder(boolean good) |
void |
setInsideColor(byte[] color)
Sets the color for the texture inside the bounds of the slice projection
|
void |
setOutsideColor(byte[] color)
Sets the color for the texture ouside the bounds of the slice projection
|
void |
setPlane(Plane plane)
Specifies the plane we want to intersect with the volume
|
void |
setTransferFunction(TransferFunction transferFunction)
Specifies how do we convert the Datum read from the file into a rgba tupple.
|
void |
setVertical(javax.vecmath.Vector3d vertical)
Specifies a vector in the intersection plane.
|
void |
setVolume(Volume volume)
Specifies the volume we iterate over
|
java.lang.String |
toString() |
public Slice(byte[] outsideColor, byte[] insideColor, Volume volume, Plane plane, DataSource dataSource)
public int getBytesPerTexel()
public void setTransferFunction(TransferFunction transferFunction)
public void setVolume(Volume volume)
public Volume getVolume()
public void setPlane(Plane plane)
public Plane getPlane()
public void setDataSource(DataSource dataSource)
public DataSource getDataSource()
public void setOutsideColor(byte[] color)
public void setInsideColor(byte[] color)
public static void setGoodScanConversionOrder(boolean good)
public byte[] getTextureData()
public int[] getTextureDimensions()
public int[][] getBounds()
public javax.vecmath.Point3d[] getIntersection3d()
public javax.vecmath.Point2d[] getIntersection2d()
public int getMaxProjectionAxis()
public javax.vecmath.Point2d[] getTextureCoordinates()
public void init()
public void read()
public void setVertical(javax.vecmath.Vector3d vertical)
public ISBounds getSpaceBounds()
public int[] getSpaceShapeArray()
public float[] getNormalArray()
public int[] getPlaneShapeArray()
public void calculateSliceTranslation()
public java.lang.String toString()
toString
in class java.lang.Object
public static void projectTuple(javax.vecmath.Tuple3d source, javax.vecmath.Tuple2d dest, int axis)
public void log(java.lang.String fileName)