public class ExtractSurfaceCubes extends Object implements Serializable
Modifier and Type | Class and Description |
---|---|
protected class |
ExtractSurfaceCubes.Triangle
The triangle just stores vertex indices and is unconcerned about the
actual vertex locations.
|
protected class |
ExtractSurfaceCubes.VETable
Vertex-edge table to support mesh topology.
|
Modifier and Type | Field and Description |
---|---|
protected static int |
EB_XMAX_YMAX
Bit mask identifier.
|
protected static int |
EB_XMAX_YMIN
Bit mask identifier.
|
protected static int |
EB_XMAX_ZMAX
Bit mask identifier.
|
protected static int |
EB_XMAX_ZMIN
Bit mask identifier.
|
protected static int |
EB_XMIN_YMAX
Bit mask identifier.
|
protected static int |
EB_XMIN_YMIN
Bit mask identifiers.
|
protected static int |
EB_XMIN_ZMAX
Bit mask identifier.
|
protected static int |
EB_XMIN_ZMIN
Bit mask identifier.
|
protected static int |
EB_YMAX_ZMAX
Bit mask identifier.
|
protected static int |
EB_YMAX_ZMIN
Bit mask identifier.
|
protected static int |
EB_YMIN_ZMAX
Bit mask identifier.
|
protected static int |
EB_YMIN_ZMIN
Bit mask identifier.
|
protected static int |
EI_XMAX_YMAX
Bit-field identifier.
|
protected static int |
EI_XMAX_YMIN
Bit-field identifier.
|
protected static int |
EI_XMAX_ZMAX
Bit-field identifier.
|
protected static int |
EI_XMAX_ZMIN
Bit-field identifier.
|
protected static int |
EI_XMIN_YMAX
Bit-field identifier.
|
protected static int |
EI_XMIN_YMIN
Bit-field identifier.
|
protected static int |
EI_XMIN_ZMAX
Bit-field identifier.
|
protected static int |
EI_XMIN_ZMIN
Bit-field identifier.
|
protected static int |
EI_YMAX_ZMAX
Bit-field identifier.
|
protected static int |
EI_YMAX_ZMIN
Bit-field identifier.
|
protected static int |
EI_YMIN_ZMAX
Bit-field identifier.
|
protected static int |
EI_YMIN_ZMIN
Bit-field identifier.
|
protected static int |
FI_XMAX
Bit-field identifier.
|
protected static int |
FI_XMIN
Bit-field identifier.
|
protected static int |
FI_YMAX
Bit-field identifier.
|
protected static int |
FI_YMIN
Bit-field identifier.
|
protected static int |
FI_ZMAX
Bit-field identifier.
|
protected static int |
FI_ZMIN
Bit-field identifier.
|
protected int[] |
m_aiData
Data
|
protected float |
m_fXDelta
deltas
|
protected float |
m_fYDelta
deltas
|
protected float |
m_fZDelta
deltas
|
protected int |
m_iXBound
bounds on each dimension of 3D data set and data itself.
|
protected int |
m_iXYBound
bound
|
protected int |
m_iYBound
bounds on each dimension of 3D data set and data itself.
|
protected int |
m_iZBound
bounds on each dimension of 3D data set and data itself.
|
protected Vector3f |
m_kCentroid
centroid
|
protected Vector3f |
m_kE0
temporary variables to avoid 'new' calls.
|
protected Vector3f |
m_kE1
temporary variable
|
protected Vector3f |
m_kGradient
temporary variable
|
protected Vector3f |
m_kN
temporary variable
|
private static long |
serialVersionUID |
Constructor and Description |
---|
ExtractSurfaceCubes(int iXBound,
int iYBound,
int iZBound,
int[] aiData)
Create a level surface extractor for a 3D image.
|
Modifier and Type | Method and Description |
---|---|
protected static int |
addVertex(Vector3f kV,
HashMap<Vector3f,Integer> kVMap)
Called to add the specified point to the hashmap
|
void |
ExtractContour(float level,
Vector<int[]> kTriTable,
Vector<Vector3f> vertices,
Vector<TriangleKey> triangles) |
void |
ExtractContour(float level,
Vector<Vector3f> vertices,
Vector<TriangleKey> triangles) |
Vector3f |
getGradient(Vector3f kP)
Interpolation of the gradient vector of the image.
|
private int |
GetVertices(float level,
int x,
int y,
int z,
ExtractSurfaceCubes.VETable table) |
private void |
GetXMaxEdges(int x,
int y,
int z,
int type,
ExtractSurfaceCubes.VETable table) |
private void |
GetXMinEdges(int x,
int y,
int z,
int type,
ExtractSurfaceCubes.VETable table) |
private void |
GetYMaxEdges(int x,
int y,
int z,
int type,
ExtractSurfaceCubes.VETable table) |
private void |
GetYMinEdges(int x,
int y,
int z,
int type,
ExtractSurfaceCubes.VETable table) |
private void |
GetZMaxEdges(int x,
int y,
int z,
int type,
ExtractSurfaceCubes.VETable table) |
private void |
GetZMinEdges(int x,
int y,
int z,
int type,
ExtractSurfaceCubes.VETable table) |
void |
MakeUnique(Vector<Vector3f> vertices,
Vector<TriangleKey> triangles,
Vector<Vector3f> newVertices,
Vector<TriangleKey> newTriangles) |
void |
OrientTriangles(Vector<Vector3f> vertices,
Vector<TriangleKey> triangles,
boolean sameDir) |
private static final long serialVersionUID
protected static final int EI_XMIN_YMIN
protected static final int EI_XMIN_YMAX
protected static final int EI_XMAX_YMIN
protected static final int EI_XMAX_YMAX
protected static final int EI_XMIN_ZMIN
protected static final int EI_XMIN_ZMAX
protected static final int EI_XMAX_ZMIN
protected static final int EI_XMAX_ZMAX
protected static final int EI_YMIN_ZMIN
protected static final int EI_YMIN_ZMAX
protected static final int EI_YMAX_ZMIN
protected static final int EI_YMAX_ZMAX
protected static final int FI_XMIN
protected static final int FI_XMAX
protected static final int FI_YMIN
protected static final int FI_YMAX
protected static final int FI_ZMIN
protected static final int FI_ZMAX
protected static final int EB_XMIN_YMIN
protected static final int EB_XMIN_YMAX
protected static final int EB_XMAX_YMIN
protected static final int EB_XMAX_YMAX
protected static final int EB_XMIN_ZMIN
protected static final int EB_XMIN_ZMAX
protected static final int EB_XMAX_ZMIN
protected static final int EB_XMAX_ZMAX
protected static final int EB_YMIN_ZMIN
protected static final int EB_YMIN_ZMAX
protected static final int EB_YMAX_ZMIN
protected static final int EB_YMAX_ZMAX
protected int[] m_aiData
protected float m_fXDelta
protected float m_fYDelta
protected float m_fZDelta
protected int m_iXBound
protected int m_iYBound
protected int m_iZBound
protected int m_iXYBound
protected Vector3f m_kCentroid
protected Vector3f m_kE0
protected Vector3f m_kE1
protected Vector3f m_kGradient
protected Vector3f m_kN
public ExtractSurfaceCubes(int iXBound, int iYBound, int iZBound, int[] aiData)
iXBound
- the number of columns in the 3D imageiYBound
- the number of rows in the 3D imageiZBound
- the number of slices in the 3D imageaiData
- The image data stored in order of slice indices, each slice stored in row-major order.
That is, slice z=0 is stored first, slice z=1 is stored next, and so on. In slice z=0, the
y=0 row is stored first, the y=1 row is stored next, and so on.protected static int addVertex(Vector3f kV, HashMap<Vector3f,Integer> kVMap)
kV
- Vector3f sample space coordinates of the pointkVMap
- HashMap hashmap with Vector3f key and Integer value for adding the point if not already presentpublic void ExtractContour(float level, Vector<int[]> kTriTable, Vector<Vector3f> vertices, Vector<TriangleKey> triangles)
public void ExtractContour(float level, Vector<Vector3f> vertices, Vector<TriangleKey> triangles)
public Vector3f getGradient(Vector3f kP)
kP
- the sample space coordinates of the point to be interpolatedpublic void MakeUnique(Vector<Vector3f> vertices, Vector<TriangleKey> triangles, Vector<Vector3f> newVertices, Vector<TriangleKey> newTriangles)
public void OrientTriangles(Vector<Vector3f> vertices, Vector<TriangleKey> triangles, boolean sameDir)
private int GetVertices(float level, int x, int y, int z, ExtractSurfaceCubes.VETable table)
private void GetXMaxEdges(int x, int y, int z, int type, ExtractSurfaceCubes.VETable table)
private void GetXMinEdges(int x, int y, int z, int type, ExtractSurfaceCubes.VETable table)
private void GetYMaxEdges(int x, int y, int z, int type, ExtractSurfaceCubes.VETable table)
private void GetYMinEdges(int x, int y, int z, int type, ExtractSurfaceCubes.VETable table)
private void GetZMaxEdges(int x, int y, int z, int type, ExtractSurfaceCubes.VETable table)
private void GetZMinEdges(int x, int y, int z, int type, ExtractSurfaceCubes.VETable table)