Constructor and Description |
---|
Meshes() |
Modifier and Type | Method and Description |
---|---|
static float[] |
boundingBox(Mesh mesh) |
static void |
calculateNormals(Mesh src,
Mesh dest)
Calculates the normals for a mesh.
|
static RealPoint |
center(Mesh m)
Finds the center of a mesh using vertices.
|
static void |
copy(Mesh src,
Mesh dest)
Copies a mesh into another mesh.
|
static <T extends BooleanType<T>> |
marchingCubes(RandomAccessibleInterval<T> source)
Creates mesh e.g.
|
static <T extends RealType<T>> |
marchingCubes(RandomAccessibleInterval<T> source,
double isoLevel)
Creates mesh e.g.
|
static Mesh |
removeDuplicateVertices(Mesh mesh,
int precision)
Creates a new mesh from a given mesh without any duplicate vertices.
|
static Mesh |
simplify(Mesh mesh,
float target_percent,
float agressiveness)
Simplifies a given mesh.
|
public static RealPoint center(Mesh m)
public static float[] boundingBox(Mesh mesh)
public static void copy(Mesh src, Mesh dest)
src
- Source mesh, from which data will be copied.dest
- Destination mesh, into which source will be copied.public static void calculateNormals(Mesh src, Mesh dest)
src
- Source mesh, used for vertex and triangle infodest
- Destination mesh, will be populated with src's info plus the calculated normalspublic static Mesh simplify(Mesh mesh, float target_percent, float agressiveness)
mesh
- Source meshtarget_percent
- the amount in percent to attempt to achieve. For example: 0.25f would result in creating
a mesh with 25% of triangles contained in the original.agressiveness
- sharpness to increase the threshold. 5..8 are good numbers. more iterations yield higher
quality. Minimum 4 and maximum 20 are recommended.public static Mesh removeDuplicateVertices(Mesh mesh, int precision)
mesh
- Source meshprecision
- decimal digits to take into account when comparing mesh verticespublic static <T extends BooleanType<T>> Mesh marchingCubes(RandomAccessibleInterval<T> source)
source
- The binary input image for the marching cubes algorithm.public static <T extends RealType<T>> Mesh marchingCubes(RandomAccessibleInterval<T> source, double isoLevel)
source
- The input image for the marching cubes algorithm.isoLevel
- The threshold to distinguish between foreground and background values.Copyright © 2014–2022 ImageJ. All rights reserved.