Quantitative analysis of packed and compacted granular systems by x-ray microtomography