Class MjCorticalMesh_WM
- java.lang.Object
-
- gov.nih.mipav.view.renderer.WildMagic.brainflattenerview_WM.MjCorticalMesh_WM
-
public class MjCorticalMesh_WM extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
MjCorticalMesh_WM.Polylines
DOCUMENT ME!
-
Field Summary
Fields Modifier and Type Field Description private float[]
m_afAvrConvexity
DOCUMENT ME!private float[]
m_afMeanCurvature
DOCUMENT ME!private WildMagic.LibFoundation.Mathematics.Vector3f[]
m_akCylinder
projection of sphere onto cylinder.private WildMagic.LibFoundation.Meshes.BasicMesh.Edge[]
m_akEdge
DOCUMENT ME!private WildMagic.LibFoundation.Mathematics.Vector2f[]
m_akPlane
Conformal mapping to a plane.private WildMagic.LibFoundation.Mathematics.Vector3f[]
m_akPoint
private WildMagic.LibFoundation.Mathematics.Vector3f[]
m_akSphere
Conformal mapping to a sphere. rho is the radius of the stereographic sphere.private WildMagic.LibFoundation.Meshes.BasicMesh.Triangle[]
m_akTriangle
DOCUMENT ME!private WildMagic.LibFoundation.Meshes.BasicMesh.Vertex[]
m_akVertex
DOCUMENT ME!private float
m_fMaxAvrConvexity
DOCUMENT ME!private float
m_fMaxDistance
DOCUMENT ME!private float
m_fMaxMeanCurvature
DOCUMENT ME!private float
m_fMinAvrConvexity
DOCUMENT ME!private float
m_fMinDistance
DOCUMENT ME!private float
m_fMinMeanCurvature
DOCUMENT ME!private float
m_fRho
DOCUMENT ME!private float
m_fSurfaceArea
DOCUMENT ME!private int
m_iEQuantity
DOCUMENT ME!private int
m_iPunctureTri
The index of the puncture triangle for computing the conformal mapping:.private WildMagic.LibFoundation.Meshes.BasicMesh
m_kBasicMesh
private WildMagic.LibGraphics.SceneGraph.TriMesh
m_kCylinderMesh
private java.util.HashMap<WildMagic.LibFoundation.Meshes.EdgeKey,java.lang.Float>
m_kDistance
vertex-vertex distances measured along edge paths.private java.util.HashMap<WildMagic.LibFoundation.Meshes.EdgeKey,java.lang.Float>
m_kInitDistance
surface inflation.private WildMagic.LibGraphics.SceneGraph.TriMesh
m_kMesh
private WildMagic.LibGraphics.SceneGraph.TriMesh
m_kSphereMesh
-
Constructor Summary
Constructors Constructor Description MjCorticalMesh_WM(WildMagic.LibGraphics.SceneGraph.TriMesh kMesh, WildMagic.LibFoundation.Mathematics.Vector3f kCenter)
Creates a new MjCorticalMesh object.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
CheckManifold()
void
computeConformalMapping()
conformal mapping of mesh to plane and sphere, projection to cylinder.private void
computeDistance(int iSize, int iSource, boolean bInitiator)
compute distances within specified neighborhood size (size >= 1).void
computeDistances(int iSize)
Computes the distances of vertex pairsfor which an edge-path exists with at most iSize edges. private void
computeExtremes()
DOCUMENT ME!void
computeMeanCurvature()
mean curvature.void
computeNormals()
compute vertex normals as averages of triangle normals.void
computeSurfaceArea()
surface area of the mesh (input mesh is closed, manifold).private static boolean
contains(WildMagic.LibFoundation.Mathematics.Vector2f[] akVertex, WildMagic.LibFoundation.Mathematics.Vector2f kP)
support for point-in-triangle tests; The akVertex array must have length 3.void
disposeLocal()
DOCUMENT ME!float
doInflation(int iOperation)
surface inflation operation 0 = initialize 1 = inflate 2 = terminate.private float
doInflationStep()
surface inflation.protected void
finalize()
DOCUMENT ME!float[]
getAvrConvexity()
DOCUMENT ME!private WildMagic.LibFoundation.Mathematics.Vector3f
getBarycentric(WildMagic.LibFoundation.Mathematics.Vector2f kP, int i)
Support for conformal mapping to planar triangle mesh.private int
getContainingTriangle(WildMagic.LibFoundation.Mathematics.Vector2f kP, int iStart)
Support for conformal mapping to planar triangle mesh.WildMagic.LibGraphics.SceneGraph.TriMesh
getCylinder()
DOCUMENT ME!WildMagic.LibFoundation.Mathematics.Vector3f[]
getCylinderCoordinates()
DOCUMENT ME!float
getDistance(int iV0, int iV1)
Vertex-vertex distance measured along the shortest edge-path connecting the two vertices.MjCorticalMesh_WM.Polylines
getLatitude(float fZNormal, float fMBias, float fSBias, float fPBias)
Produce polylines that are superimposed on the input cortical mesh, sphere, and plane.MjCorticalMesh_WM.Polylines
getLongitude(float fAngle, float fMBias, float fSBias, float fPBias)
DOCUMENT ME!float
getMaxMeanCurvature()
DOCUMENT ME!float[]
getMeanCurvature()
DOCUMENT ME!WildMagic.LibGraphics.SceneGraph.TriMesh
getMesh()
float
getMinMeanCurvature()
DOCUMENT ME!WildMagic.LibGraphics.SceneGraph.TriMesh
getSphere()
DOCUMENT ME!private float
getStereographicRadius()
support for unfolding.float
getSurfaceArea()
DOCUMENT ME!int
getVQuantity()
void
setColor(int i, float fRed, float fGreen, float fBlue)
void
setPunctureTriangle(int[] aiIndex)
Set the index of the triangle used to "puncture" the mesh before the conformal mapping is computed.void
updateMesh(boolean bUpdateNormals)
-
-
-
Field Detail
-
m_afAvrConvexity
private float[] m_afAvrConvexity
DOCUMENT ME!
-
m_afMeanCurvature
private float[] m_afMeanCurvature
DOCUMENT ME!
-
m_akCylinder
private WildMagic.LibFoundation.Mathematics.Vector3f[] m_akCylinder
projection of sphere onto cylinder.
-
m_akEdge
private WildMagic.LibFoundation.Meshes.BasicMesh.Edge[] m_akEdge
DOCUMENT ME!
-
m_akPlane
private WildMagic.LibFoundation.Mathematics.Vector2f[] m_akPlane
Conformal mapping to a plane. The (u,v) points correspond to the (x,y,z) mesh points.
-
m_akSphere
private WildMagic.LibFoundation.Mathematics.Vector3f[] m_akSphere
Conformal mapping to a sphere. rho is the radius of the stereographic sphere.
-
m_akTriangle
private WildMagic.LibFoundation.Meshes.BasicMesh.Triangle[] m_akTriangle
DOCUMENT ME!
-
m_akVertex
private WildMagic.LibFoundation.Meshes.BasicMesh.Vertex[] m_akVertex
DOCUMENT ME!
-
m_fMaxAvrConvexity
private float m_fMaxAvrConvexity
DOCUMENT ME!
-
m_fMaxDistance
private float m_fMaxDistance
DOCUMENT ME!
-
m_fMaxMeanCurvature
private float m_fMaxMeanCurvature
DOCUMENT ME!
-
m_fMinAvrConvexity
private float m_fMinAvrConvexity
DOCUMENT ME!
-
m_fMinDistance
private float m_fMinDistance
DOCUMENT ME!
-
m_fMinMeanCurvature
private float m_fMinMeanCurvature
DOCUMENT ME!
-
m_fRho
private float m_fRho
DOCUMENT ME!
-
m_fSurfaceArea
private float m_fSurfaceArea
DOCUMENT ME!
-
m_iEQuantity
private int m_iEQuantity
DOCUMENT ME!
-
m_iPunctureTri
private int m_iPunctureTri
The index of the puncture triangle for computing the conformal mapping:.
-
m_kDistance
private java.util.HashMap<WildMagic.LibFoundation.Meshes.EdgeKey,java.lang.Float> m_kDistance
vertex-vertex distances measured along edge paths.
-
m_kInitDistance
private java.util.HashMap<WildMagic.LibFoundation.Meshes.EdgeKey,java.lang.Float> m_kInitDistance
surface inflation.
-
m_kMesh
private WildMagic.LibGraphics.SceneGraph.TriMesh m_kMesh
-
m_kBasicMesh
private WildMagic.LibFoundation.Meshes.BasicMesh m_kBasicMesh
-
m_akPoint
private WildMagic.LibFoundation.Mathematics.Vector3f[] m_akPoint
-
m_kSphereMesh
private WildMagic.LibGraphics.SceneGraph.TriMesh m_kSphereMesh
-
m_kCylinderMesh
private WildMagic.LibGraphics.SceneGraph.TriMesh m_kCylinderMesh
-
-
Method Detail
-
contains
private static boolean contains(WildMagic.LibFoundation.Mathematics.Vector2f[] akVertex, WildMagic.LibFoundation.Mathematics.Vector2f kP)
support for point-in-triangle tests; The akVertex array must have length 3.- Parameters:
akVertex
- DOCUMENT ME!kP
- DOCUMENT ME!- Returns:
- DOCUMENT ME!
-
CheckManifold
public boolean CheckManifold()
-
computeConformalMapping
public void computeConformalMapping()
conformal mapping of mesh to plane and sphere, projection to cylinder.
-
computeDistances
public void computeDistances(int iSize)
Computes the distances of vertex pairsfor which an edge-path exists with at most iSize edges. - Parameters:
iSize
- DOCUMENT ME!
-
computeMeanCurvature
public void computeMeanCurvature()
mean curvature.
-
computeNormals
public void computeNormals()
compute vertex normals as averages of triangle normals.
-
computeSurfaceArea
public void computeSurfaceArea()
surface area of the mesh (input mesh is closed, manifold).
-
disposeLocal
public void disposeLocal()
DOCUMENT ME!
-
doInflation
public float doInflation(int iOperation)
surface inflation operation 0 = initialize 1 = inflate 2 = terminate.- Parameters:
iOperation
- DOCUMENT ME!- Returns:
- DOCUMENT ME!
-
getAvrConvexity
public float[] getAvrConvexity()
DOCUMENT ME!- Returns:
- DOCUMENT ME!
-
getCylinder
public WildMagic.LibGraphics.SceneGraph.TriMesh getCylinder()
DOCUMENT ME!- Returns:
- DOCUMENT ME!
-
getCylinderCoordinates
public WildMagic.LibFoundation.Mathematics.Vector3f[] getCylinderCoordinates()
DOCUMENT ME!- Returns:
- DOCUMENT ME!
-
getDistance
public float getDistance(int iV0, int iV1)
Vertex-vertex distance measured along the shortest edge-path connecting the two vertices.- Parameters:
iV0
- DOCUMENT ME!iV1
- DOCUMENT ME!- Returns:
- DOCUMENT ME!
-
getLatitude
public MjCorticalMesh_WM.Polylines getLatitude(float fZNormal, float fMBias, float fSBias, float fPBias)
Produce polylines that are superimposed on the input cortical mesh, sphere, and plane. The znormal value indicates the z-slice on the unit sphere that is mapped to the polyline on the mesh. This value is in (-1,1). The angle value indicates the theta-slice on the unit sphere, theta measured as a positive angle counterclockwise from the x-axis towards the y-axis. This value is in [0,2*pi]. The bias value adds a small amount to the polyline to raise it above the mesh surface to avoid z-buffer fighting.- Parameters:
fZNormal
- DOCUMENT ME!fMBias
- DOCUMENT ME!fSBias
- DOCUMENT ME!fPBias
- DOCUMENT ME!- Returns:
- DOCUMENT ME!
-
getLongitude
public MjCorticalMesh_WM.Polylines getLongitude(float fAngle, float fMBias, float fSBias, float fPBias)
DOCUMENT ME!- Parameters:
fAngle
- DOCUMENT ME!fMBias
- DOCUMENT ME!fSBias
- DOCUMENT ME!fPBias
- DOCUMENT ME!- Returns:
- DOCUMENT ME!
-
getMaxMeanCurvature
public float getMaxMeanCurvature()
DOCUMENT ME!- Returns:
- DOCUMENT ME!
-
getMeanCurvature
public float[] getMeanCurvature()
DOCUMENT ME!- Returns:
- DOCUMENT ME!
-
getMesh
public WildMagic.LibGraphics.SceneGraph.TriMesh getMesh()
-
getMinMeanCurvature
public float getMinMeanCurvature()
DOCUMENT ME!- Returns:
- DOCUMENT ME!
-
getSphere
public WildMagic.LibGraphics.SceneGraph.TriMesh getSphere()
DOCUMENT ME!- Returns:
- DOCUMENT ME!
-
getSurfaceArea
public float getSurfaceArea()
DOCUMENT ME!- Returns:
- DOCUMENT ME!
-
getVQuantity
public int getVQuantity()
-
setColor
public void setColor(int i, float fRed, float fGreen, float fBlue)
-
setPunctureTriangle
public void setPunctureTriangle(int[] aiIndex)
Set the index of the triangle used to "puncture" the mesh before the conformal mapping is computed. The triangle is found based on the three index values that describe the triangle:- Parameters:
aiIndex
- DOCUMENT ME!
-
updateMesh
public void updateMesh(boolean bUpdateNormals)
-
computeDistance
private void computeDistance(int iSize, int iSource, boolean bInitiator)
compute distances within specified neighborhood size (size >= 1).- Parameters:
iSize
- DOCUMENT ME!iSource
- DOCUMENT ME!bInitiator
- DOCUMENT ME!
-
computeExtremes
private void computeExtremes()
DOCUMENT ME!
-
doInflationStep
private float doInflationStep()
surface inflation.- Returns:
- DOCUMENT ME!
-
getBarycentric
private WildMagic.LibFoundation.Mathematics.Vector3f getBarycentric(WildMagic.LibFoundation.Mathematics.Vector2f kP, int i)
Support for conformal mapping to planar triangle mesh. Once the containing triangle i is found, compute the barycentric coordinates of P relative to the triangle vertices V0, V1, and V2.- Parameters:
kP
- DOCUMENT ME!i
- DOCUMENT ME!- Returns:
- DOCUMENT ME!
-
getContainingTriangle
private int getContainingTriangle(WildMagic.LibFoundation.Mathematics.Vector2f kP, int iStart)
Support for conformal mapping to planar triangle mesh. Use a linear walk to locate a triangle containing P. The index of such a triangle is returned, unless there is no containing triangle in which case the return value is -1. The "start" index is the suggested starting triangle. When testing a lot of points that are ordered in some spatial manner, the chance that the triangle containing the previous test point will contain the next test point (or a neighbor might contain it). Taking advantage of spatial coherence should speed up the search in "batch mode".- Parameters:
kP
- DOCUMENT ME!iStart
- DOCUMENT ME!- Returns:
- DOCUMENT ME!
-
getStereographicRadius
private float getStereographicRadius()
support for unfolding.- Returns:
- DOCUMENT ME!
-
finalize
protected void finalize() throws java.lang.Throwable
DOCUMENT ME!- Overrides:
finalize
in classjava.lang.Object
- Throws:
java.lang.Throwable
- DOCUMENT ME!
-
-