point of the grid sampling is added to the random sampling whenever its distance to the randomly sampled points is greater than the final value of $r_{\rm min}$.

The second step towards the persistent homological descriptor consists of calculating the persistence barcodes for a filtration of Vietoris-Rips complexes, obtained from the sets of points computed in the first step using the software package Perseus. ([*2*]{}) We restrict ourselves to constructing Vietoris-Rips complexes, where the filtration parameter $\epsilon$ (corresponding to the radius of the balls grown around each point) increases in 164 steps of 0.025  increments, starting from the initial value of 0. The resulting 4.1  maximal filtration parameter is due to the fact that the memory cost needed by Perseus grows extremely fast as the radius increases in our calculations. While the relatively small maximal filtration parameter does not allow us to build a complete complex, it prevents geodesically distant points of the surface that are close in Euclidean metric to be connected unless the pore structure is very densely packed in the material. This is important since our construction does not distinguish homology classes that are formed in the solid part of the material from those formed in the 