An image-based approach for structure investigation and 3D numerical modelling of polymeric foams