Like https://github.com/LIHPC-Computational-Geometry/genomesh/blob/main/apps/labeling_stats.cpp did