Optimal X-ray micro-CT image based methods for porosity and permeability quantification in heterogeneous sandstones