|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--VoxelDraw
Constructor Summary | |
VoxelDraw(java.lang.String filename)
Construct an object with volume origin at 0,0,0 and a field origin specified by fieldMins. |
|
VoxelDraw(java.lang.String filename,
float[] fieldSizes,
int[] volumeSizes,
int tileSize)
Constrict an object with volume and field sizes with origins at 0,0,0. |
Method Summary | |
static void |
assert(boolean flag,
java.lang.String msg)
Make sure that the condition parameter is true. |
int |
averageColors(int c1,
int c2)
Average two rgba color values |
void |
checkDataIntegrity()
Verifies assertions on the data |
void |
closeVolume()
Finalize the volume after rendering. |
static int |
color4f(float r,
float g,
float b,
float a)
Returns an rgba value specified by the normalized color value (range: 0.0-1.0). |
static int |
color4i(int r,
int g,
int b,
int a)
Returns an rgba value specified by the given color components (range: 0-255). |
int |
convertRGB(int argb)
Convert a java default argb color to a volumetric rgba value. |
void |
drawMesh(int zOffset)
Draw the mesh to the voxel canvas. |
void |
drawTrack(Track t,
int sampleRate,
int zOffset)
Draw track line, sampling the vertical slices according the sampleRate. |
void |
drawTracks(int zOffset)
Draw the tracks to the voxel canvas. |
void |
loadConfig()
Initialize properties from the config file. |
static void |
main(java.lang.String[] args)
Set up the site bounds and draw the track and mesh objects. |
int |
mapXValue(float fx)
Map an x field coordinate to an x volume coordinate. |
int |
mapYValue(float fy)
Map a y field coordinate to a y volume coordinate. |
int |
mapZValue(float fz)
Map a z field coordinate to a z volume coordinate. |
void |
openVolume()
Prepare the volume for rendering. |
static void |
p(java.lang.String msg)
Provide a shortcut for outputing status messages without newlines. |
static void |
pn(java.lang.String msg)
Provide a shortcut for outputing status messages with newlines. |
void |
printFieldBounds()
Print a list of the field bounds to standard output. |
void |
printVolumeBounds()
Print a list of the volume bounds to standard output. |
void |
renderObjects()
Render the objects specified in the cfg file. |
void |
setFieldGeometry(float[] fieldSizes)
Initialize a field geometry with origin at 0,0,0. |
void |
setFieldGeometry(float[] fieldMins,
float[] fieldMaxs)
Initialize a field geometry with an origin at fieldMins. |
void |
setFieldVoxel(float fx,
float fy,
float fz,
int color)
Set a voxel to the specified color using field values |
void |
setVolumeGeometry(int[] volumeSizes)
Initialize a volume geometry with origin at 0,0,0. |
void |
setVolumeGeometry(int[] volumeMins,
int[] volumeMaxs)
Initialize a volume geometry with an origin at volumeMins (not yet supported). |
void |
setVolumeSource(java.lang.String filename)
Specify a source for the volume to be drawn to. |
void |
setVolumeVoxel(int x,
int y,
int z,
int color)
Set a voxel to the specified color using volume coordinates |
static void |
testPlanes1(java.lang.String filename)
Perform a simple unmapped, equi-sampled planar test. |
static void |
testPlanes2(java.lang.String filename)
Perform a simple mapped, sub-sampled planar test. |
static void |
testPlanes3(java.lang.String filename)
Perform a mapped, sub-sampled planar test. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
public VoxelDraw(java.lang.String filename, float[] fieldSizes, int[] volumeSizes, int tileSize)
filename
- the name of the voxel canvas filefieldSizes
- the dimensions of the field sizevolumeSizes
- the dimensions of the voxel canvastileSize
- the size of the 3-D tif tilespublic VoxelDraw(java.lang.String filename)
filename
- the name of the voxel canvas fileMethod Detail |
public void setVolumeSource(java.lang.String filename)
filename
- the name of the voxel canvas filepublic void setVolumeGeometry(int[] volumeSizes)
volumeSizes
- the dimensions of the voxel canvaspublic void setFieldGeometry(float[] fieldSizes)
fieldSizes
- the dimensions of the field sizepublic void setVolumeGeometry(int[] volumeMins, int[] volumeMaxs)
volumeMins
- the volume originvolumeMaxs
- the maximum coordinates of the volume spacepublic void setFieldGeometry(float[] fieldMins, float[] fieldMaxs)
fieldMins
- the field originfieldMaxs
- the maximum field valuespublic void printFieldBounds()
public void printVolumeBounds()
public void checkDataIntegrity()
public final int mapXValue(float fx)
fx
- the x field valuepublic final int mapYValue(float fy)
fy
- the y field valuepublic final int mapZValue(float fz)
fz
- the z field valuepublic static final void assert(boolean flag, java.lang.String msg)
flag
- result of the conditionmessage
- to print, if the flag is falsepublic static final void pn(java.lang.String msg)
msg
- the msg to print to stderrpublic static final void p(java.lang.String msg)
msg
- the msg to print with no newlinepublic final void openVolume() throws java.io.IOException
public final void closeVolume() throws java.io.IOException
public final void setFieldVoxel(float fx, float fy, float fz, int color) throws java.lang.Exception
fx
- the x field coordinatefy
- the y field coordinatefx
- the x field coordinatecolor
- the rgba color value to set at the mapped volume locationpublic final void setVolumeVoxel(int x, int y, int z, int color) throws java.lang.Exception
x
- the x volume coordinatey
- the y volume coordinatez
- the z volume coordinatecolor
- the rgba color value to set at the given volume locationpublic static final int color4f(float r, float g, float b, float a)
r
- - the red valueg
- - the green valueb
- - the blue valuea
- - the alpha valuepublic static final int color4i(int r, int g, int b, int a)
r
- - the red valueg
- - the green valueb
- - the blue valuea
- - the alpha valuepublic static final void testPlanes1(java.lang.String filename) throws java.lang.Exception
public static final void testPlanes2(java.lang.String filename) throws java.lang.Exception
public static final void testPlanes3(java.lang.String filename) throws java.lang.Exception
public final void drawTrack(Track t, int sampleRate, int zOffset) throws java.lang.Exception
t
- the track to drawsampleRate
- rate to sample the track atpublic final void drawTracks(int zOffset)
public final void drawMesh(int zOffset)
public int averageColors(int c1, int c2)
c1
- a rgba color valuec2
- a rgba color valuepublic final int convertRGB(int argb)
the
- argb value to convertpublic void loadConfig()
public void renderObjects()
public static void main(java.lang.String[] args)
args
- the command lines args
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |