public class DeformableMesh3DTools extends Object
Constructor and Description |
---|
DeformableMesh3DTools() |
Modifier and Type | Method and Description |
---|---|
static double |
calculateAverageIntensity(MeshImageStack stack,
List<Triangle3D> triangles,
double thickness) |
static double |
calculateIntensity(Box3D bound,
MeshImageStack stack) |
static double |
calculateSurfaceArea(DeformableMesh3D mesh) |
static double |
calculateVolume(double[] direction,
double[] positions,
List<Triangle3D> triangles)
normal *dot* direction + |position|*direction
|
static double[] |
centerAndRadius(List<Node3D> nodes)
Calculates the center based on the position of the nodes.
|
static DeformableMesh3D |
copyOf(DeformableMesh3D mesh) |
static ij.ImagePlus |
createBinaryRepresentation(MeshImageStack stack,
DeformableMesh3D mesh) |
static ij.ImagePlus |
createBinaryRepresentation(MeshImageStack stack,
ij.ImagePlus original,
Map<Integer,DeformableMesh3D> meshes) |
static ij.ImagePlus |
createMosaicRepresentation(MeshImageStack stack,
ij.ImagePlus original_plus,
List<Track> allMeshTracks) |
static DeformableMesh3D |
createRectangleMesh(double width,
double height,
double depth,
double segment_size)
Makes a rectangular prism mesh with triangular elements.
|
static DeformableMesh3D |
createRhombicDodecahedron(double l) |
static DeformableMesh3D |
createTestBlock()
Creates a 2x2x2 test block.
|
static DeformableMesh3D |
createTestBlock(double w,
double h,
double depth)
-w/2,-h/2, d/2
0------------------1
/ /|
/ / |
/ | / |
3------------------2 |
| 4- - - - | -5
| / | /
| | /
| |/
7------------------6
w/2,h/2, -d/2
|
static ij.ImagePlus |
createUniqueLabelsRepresentation(MeshImageStack stack,
List<Track> allMeshTracks) |
static double[] |
findMinMax(List<Node3D> nodes,
double[] centroid)
Finds the closest and furthest away nodes from the centroid.
|
static List<Node3D> |
findPath(List<List<Node3D>> connectionMap,
Node3D origin,
Node3D goal) |
static List<List<Node3D>> |
generateConnectionMap(DeformableMesh3D mesh) |
static List<int[]> |
getContainedPixels(MeshImageStack stack,
DeformableMesh3D mesh)
Get pixels contained in the mesh.
|
static void |
main(String[] args) |
static DeformableMesh3D |
mergeMeshes(List<DeformableMesh3D> meshes)
Each mesh is constructed of 3 essential data values: positions, triangles, connections.
|
static void |
mosaicBinary(MeshImageStack stack,
ij.ImageStack out,
DeformableMesh3D mesh,
int rgb) |
static AStarBasic<Node3D> |
pathFinder(List<List<Node3D>> connectionMap,
Node3D destination) |
static void |
scanDirty(List<Intersection> sections)
This puts topographical constraints on the intersections.
|
public static DeformableMesh3D createRectangleMesh(double width, double height, double depth, double segment_size)
width
- size in x directionheight
- size in y directiondepth
- size in z directionsegment_size
- size of each segment.public static DeformableMesh3D createRhombicDodecahedron(double l)
public static DeformableMesh3D createTestBlock()
createTestBlock(double, double, double)
public static DeformableMesh3D createTestBlock(double w, double h, double depth)
w
- h
- depth
- public static double calculateVolume(double[] direction, double[] positions, List<Triangle3D> triangles)
direction
- positions
- triangles
- public static double calculateAverageIntensity(MeshImageStack stack, List<Triangle3D> triangles, double thickness)
public static double[] centerAndRadius(List<Node3D> nodes)
nodes
- Nodes of the current mesh.public static double calculateSurfaceArea(DeformableMesh3D mesh)
public static double calculateIntensity(Box3D bound, MeshImageStack stack)
public static List<List<Node3D>> generateConnectionMap(DeformableMesh3D mesh)
public static AStarBasic<Node3D> pathFinder(List<List<Node3D>> connectionMap, Node3D destination)
public static List<Node3D> findPath(List<List<Node3D>> connectionMap, Node3D origin, Node3D goal)
public static ij.ImagePlus createBinaryRepresentation(MeshImageStack stack, ij.ImagePlus original, Map<Integer,DeformableMesh3D> meshes)
public static ij.ImagePlus createBinaryRepresentation(MeshImageStack stack, DeformableMesh3D mesh)
public static ij.ImagePlus createMosaicRepresentation(MeshImageStack stack, ij.ImagePlus original_plus, List<Track> allMeshTracks)
public static ij.ImagePlus createUniqueLabelsRepresentation(MeshImageStack stack, List<Track> allMeshTracks)
public static void scanDirty(List<Intersection> sections)
sections
- public static List<int[]> getContainedPixels(MeshImageStack stack, DeformableMesh3D mesh)
stack
- mesh
- public static void mosaicBinary(MeshImageStack stack, ij.ImageStack out, DeformableMesh3D mesh, int rgb)
public static DeformableMesh3D copyOf(DeformableMesh3D mesh)
public static double[] findMinMax(List<Node3D> nodes, double[] centroid)
nodes
- centroid
- public static DeformableMesh3D mergeMeshes(List<DeformableMesh3D> meshes)
meshes
- public static void main(String[] args) throws IOException
IOException
Copyright © 2013–2022 Francis Crick Institute. All rights reserved.