|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object edu.jhu.ece.iacl.jist.pipeline.AbstractCalculation edu.jhu.cs.cisst.algorithms.geometry.surface.IsoSurfaceGenerator
public class IsoSurfaceGenerator
The IsoSurface Generator generates an iso-surface using either the marching-cubes or marching-tetrahedral algorithm. The patent for marching-cubes has expired as of 2005 and is now available for use in the public domain. This implementation is a reimplementation of a C++ version with enhancements that preserve mesh connectivity.
Nested Class Summary | |
---|---|
protected class |
IsoSurfaceGenerator.EdgeSplit
The Class EdgeSplit is a container to describe a level set crossing point. |
static class |
IsoSurfaceGenerator.Method
The Iso-surface generation method |
protected class |
IsoSurfaceGenerator.Triangle
The Class Triangle stores vertex ids. |
static class |
IsoSurfaceGenerator.Winding
The winding order for triangle vertices. |
Field Summary | |
---|---|
protected static float[][] |
a2fEdgeDirection
a2fEdgeDirection lists the direction vector (vertex1-vertex0) for each edge in the cube. |
protected static int[][] |
a2fVertexOffset
Lists the positions, relative to vertex 0, of each of the 8 vertices of a cube. |
protected static int[][] |
a2iEdgeConnection
Lists the index of the endpoint vertices for each of the 12 edges of the cube. |
protected static int[][] |
a2iTetrahedronEdgeConnection
Lists the index of the endpoint vertices for each of the 6 edges of the tetrahedron. |
protected static int[][] |
a2iTetrahedronsInACube
Lists the index of verticies from a cube that made up each of the six tetrahedrons within the cube. |
protected static int[][] |
a2iTetrahedronTriangles
For each of the possible vertex states listed in aiTetrahedronEdgeFlags there is a specific triangulation of the edge intersection points. |
protected static int[][] |
a2iTriangleConnectionTable
For each of the possible vertex states listed in aiCubeEdgeFlags there is a specific triangulation of the edge intersection points. |
protected static int[] |
aiCubeEdgeFlags
For any edge, if one vertex is inside of the surface and the other is outside of the surface then the edge intersects the surface For each of the 8 vertices of the cube can be two possible states : either inside or outside of the surface For any cube the are 2^8=256 possible sets of vertex states This table lists the edges intersected by the surface for all 256 possible vertex states There are 12 edges. |
protected static int[] |
aiTetrahedronEdgeFlags
For any edge, if one vertex is inside of the surface and the other is outside of the surface then the edge intersects the surface For each of the 4 vertices of the tetrahedron can be two possible states : either inside or outside of the surface For any tetrahedron the are 2^4=16 possible sets of vertex states This table lists the edges intersected by the surface for all 16 possible vertex states There are 6 edges. |
protected int |
cols
The slices. |
protected float |
isoLevel
The target iso-level. |
protected IsoSurfaceGenerator.Method |
method
The is-surface generation method. |
protected float |
resX
The resolution in X. |
protected float |
resY
The resolution in Y. |
protected float |
resZ
The resolution in Z. |
protected int |
rows
The slices. |
protected int |
slices
The slices. |
protected boolean |
useResolutions
The use image resolutions flag. |
protected int |
vertCount
The vertex count. |
protected float[][][] |
volMat
The volume matrix |
protected IsoSurfaceGenerator.Winding |
winding
The winding order. |
Fields inherited from class edu.jhu.ece.iacl.jist.pipeline.AbstractCalculation |
---|
monitor |
Constructor Summary | |
---|---|
IsoSurfaceGenerator()
Instantiates a new iso surface generator. |
|
IsoSurfaceGenerator(AbstractCalculation parent)
Instantiates a new iso surface generator. |
Method Summary | |
---|---|
protected int |
clampColumn(int c)
Clamp column index. |
protected int |
clampRow(int r)
Clamp row. |
protected int |
clampSlice(int s)
Clamp slice. |
protected float |
fGetOffset(Point3i v1,
Point3i v2)
Interpolate position along edge. |
static java.lang.String |
getVersion()
|
protected void |
marchTetrahedral(java.util.Hashtable<java.lang.Long,IsoSurfaceGenerator.EdgeSplit> splits,
java.util.LinkedList<IsoSurfaceGenerator.Triangle> triangles,
Point3i[] pasTetrahedronPosition)
March tetrahedral. |
void |
setMethod(IsoSurfaceGenerator.Method method)
Sets the iso-surface generation method. |
void |
setUseResolutions(boolean value)
Sets the use image resolutions flag. |
void |
setWinding(IsoSurfaceGenerator.Winding winding)
Sets the winding order. |
EmbeddedSurface |
solve(ImageDataFloat vol,
float isoLevel)
Solve for iso-surface |
protected void |
triangulateUsingMarchingCubes(java.util.Hashtable<java.lang.Long,IsoSurfaceGenerator.EdgeSplit> splits,
java.util.LinkedList<IsoSurfaceGenerator.Triangle> triangles,
int x,
int y,
int z)
Triangulate using marching cubes. |
protected void |
triangulateUsingMarchingTetrahedrals(java.util.Hashtable<java.lang.Long,IsoSurfaceGenerator.EdgeSplit> splits,
java.util.LinkedList<IsoSurfaceGenerator.Triangle> triangles,
int x,
int y,
int z)
Triangulate using marching tetrahedrals. |
Methods inherited from class edu.jhu.ece.iacl.jist.pipeline.AbstractCalculation |
---|
add, addTotalUnits, decrementCompletedUnits, decrementCompletedUnits, getCompletedUnits, getCurrentLabel, getCurrentProgress, getLabel, getPerformance, getProgress, getTotalUnits, incrementCompletedUnits, incrementCompletedUnits, isCompleted, markCompleted, reset, setCompletedUnits, setCompletedUnits, setLabel, setMonitor, setTotalUnits |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected IsoSurfaceGenerator.Method method
protected IsoSurfaceGenerator.Winding winding
protected float isoLevel
protected int vertCount
protected float[][][] volMat
protected int rows
protected int cols
protected int slices
protected float resX
protected float resY
protected float resZ
protected boolean useResolutions
protected static final int[][] a2fVertexOffset
protected static final int[][] a2iEdgeConnection
protected static final float[][] a2fEdgeDirection
protected static final int[][] a2iTetrahedronEdgeConnection
protected static final int[][] a2iTetrahedronsInACube
protected static final int[] aiCubeEdgeFlags
protected static final int[][] a2iTriangleConnectionTable
protected static final int[] aiTetrahedronEdgeFlags
protected static final int[][] a2iTetrahedronTriangles
Constructor Detail |
---|
public IsoSurfaceGenerator()
public IsoSurfaceGenerator(AbstractCalculation parent)
parent
- the parentMethod Detail |
---|
public static java.lang.String getVersion()
protected int clampColumn(int c)
c
- the column
protected int clampRow(int r)
r
- the row
protected int clampSlice(int s)
s
- the slice
protected float fGetOffset(Point3i v1, Point3i v2)
v1
- the lower grid pointv2
- the upper grid point
protected void marchTetrahedral(java.util.Hashtable<java.lang.Long,IsoSurfaceGenerator.EdgeSplit> splits, java.util.LinkedList<IsoSurfaceGenerator.Triangle> triangles, Point3i[] pasTetrahedronPosition)
splits
- the edge splitstriangles
- the trianglespasTetrahedronPosition
- the tetrahedron positionspublic void setMethod(IsoSurfaceGenerator.Method method)
method
- the iso-surface generation method.public void setUseResolutions(boolean value)
value
- the if true, algorithm will use image resolutionspublic void setWinding(IsoSurfaceGenerator.Winding winding)
winding
- the winding orderpublic EmbeddedSurface solve(ImageDataFloat vol, float isoLevel)
vol
- the volumeisoLevel
- the target iso-level
protected void triangulateUsingMarchingCubes(java.util.Hashtable<java.lang.Long,IsoSurfaceGenerator.EdgeSplit> splits, java.util.LinkedList<IsoSurfaceGenerator.Triangle> triangles, int x, int y, int z)
splits
- the edge splitstriangles
- the trianglesx
- the x positiony
- the y positionz
- the z positionprotected void triangulateUsingMarchingTetrahedrals(java.util.Hashtable<java.lang.Long,IsoSurfaceGenerator.EdgeSplit> splits, java.util.LinkedList<IsoSurfaceGenerator.Triangle> triangles, int x, int y, int z)
splits
- the edge splitstriangles
- the trianglesx
- the x positiony
- the y positionz
- the z position
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |