morsemesh
MorseMesh provides code for working with discrete Morse theory on meshes. It contains functions for Morse theory based edge detection and segmentation, a cluster based segmentation using the Morse theory based edges as well as a graphical user interface to use the methods. Jupyter notebooks are provided for pipelining many parameter combinations.
Science Score: 54.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
✓Academic publication links
Links to: zenodo.org -
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (13.7%) to scientific vocabulary
Repository
MorseMesh provides code for working with discrete Morse theory on meshes. It contains functions for Morse theory based edge detection and segmentation, a cluster based segmentation using the Morse theory based edges as well as a graphical user interface to use the methods. Jupyter notebooks are provided for pipelining many parameter combinations.
Basic Info
Statistics
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 0
- Releases: 1
Metadata Files
README.md
MorseMesh
This repo provides code for working with discrete Morse theory on meshes. It contains functions for Morse theory based edge detection and segmentation, a cluster based segmentation using the Morse theory based edges as well as a graphical user interface to use the methods. Jupyter notebooks are provided for pipelining many parameter combinations. The cluster segmentation is recommended for the graphical user interface, while the Morse segmentation is recommended for the pipline approach.
Contents
Requirements
- Python 3.x (3.9 definitely works, probably also before)
- plyfile (pip install plyfile or: https://github.com/dranjan/python-plyfile)
- (required for gui) pyqt5
- (required for gui) vtk
- (optional for gui) qdarkstyle
Quick Guide
To start the GUI Tool run:
$ python3 gui.py
You need: A manifold like mesh (ply file) with a scalar function given in the quality property of the vertices (e.g. curvature values).
- Open GUI Tool and load the mesh under File in
- Press Compute Morse complex under Compute
- Use sliders to get visually well recognized edges
- Press Morse Segmentation Method (recommended for pipline) or Cluster Segmentation Method (recommended for GUI) under Segmentations
- Save segmentation (label txt) under File or re-run with different parameters
1. Load ply file
Select Load ply under the File menu. Note that you need a .ply file that contains a function value under quality. Please ensure that your mesh has a manifold-like structure, i.e. especially there should be no edges with more than 2 adjacent triangles. Holes or boundaries in the mesh are no problem algorithmically, but depending on the application it might make sense to fill them. For mesh preprocessing, it is recommended using GigaMesh.
2. Compute Morse Complex
Compute the Morse complex for a loaded mesh from the Compute menu under Compute Morse complex.
3. Determine edges
You can now use the two sliders in the bottom to determine the edges correctly. Just move them and the mesh will be updated automatically.
The upper slider determines a strong threshold which includes all edges that exceed this threshold, while the lower slider determines the weak threshold, which adds only edges that are below the strong threshold, but above the weak threshold, hence refining the result a bit.
Under advanced edge detection in the sidebar you can select more edge settings, but the only ones that might be interesting though are the "Separatrix density* which could be set to All or Reversed and the Extremal line type, which can be switched between ridges and valleys.

4. Segmentation
Use the Morse segmentation method or the Cluster segmentation method in the Segmentations menu. The cluster segmentation is recommended for the GUI, while the Morse segmentation is recommended for the pipeline.
You can change the segmentation parameters in the sidebar under Morse segmentation or Cluster segmentation.

5. Save result
You can repeat the segmentation until you get a satisfactory result. The segmentation can be saved as a label.txt file in the File menu.
Visualization
There are different ways to visualize the label txt files: 1. Label .txt files can be visualized in the GUI tool using the Load labels txt function from the File menu 2. Label .txt files can be visualized in GigaMesh using File - Import - Import Labels (confirm YES when asked if the vertex is in the first column and select Labels-Connected Comp. on the right to see the results.)
License
The MorseMesh source code is released under the GPL License
Authors
Developed by Jan Philipp Bullenkamp.
Conforming Morse Complexes by Theresa Häberle.
Contact
Jan Philipp Bullenkamp: jan-philipp.bullenkamp (at) informatik.uni-halle.de
Owner
- Name: Jan Philipp Bullenkamp
- Login: JanPhilipp-Bullenkamp
- Kind: user
- Repositories: 1
- Profile: https://github.com/JanPhilipp-Bullenkamp
Citation (CITATION.cff)
cff-version: 1.1.0
message: "If you use this software, please cite it as below."
authors:
- family-names: Bullenkamp
given-names: Jan Philipp
orcid: https://orcid.org/0000-0001-6580-8885
title: MorseMesh
version: v0.1
doi: 10.5281/zenodo.8297368
license: GPL
date-released: 2023-08-29
GitHub Events
Total
- Watch event: 2
- Fork event: 1
Last Year
- Watch event: 2
- Fork event: 1