Parametrization#

The parametrization module provides abstract and concrete classes for representing point cloud surfaces as parametric models. These models support surface sampling, normal computation, and distance calculations.

Base Class#

Parametrization

Abstract base class to represent picklable parametrizations.

Geometric Shapes#

Parametric representations of simple geometric primitives.

Sphere(radius, center)

Parametrize a point cloud as sphere.

Ellipsoid(radii, center, orientations)

Parametrize a point cloud as ellipsoid.

Cylinder(centers, orientations, radius, height)

Parametrize a point cloud as a cylinder.

RBF(rbf, direction, grid)

Parametrize a point cloud using radial basis functions.

SplineCurve(positions[, order])

Parametrize a point cloud as a spline curve.

Triangular Meshes#

Surface representations using triangular mesh topology.

TriangularMesh(mesh[, repair])

Represent a point cloud as triangular mesh.

PoissonMesh(mesh[, repair])

ClusteredBallPivotingMesh(mesh[, repair])

ConvexHull(mesh[, repair])

Represent a point cloud as triangular mesh.

Isosurface Methods#

Mesh generation from volumetric data using isosurface extraction algorithms.

FlyingEdges(mesh[, repair])

Represent a point cloud as triangular mesh.

MarchingCubes(mesh[, repair])

Represent a point cloud as triangular mesh.

Utilities#

Functions for combining and manipulating parametrization objects.

merge(models)

Type Registry#

The module provides a PARAMETRIZATION_TYPE dictionary that maps string identifiers to parametrization classes, enabling dynamic instantiation based on user selection.

from mosaic.parametrization import PARAMETRIZATION_TYPE

# Available keys:
# "sphere", "ellipsoid", "cylinder", "mesh", "clusterballpivoting",
# "poissonmesh", "rbf", "convexhull", "spline", "flyingedges", "marchingcubes"

mesh_class = PARAMETRIZATION_TYPE["poissonmesh"]
mesh = mesh_class.fit(points, depth=8)