If you're just looking for global porosity (not heterogeneity or local microstructure) and have a good estimate of your matrix density, also consider the simplest approach: (a) measure the volume of your sample, (b) weigh it and (c) calculate the "bulk density" by dividing mass by volume, (d) calculate porosity as 1-bulk density/matrix density.