Class MjCorticalMesh
java.lang.Object
gov.nih.mipav.view.renderer.J3D.surfaceview.brainflattenerview.MjCorticalMesh
DOCUMENT ME!
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classDOCUMENT ME!static classDOCUMENT ME!static classDOCUMENT ME!static classDOCUMENT ME! -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate float[]DOCUMENT ME!private float[]DOCUMENT ME!private int[]DOCUMENT ME!private javax.vecmath.Color4f[]DOCUMENT ME!private javax.vecmath.Point3f[]projection of sphere onto cylinder.private MjCorticalMesh.Edge[]DOCUMENT ME!private MjVector3f[]DOCUMENT ME!private javax.vecmath.Point2f[]Conformal mapping to a plane.private javax.vecmath.Point3f[]mesh attributes.private javax.vecmath.Point3f[]Conformal mapping to a sphere. rho is the radius of the stereographic sphere.private MjCorticalMesh.Triangle[]DOCUMENT ME!private MjCorticalMesh.Vertex[]DOCUMENT ME!private floatDOCUMENT ME!private floatDOCUMENT ME!private floatDOCUMENT ME!private floatDOCUMENT ME!private floatDOCUMENT ME!private floatDOCUMENT ME!private floatDOCUMENT ME!private floatDOCUMENT ME!private intDOCUMENT ME!private intThe index of the puncture triangle for computing the conformal mapping:.private intDOCUMENT ME!private intmesh topology.private HashMapvertex-vertex distances measured along edge paths.private HashMapsurface inflation.private javax.vecmath.Point2fDOCUMENT ME!private javax.vecmath.Point2fDOCUMENT ME! -
Constructor Summary
ConstructorsConstructorDescriptionMjCorticalMesh(int iVQuantity, javax.vecmath.Point3f[] akPoint, int iTQuantity, int[] aiConnect) Creates a new MjCorticalMesh object. -
Method Summary
Modifier and TypeMethodDescriptionvoidconformal mapping of mesh to plane and sphere, projection to cylinder.private voidcomputeDistance(int iSize, int iSource, boolean bInitiator) compute distances within specified neighborhood size (size >= 1).voidcomputeDistances(int iSize) Computes the distances of vertex pairs invalid input: '<'V0,V1> for which an edge-path exists with at most iSize edges.private voidDOCUMENT ME!voidmean curvature.voidcompute vertex normals as averages of triangle normals.private floatcomputeRadius(MjVector2f kV0, MjVector2f kV1, MjVector2f kV2, float fAreaFraction) DOCUMENT ME!voidsurface area of the mesh (input mesh is closed, manifold).private static booleancontains(javax.vecmath.Point2f[] akVertex, javax.vecmath.Point2f kP) support for point-in-triangle tests; The akVertex array must have length 3.voidDOCUMENT ME!floatdoInflation(int iOperation) surface inflation operation 0 = initialize 1 = inflate 2 = terminate.private floatsurface inflation.protected voidfinalize()DOCUMENT ME!float[]DOCUMENT ME!private javax.vecmath.Point3fgetBarycentric(javax.vecmath.Point2f kP, int i) Support for conformal mapping to planar triangle mesh.javax.vecmath.Color4f[]DOCUMENT ME!javax.vecmath.Color4f[]DOCUMENT ME!int[]DOCUMENT ME!int[]DOCUMENT ME!private intgetContainingTriangle(javax.vecmath.Point2f kP, int iStart) Support for conformal mapping to planar triangle mesh.javax.vecmath.Point3f[]DOCUMENT ME!floatgetDistance(int iV0, int iV1) Vertex-vertex distance measured along the shortest edge-path connecting the two vertices.access to the distance map - stored in map from MjEdgeKey to Float.getEdges()DOCUMENT ME!intDOCUMENT ME!getLatitude(float fZNormal, float fMBias, float fSBias, float fPBias) Produce polylines that are superimposed on the input cortical mesh, sphere, and plane.getLongitude(float fAngle, float fMBias, float fSBias, float fPBias) DOCUMENT ME!floatDOCUMENT ME!floatDOCUMENT ME!floatDOCUMENT ME!float[]DOCUMENT ME!floatDOCUMENT ME!floatDOCUMENT ME!floatDOCUMENT ME!javax.vecmath.Vector3f[]DOCUMENT ME!DOCUMENT ME!javax.vecmath.Point2f[]DOCUMENT ME!javax.vecmath.Point2fDOCUMENT ME!javax.vecmath.Point2fDOCUMENT ME!javax.vecmath.Point3f[]DOCUMENT ME!javax.vecmath.Point3f[]attribute member access.javax.vecmath.Point3f[]DOCUMENT ME!private floatsupport for unfolding.floatDOCUMENT ME!intDOCUMENT ME!DOCUMENT ME!DOCUMENT ME!inttopology member access.floatuniformly scale points to [-1,1]^3, originally in [min,max]^3 returns 2D vector with (min,max) as the elements public Vector2f scaleToCube ().voidsetPunctureTriangle(int[] aiIndex) Set the index of the triangle used to "puncture" the mesh before the conformal mapping is computed.
-
Field Details
-
m_afAvrConvexity
private float[] m_afAvrConvexityDOCUMENT ME! -
m_afMeanCurvature
private float[] m_afMeanCurvatureDOCUMENT ME! -
m_aiConnect
private int[] m_aiConnectDOCUMENT ME! -
m_akColor
private javax.vecmath.Color4f[] m_akColorDOCUMENT ME! -
m_akCylinder
private javax.vecmath.Point3f[] m_akCylinderprojection of sphere onto cylinder. -
m_akEdge
DOCUMENT ME! -
m_akNormal
DOCUMENT ME! -
m_akPlane
private javax.vecmath.Point2f[] m_akPlaneConformal mapping to a plane. The (u,v) points correspond to the (x,y,z) mesh points. -
m_akPoint
private javax.vecmath.Point3f[] m_akPointmesh attributes. -
m_akSphere
private javax.vecmath.Point3f[] m_akSphereConformal mapping to a sphere. rho is the radius of the stereographic sphere. -
m_akTriangle
DOCUMENT ME! -
m_akVertex
DOCUMENT ME! -
m_fMaxAvrConvexity
private float m_fMaxAvrConvexityDOCUMENT ME! -
m_fMaxDistance
private float m_fMaxDistanceDOCUMENT ME! -
m_fMaxMeanCurvature
private float m_fMaxMeanCurvatureDOCUMENT ME! -
m_fMinAvrConvexity
private float m_fMinAvrConvexityDOCUMENT ME! -
m_fMinDistance
private float m_fMinDistanceDOCUMENT ME! -
m_fMinMeanCurvature
private float m_fMinMeanCurvatureDOCUMENT ME! -
m_fRho
private float m_fRhoDOCUMENT ME! -
m_fSurfaceArea
private float m_fSurfaceAreaDOCUMENT ME! -
m_iEQuantity
private int m_iEQuantityDOCUMENT ME! -
m_iPunctureTri
private int m_iPunctureTriThe index of the puncture triangle for computing the conformal mapping:. -
m_iTQuantity
private int m_iTQuantityDOCUMENT ME! -
m_iVQuantity
private int m_iVQuantitymesh topology. -
m_kDistance
vertex-vertex distances measured along edge paths. -
m_kInitDistance
surface inflation. -
m_kPlaneMax
private javax.vecmath.Point2f m_kPlaneMaxDOCUMENT ME! -
m_kPlaneMin
private javax.vecmath.Point2f m_kPlaneMinDOCUMENT ME!
-
-
Constructor Details
-
MjCorticalMesh
public MjCorticalMesh(int iVQuantity, javax.vecmath.Point3f[] akPoint, int iTQuantity, int[] aiConnect) Creates a new MjCorticalMesh object.- Parameters:
iVQuantity- DOCUMENT ME!akPoint- DOCUMENT ME!iTQuantity- DOCUMENT ME!aiConnect- DOCUMENT ME!
-
-
Method Details
-
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 pairs invalid input: '<'V0,V1> for 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!
-
getColorCopy
public javax.vecmath.Color4f[] getColorCopy()DOCUMENT ME!- Returns:
- DOCUMENT ME!
-
getColors
public javax.vecmath.Color4f[] getColors()DOCUMENT ME!- Returns:
- DOCUMENT ME!
-
getConnectivity
public int[] getConnectivity()DOCUMENT ME!- Returns:
- DOCUMENT ME!
-
getConnectivityCopy
public int[] getConnectivityCopy()DOCUMENT ME!- Returns:
- DOCUMENT ME!
-
getCylinderCoordinates
public javax.vecmath.Point3f[] 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!
-
getDistanceMap
access to the distance map - stored in map from MjEdgeKey to Float.- Returns:
- DOCUMENT ME!
-
getEdges
DOCUMENT ME!- Returns:
- DOCUMENT ME!
-
getEQuantity
public int getEQuantity()DOCUMENT ME!- Returns:
- DOCUMENT ME!
-
getLatitude
public MjCorticalMesh.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.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!
-
getMaxAvrConvexity
public float getMaxAvrConvexity()DOCUMENT ME!- Returns:
- DOCUMENT ME!
-
getMaxDistance
public float getMaxDistance()DOCUMENT ME!- Returns:
- DOCUMENT ME!
-
getMaxMeanCurvature
public float getMaxMeanCurvature()DOCUMENT ME!- Returns:
- DOCUMENT ME!
-
getMeanCurvature
public float[] getMeanCurvature()DOCUMENT ME!- Returns:
- DOCUMENT ME!
-
getMinAvrConvexity
public float getMinAvrConvexity()DOCUMENT ME!- Returns:
- DOCUMENT ME!
-
getMinDistance
public float getMinDistance()DOCUMENT ME!- Returns:
- DOCUMENT ME!
-
getMinMeanCurvature
public float getMinMeanCurvature()DOCUMENT ME!- Returns:
- DOCUMENT ME!
-
getNormalCopy
public javax.vecmath.Vector3f[] getNormalCopy()DOCUMENT ME!- Returns:
- DOCUMENT ME!
-
getNormals
DOCUMENT ME!- Returns:
- DOCUMENT ME!
-
getPlaneCoordinates
public javax.vecmath.Point2f[] getPlaneCoordinates()DOCUMENT ME!- Returns:
- DOCUMENT ME!
-
getPlaneMax
public javax.vecmath.Point2f getPlaneMax()DOCUMENT ME!- Returns:
- DOCUMENT ME!
-
getPlaneMin
public javax.vecmath.Point2f getPlaneMin()DOCUMENT ME!- Returns:
- DOCUMENT ME!
-
getPointCopy
public javax.vecmath.Point3f[] getPointCopy()DOCUMENT ME!- Returns:
- DOCUMENT ME!
-
getPoints
public javax.vecmath.Point3f[] getPoints()attribute member access.- Returns:
- DOCUMENT ME!
-
getSphereCoordinates
public javax.vecmath.Point3f[] getSphereCoordinates()DOCUMENT ME!- Returns:
- DOCUMENT ME!
-
getSurfaceArea
public float getSurfaceArea()DOCUMENT ME!- Returns:
- DOCUMENT ME!
-
getTQuantity
public int getTQuantity()DOCUMENT ME!- Returns:
- DOCUMENT ME!
-
getTriangles
DOCUMENT ME!- Returns:
- DOCUMENT ME!
-
getVertices
DOCUMENT ME!- Returns:
- DOCUMENT ME!
-
getVQuantity
public int getVQuantity()topology member access.- Returns:
- DOCUMENT ME!
-
scaleToCube
public float scaleToCube()uniformly scale points to [-1,1]^3, originally in [min,max]^3 returns 2D vector with (min,max) as the elements public Vector2f scaleToCube ().- Returns:
- DOCUMENT ME!
-
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!
-
finalize
DOCUMENT ME! -
contains
private static boolean contains(javax.vecmath.Point2f[] akVertex, javax.vecmath.Point2f kP) support for point-in-triangle tests; The akVertex array must have length 3.- Parameters:
akVertex- DOCUMENT ME!kP- DOCUMENT ME!- Returns:
- DOCUMENT ME!
-
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! -
computeRadius
DOCUMENT ME!- Parameters:
kV0- DOCUMENT ME!kV1- DOCUMENT ME!kV2- DOCUMENT ME!fAreaFraction- DOCUMENT ME!- Returns:
- DOCUMENT ME!
-
doInflationStep
private float doInflationStep()surface inflation.- Returns:
- DOCUMENT ME!
-
getBarycentric
private javax.vecmath.Point3f getBarycentric(javax.vecmath.Point2f 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(javax.vecmath.Point2f 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!
-