New algorithms in 3D image analysis and their application to the measurement of a spatialized pore size distribution in soils