Abstract : This document is an extension of the paper: "P algorithm, a dramatic enhancement of the waterfall transformation". It has mainly two purposes. Firstly, it comes back to the waterfalls, standard and P algorithms to propose a general segmentation scheme which covers and unifies these different processes. Secondly, it contains the source code for the implementation of these waterfalls, standard and P operators with the MAMBA Image software library.