How mkazhdan/moebiusregistration works
Project type and purpose
• This is a C++-based scientific command-line toolkit for conformal parametrization and registration of genus-zero (water-tight) meshes.
• It provides three executables—SphereMap, Parametrization, and Register—that together compute conformal sphere mappings, center them via Möbius inversions (or spherical harmonics), tessellate to equirectangular grids, perform fast spherical correlation, and output registered meshes.
File structure
• Top level:
• / – header-only and source files for third-party dependencies (Eigen linear algebra, Misha’s geometry utilities, and FFTW wrappers).
• SOFT1.0/ – source for the SOFT library (spherical harmonic transforms and FFT routines).
• Parametrization/, Register/, SphereMap/ – each contains a single .cpp and .vcxproj (Visual Studio) defining one CLI tool.
• Makefile & MoebiusRegistration.sln – build scripts (Linux Make and Windows solution).
• Patterns:
• Modular CLI tools (each in its own directory).
• Layered architecture: CLI front-ends → core algorithms → third-party libraries → system & data I/O.
README for additional insights
• Confirms the three primary commands and their interactions (SphereMap first produces sphere parametrizations or .sgrid; Parametrization remaps meshes; Register aligns parametrizations via correlation).
• Lists external dependencies: Eigen (linear algebra), SOFT (spherical transforms), FFTW (FFT backbone).
Main components
a. Executable components (containers):
• SphereMap
• Parametrization
• Register
b. Core algorithm modules (libraries within the project):
• Conformalized Mean Curvature Flow
• Möbius/Spherical Harmonic Centering
• Tessellation to Equirectangular Grid
• Fast Spherical Correlation (via SOFT + FFTW)
c. Third-party libraries:
• Eigen – dense/sparse linear algebra
• SOFT 1.0 – spherical harmonic transforms
• FFTW – FFT engine (external .dll/.lib or system install)
• Misha Utilities – geometry, sparse solvers
d. Data artifacts:
• Input mesh (PLY)
• Parametrized mesh (PLY with px,py,pz)
• SGrid (.sgrid or PLY)
• Registered mesh (PLY)
Relationships and data flow
• SphereMap reads InputMesh → applies CMCF → Möbius/Spherical centering → tessellates → writes out ParametrizedMesh (+ optional SGrid).
• Parametrization reads ParametrizedMesh → rewrites purely spherical positions → writes OutputMesh.
• Register reads two ParametrizedMeshes or SGrids → performs spherical correlation (SOFT+FFTW) → writes RegisteredMesh.
• All executables invoke core algorithm modules, which link against Eigen, SOFT, FFTW, and Misha code.
Architectural patterns and design principles
• Layered decomposition: CLI layer → algorithm layer → library layer.
• Single-responsibility: each executable has one clear function in the pipeline.
• Dependency inversion: core algorithms coded against abstracted linear-algebra (Eigen) and FFT interfaces (SOFT/FFTW).
• Reuse of header-only libs (Eigen, Misha) for portability.