Class Octree
- java.lang.Object
-
- gov.nih.mipav.view.renderer.WildMagic.Poisson.Octree.Octree
-
public class Octree extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description private int
Degree
static int
DIMENSION
static float
EPSILON
FunctionData
fData
private Geometry
geo
static double
ITERATION_POWER
static double
maxMemoryUsage
static int
MEMORY_ALLOCATOR_BLOCK_SIZE
(package private) NeighborKey
neighborKey
(package private) NeighborKey2
neighborKey2
java.util.Vector<Point3D>
normals
static float
PAD_SIZE
float
postNormalSmooth
(package private) float
radius
static int
READ_SIZE
static float
ROUND_EPS
OctNode
tree
(package private) int
width
-
Constructor Summary
Constructors Constructor Description Octree(int _Degree)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static int
AddTriangles(CoredMeshData mesh, java.util.Vector<CoredPointIndex>[] edges, java.util.Vector<Point3D> interiorPositions, int offSet)
static int
AddTriangles(CoredMeshData mesh, java.util.Vector<CoredPointIndex> edges, java.util.Vector<Point3D> interiorPositions, int offSet)
void
ClipTree()
static int
EdgeRootCount(OctNode node, int edgeIndex, int maxDepth)
void
finalize1(int refineNeighbors)
void
finalize2(int refineNeighbors)
float
getCenterValue(OctNode node)
float
getCornerValue(OctNode node, int corner)
void
getCornerValueAndNormal(OctNode node, int corner, float[] value, Point3D normal)
float
GetDivergence(int[] idx, Point3D normal)
float
GetDotProduct(int[] idx)
static int
GetEdgeLoops(java.util.Vector<Pair<java.lang.Long,java.lang.Long>> edges, java.util.Vector<java.util.Vector<Pair<java.lang.Long,java.lang.Long>>> loops)
int
GetFixedDepthLaplacian(SparseSymmetricMatrix matrix, int depth, SortedTreeNodes sNodes)
float
GetIsoValue()
float
GetLaplacian(int[] idx)
void
GetMCIsoEdges(OctNode node, java.util.HashMap<java.lang.Long,java.lang.Integer> boundaryRoots, java.util.HashMap<java.lang.Long,java.lang.Integer> interiorRoots, int sDepth, java.util.Vector<Pair<java.lang.Long,java.lang.Long>> edges)
void
GetMCIsoTriangles(float isoValue, CoredMeshData mesh, int fullDepthIso, int nonLinearFit)
int
GetMCIsoTriangles(OctNode node, CoredMeshData mesh, java.util.HashMap<java.lang.Long,java.lang.Integer> boundaryRoots, java.util.HashMap<java.lang.Long,java.lang.Integer> interiorRoots, java.util.Vector<Point3D> interiorPositions, int offSet, int sDepth)
void
GetMCIsoTriangles(java.lang.Float isoValue, int subdivideDepth, CoredMeshData mesh, int fullDepthIso, int nonLinearFit)
int
GetRestrictedFixedDepthLaplacian(SparseSymmetricMatrix matrix, int depth, int[] entries, int entryCount, OctNode rNode, float radius, SortedTreeNodes sNodes)
int
GetRoot(RootInfo ri, float isoValue, int maxDepth, Point3D position, java.util.HashMap<java.lang.Long,Pair<java.lang.Float,Point3D>> normals, Point3D normal, int nonLinearFit)
int
GetRoot(RootInfo ri, float isoValue, Point3D position, java.util.HashMap<java.lang.Long,Pair<java.lang.Float,Point3D>> normalHash, int nonLinearFit)
static int
GetRootIndex(OctNode node, int edgeIndex, int maxDepth, int sDepth, RootInfo ri)
static boolean
GetRootIndex(OctNode node, int edgeIndex, int maxDepth, RootInfo ri)
static int
GetRootIndex(java.lang.Long key, java.util.HashMap<java.lang.Long,java.lang.Integer> boundaryRoots, java.util.HashMap<java.lang.Long,java.lang.Integer> interiorRoots, CoredPointIndex index)
boolean
GetRootPair(RootInfo ri, int maxDepth, RootInfo pair)
int
HasNormals(OctNode node, float epsilon)
static int
InteriorFaceRootCount(OctNode node, int faceIndex, int maxDepth)
static boolean
IsBoundaryEdge(OctNode node, int edgeIndex, int subdivideDepth)
static boolean
IsBoundaryEdge(OctNode node, int dir, int x, int y, int subdivideDepth)
static int
IsBoundaryFace(OctNode node, int faceIndex, int subdivideDepth)
int
LaplacianMatrixIteration(int subdivideDepth)
void
NonLinearGetSampleDepthAndWeight(OctNode node, Point3D position, float samplesPerNode, float[] depth, float[] weight)
float
NonLinearGetSampleWeight(OctNode node, Point3D position)
void
NonLinearSplatOrientedPoint(Point3D position, Point3D normal, int splatDepth, float samplesPerNode, int minDepth, int maxDepth)
int
NonLinearSplatOrientedPoint(OctNode node, Point3D position, Point3D normal)
int
NonLinearUpdateWeightContribution(OctNode node, Point3D position, float weight)
static void
pause()
Pauses the display until the user hits enter.void
PreValidate(float isoValue, int maxDepth, int subdivideDepth)
void
PreValidate(OctNode node, float isoValue, int maxDepth, int subdivideDepth)
void
printTree()
java.lang.String
readLine(java.io.InputStream in)
int
SetBoundaryMCRootPositions(int sDepth, float isoValue, java.util.HashMap<java.lang.Long,java.lang.Integer> boundaryRoots, java.util.HashMap<java.lang.Long,Pair<java.lang.Float,Point3D>> boundaryNormalHash, CoredMeshData mesh, int nonLinearFit)
void
setFunctionData(PPolynomial ReconstructionFunction, int maxDepth, int normalize, float normalSmooth)
void
SetIsoSurfaceCorners(float isoValue, int subdivideDepth, int fullDepthIso)
void
SetLaplacianWeights()
int
SetMCRootPositions(OctNode node, int sDepth, float isoValue, java.util.HashMap<java.lang.Long,java.lang.Integer> boundaryRoots, java.util.HashMap<java.lang.Long,java.lang.Integer> interiorRoots, java.util.HashMap<java.lang.Long,Pair<java.lang.Float,Point3D>> boundaryNormalHash, java.util.HashMap<java.lang.Long,Pair<java.lang.Float,Point3D>> interiorNormalHash, java.util.Vector<Point3D> interiorPositions, CoredMeshData mesh, int nonLinearFit)
void
setNodeIndices(OctNode node, int[] idx)
int
setTree(java.lang.String fileName, int maxDepth, int binary, int kernelDepth, float samplesPerNode, float scaleFactor, Point3D center, float[] scale, int resetSamples, int useConfidence)
int
SolveFixedDepthMatrix(int depth, int startingDepth, SortedTreeNodes sNodes)
int
SolveFixedDepthMatrix(int depth, SortedTreeNodes sNodes)
void
Subdivide(OctNode node, float isoValue, int maxDepth)
void
Validate(OctNode node, float isoValue, int maxDepth, int fullDepthIso)
void
Validate(OctNode node, float isoValue, int maxDepth, int fullDepthIso, int subdivideDepth)
-
-
-
Field Detail
-
DIMENSION
public static int DIMENSION
-
neighborKey
NeighborKey neighborKey
-
neighborKey2
NeighborKey2 neighborKey2
-
radius
float radius
-
width
int width
-
maxMemoryUsage
public static double maxMemoryUsage
-
normals
public java.util.Vector<Point3D> normals
-
postNormalSmooth
public float postNormalSmooth
-
tree
public OctNode tree
-
fData
public FunctionData fData
-
ITERATION_POWER
public static double ITERATION_POWER
-
MEMORY_ALLOCATOR_BLOCK_SIZE
public static int MEMORY_ALLOCATOR_BLOCK_SIZE
-
READ_SIZE
public static int READ_SIZE
-
PAD_SIZE
public static float PAD_SIZE
-
EPSILON
public static float EPSILON
-
ROUND_EPS
public static float ROUND_EPS
-
geo
private Geometry geo
-
Degree
private int Degree
-
-
Method Detail
-
setNodeIndices
public void setNodeIndices(OctNode node, int[] idx)
-
NonLinearSplatOrientedPoint
public int NonLinearSplatOrientedPoint(OctNode node, Point3D position, Point3D normal)
-
NonLinearSplatOrientedPoint
public void NonLinearSplatOrientedPoint(Point3D position, Point3D normal, int splatDepth, float samplesPerNode, int minDepth, int maxDepth)
-
NonLinearGetSampleDepthAndWeight
public void NonLinearGetSampleDepthAndWeight(OctNode node, Point3D position, float samplesPerNode, float[] depth, float[] weight)
-
NonLinearUpdateWeightContribution
public int NonLinearUpdateWeightContribution(OctNode node, Point3D position, float weight)
-
pause
public static void pause()
Pauses the display until the user hits enter.
-
readLine
public java.lang.String readLine(java.io.InputStream in) throws java.io.IOException
- Throws:
java.io.IOException
-
setTree
public int setTree(java.lang.String fileName, int maxDepth, int binary, int kernelDepth, float samplesPerNode, float scaleFactor, Point3D center, float[] scale, int resetSamples, int useConfidence)
-
setFunctionData
public void setFunctionData(PPolynomial ReconstructionFunction, int maxDepth, int normalize, float normalSmooth)
-
finalize1
public void finalize1(int refineNeighbors)
-
finalize2
public void finalize2(int refineNeighbors)
-
GetDivergence
public final float GetDivergence(int[] idx, Point3D normal)
-
GetLaplacian
public final float GetLaplacian(int[] idx)
-
GetDotProduct
public final float GetDotProduct(int[] idx)
-
GetFixedDepthLaplacian
public int GetFixedDepthLaplacian(SparseSymmetricMatrix matrix, int depth, SortedTreeNodes sNodes)
-
GetRestrictedFixedDepthLaplacian
public int GetRestrictedFixedDepthLaplacian(SparseSymmetricMatrix matrix, int depth, int[] entries, int entryCount, OctNode rNode, float radius, SortedTreeNodes sNodes)
-
LaplacianMatrixIteration
public int LaplacianMatrixIteration(int subdivideDepth)
-
SolveFixedDepthMatrix
public int SolveFixedDepthMatrix(int depth, SortedTreeNodes sNodes)
-
SolveFixedDepthMatrix
public int SolveFixedDepthMatrix(int depth, int startingDepth, SortedTreeNodes sNodes)
-
HasNormals
public int HasNormals(OctNode node, float epsilon)
-
printTree
public void printTree()
-
ClipTree
public void ClipTree()
-
SetLaplacianWeights
public void SetLaplacianWeights()
-
GetMCIsoTriangles
public void GetMCIsoTriangles(float isoValue, CoredMeshData mesh, int fullDepthIso, int nonLinearFit)
-
GetMCIsoTriangles
public void GetMCIsoTriangles(java.lang.Float isoValue, int subdivideDepth, CoredMeshData mesh, int fullDepthIso, int nonLinearFit)
-
getCenterValue
public float getCenterValue(OctNode node)
-
getCornerValue
public float getCornerValue(OctNode node, int corner)
-
getCornerValueAndNormal
public void getCornerValueAndNormal(OctNode node, int corner, float[] value, Point3D normal)
-
GetIsoValue
public float GetIsoValue()
-
SetIsoSurfaceCorners
public void SetIsoSurfaceCorners(float isoValue, int subdivideDepth, int fullDepthIso)
-
Subdivide
public void Subdivide(OctNode node, float isoValue, int maxDepth)
-
InteriorFaceRootCount
public static int InteriorFaceRootCount(OctNode node, int faceIndex, int maxDepth)
-
EdgeRootCount
public static int EdgeRootCount(OctNode node, int edgeIndex, int maxDepth)
-
IsBoundaryFace
public static int IsBoundaryFace(OctNode node, int faceIndex, int subdivideDepth)
-
IsBoundaryEdge
public static boolean IsBoundaryEdge(OctNode node, int edgeIndex, int subdivideDepth)
-
IsBoundaryEdge
public static boolean IsBoundaryEdge(OctNode node, int dir, int x, int y, int subdivideDepth)
-
PreValidate
public void PreValidate(OctNode node, float isoValue, int maxDepth, int subdivideDepth)
-
PreValidate
public void PreValidate(float isoValue, int maxDepth, int subdivideDepth)
-
Validate
public void Validate(OctNode node, float isoValue, int maxDepth, int fullDepthIso)
-
Validate
public void Validate(OctNode node, float isoValue, int maxDepth, int fullDepthIso, int subdivideDepth)
-
GetRoot
public int GetRoot(RootInfo ri, float isoValue, Point3D position, java.util.HashMap<java.lang.Long,Pair<java.lang.Float,Point3D>> normalHash, int nonLinearFit)
-
GetRoot
public int GetRoot(RootInfo ri, float isoValue, int maxDepth, Point3D position, java.util.HashMap<java.lang.Long,Pair<java.lang.Float,Point3D>> normals, Point3D normal, int nonLinearFit)
-
GetRootIndex
public static int GetRootIndex(OctNode node, int edgeIndex, int maxDepth, int sDepth, RootInfo ri)
-
GetRootIndex
public static boolean GetRootIndex(OctNode node, int edgeIndex, int maxDepth, RootInfo ri)
-
GetRootIndex
public static int GetRootIndex(java.lang.Long key, java.util.HashMap<java.lang.Long,java.lang.Integer> boundaryRoots, java.util.HashMap<java.lang.Long,java.lang.Integer> interiorRoots, CoredPointIndex index)
-
SetMCRootPositions
public int SetMCRootPositions(OctNode node, int sDepth, float isoValue, java.util.HashMap<java.lang.Long,java.lang.Integer> boundaryRoots, java.util.HashMap<java.lang.Long,java.lang.Integer> interiorRoots, java.util.HashMap<java.lang.Long,Pair<java.lang.Float,Point3D>> boundaryNormalHash, java.util.HashMap<java.lang.Long,Pair<java.lang.Float,Point3D>> interiorNormalHash, java.util.Vector<Point3D> interiorPositions, CoredMeshData mesh, int nonLinearFit)
-
SetBoundaryMCRootPositions
public int SetBoundaryMCRootPositions(int sDepth, float isoValue, java.util.HashMap<java.lang.Long,java.lang.Integer> boundaryRoots, java.util.HashMap<java.lang.Long,Pair<java.lang.Float,Point3D>> boundaryNormalHash, CoredMeshData mesh, int nonLinearFit)
-
GetMCIsoEdges
public void GetMCIsoEdges(OctNode node, java.util.HashMap<java.lang.Long,java.lang.Integer> boundaryRoots, java.util.HashMap<java.lang.Long,java.lang.Integer> interiorRoots, int sDepth, java.util.Vector<Pair<java.lang.Long,java.lang.Long>> edges)
-
GetMCIsoTriangles
public int GetMCIsoTriangles(OctNode node, CoredMeshData mesh, java.util.HashMap<java.lang.Long,java.lang.Integer> boundaryRoots, java.util.HashMap<java.lang.Long,java.lang.Integer> interiorRoots, java.util.Vector<Point3D> interiorPositions, int offSet, int sDepth)
-
GetEdgeLoops
public static int GetEdgeLoops(java.util.Vector<Pair<java.lang.Long,java.lang.Long>> edges, java.util.Vector<java.util.Vector<Pair<java.lang.Long,java.lang.Long>>> loops)
-
AddTriangles
public static int AddTriangles(CoredMeshData mesh, java.util.Vector<CoredPointIndex>[] edges, java.util.Vector<Point3D> interiorPositions, int offSet)
-
AddTriangles
public static int AddTriangles(CoredMeshData mesh, java.util.Vector<CoredPointIndex> edges, java.util.Vector<Point3D> interiorPositions, int offSet)
-
-