Inferring 3D features of heterogeneous materials (e.g., solid materials with gaseous porosity) from 2D sections is the subject of stereology. This inference process is critical for the determination of various and fundamental properties of the 3D medium, such as the pore size distribution and the percolation thresholds. Stereological approaches have been tailored to different materials/properties, but lack of generality and depend on very strong hypotheses. In the attempt to overcome these limitations and allowing to approach a broader range of material/properties, in this work we present a 3D reconstruction technique leveraging a genetic algorithm. The 3D-reconstruction problem is treated as an optimization problem: a population of virtual 3D cubes – embodying a certain void fraction – is randomly generated and selected by comparing cubes sections with a reference 2D image in terms of specific optimization metrics (e.g., the number of pores and the pore average radius). Once the population of 3D cubes is optimized by the genetic algorithm (i.e., it is possible to extract from it a population of 2D sections comparable with the reference image), it can be used to determine correlations between 2D (measurable) quantities and 3D (to be inferred) quantities. Moreover, since the outcome of the genetic algorithm is not a single optimal 3D cube, but a whole population of cubes, confidence intervals can be derived for these correlations. The proposed approach is very broad and general, applicable in many specific topics related to nuclear fuel (e.g., high burnup structure, grain growth, porosity development, and so on). In this work, we showcase the application of the proposed 3D-reconstruction algorithm to a subset of fuel sections of metallic fuel obtained as part of the post irradiation examination of the FUTURIX campaign, with focus on the development of porosity. The goal is to demonstrate the applicability of the proposed algorithm to the 3D-reconstruction of metallic fuel, in terms of total porosity, porosity-2 and pore-size distribution.