This example first loads a point cloud from disk.
In a pre-processing, the data is converted to a format understandable by Paraview using the
GaussianResampling is applied to the data (left view in the above screenshot). This filter has the effect of injecting input points to a structured data. For each injection, each point will "splat", or distribute values to nearby vertices. The resulting scalar field is a density estimation (with a Gaussian kernel) of the input point cloud.
Then, the PersistenceDiagram is computed and thresholds are applied based on persistence to maintain only the most persistent features. This results in a simplified persistence diagram.
The simplified persistence diagram is then used as a constraint for the TopologicalSimplification of the input scalar data.
This simplified data is then used as the input of the computation of MorseSmaleComplex (right view, above screenshot). This complex is composed of elements of 4 dimensions: dimension 0, which corresponds to the critical points of the Morse-Smale Complex, dimension 1, which corresponds to its edges (in grey in the screenshot) and dimension 2, which corresponds to its surfaces, and dimension 3, which corresponds to pieces of volume that can be extracted from the
Segmentation output. The "S" shape made by the point cloud is outlined by the maximal 1 and 2 dimension elements of the Morse-Smale Complex.
To reproduce the above screenshot, go to your ttk-data directory and enter the following command:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59
To run the above Python script, go to your ttk-data directory and enter the following command:
- pointCloud.csv: a table containing point coordinates.
OutputSurface.vtu: surface (or 2 dimensional elements) of the output Morse Smale Complex in VTK file format (right view, above screenshot). You are free to change the
vtpfile extension to that of any other supported file format (e.g.
csv) in the above python script.