|
IsoSurface Rendering of an AR Representation | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--rlaramee.MarchingCubes
Description: Marching Cubes is a filter that takes as input a volume [e.g., 3D structured point set] and generates on output one or more isosurfaces. One or more contour values must be specified to generate the isosurface(s). The marching cubes algorithm in The Visualization Toolkit let's you specify a min/max scalar range and the number of contours to generate a series of evenly spaced contour values.
start date Tue 27 April 1999
Field Summary | |
private Octree |
octree
|
private boolean |
skipBranch
TRUE if we are to skip a branch in the octree |
private IsoSurface |
surface
|
Constructor Summary | |
MarchingCubes(Octree tree)
constructor |
Method Summary | |
IsoSurface |
execute(float isoValue)
execute() The basic marching cubes algorithm is this: |
short |
generateTopologicalIndex(Cube cube,
double isoValue)
Here's a cube that contains the isoValue, so let's compute the topolical index for the Marching Cubes Cases lookup table [Note: Could optimize this function using bitwise OR operator and enumerating a CASE_MASK] |
byte[] |
getEdgeIntersections(short index)
This method was written so that only the MarchingCubes object collaborates with the MarchingCubesCases object. |
Octree |
getOctree()
This is called from IsoSurface.computeVertex() in order to get a hold of the octree to add a new vertex to the triangle vertex list. |
boolean |
getSkipBranch()
|
IsoSurface |
getSurface()
|
private void |
printStats(IsoSurface surface)
|
boolean |
processCube(OctreeNode node,
double isoValue)
processCube() is called from MachingCubes.execute() and IsoSurface.inspectNeighbors() |
void |
setOctree(Octree tree)
|
boolean |
setSkipBranch(boolean trueOrFalse)
|
void |
setSurface(IsoSurface isoSurface)
|
Methods inherited from class java.lang.Object |
|
Field Detail |
private Octree octree
private IsoSurface surface
private boolean skipBranch
Constructor Detail |
public MarchingCubes(Octree tree)
tree
- a reference to the OctreeMethod Detail |
public Octree getOctree()
public void setOctree(Octree tree)
tree
- a new Octreepublic IsoSurface getSurface()
public void setSurface(IsoSurface isoSurface)
isoSurface
- a new isoSurfacepublic boolean getSkipBranch()
public boolean setSkipBranch(boolean trueOrFalse)
trueOrFalse
- TRUE if we are to skip a branch in
the octree traversalpublic byte[] getEdgeIntersections(short index)
index
- an index into the MarchingCubesCases tablepublic IsoSurface execute(float isoValue)
FOR EACH CUBE Compare isovalue with minimum and maximum cube vertices Generate Marching Cube Case index Interpolate vertex values Generate triangle(s)
We have to inspect neighbors as we traverse the octree. If a coarser resolution neighbor is an octree node we've already traversed, we'll have to "back up" to that coarser resolution node (or before). Perhaps back up to their ancestor node. It looks as if all we have to do is go back to the coarser resolution nodes and reset the direction to Constant.FROMABOVE And don't forget, the coarser resolution neighbor may have already produced triangles.
isoValue
- the isosurface value to renderprivate void printStats(IsoSurface surface)
surface
- the current isosurface objectpublic boolean processCube(OctreeNode node, double isoValue)
We are only going to process a cube:
IF the cube is at the level specified by the user AND IF the minimum <= isoValue <= maximum
Although, we have have to change this procedure because we may want to render non-leaf nodes.
node
- the OctreeNode we are deciding onisoValue
- the isosurface value to renderpublic short generateTopologicalIndex(Cube cube, double isoValue)
cube
- the cube we are processingisoValue
- the isosurface value to render
|
IsoSurface Rendering of an AR Representation | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |