The extension of mathematical morphology to multivariate data has been an active research topic in recent years. In this paper we propose an approach that relies on the consensus combination of several stochastic permutation orderings. The latter are obtained by searching for a smooth shortest path on a graph representing an image. This path is obtained with a randomized version nearest of neighbors heuristics on a graph. The construction of the graph is of crucial importance and can be based on both spatial and spectral information to enable the obtaining of smoother shortest paths. The starting vertex of a path being taken at random, many different permutation orderings can be obtained and we propose to build a consensus ordering from several permutation orderings. We show the interest of the approach with both quantitative and qualitative results.