The knowledge of the internal structure of porous materials is of main importance to compute their physical properties. This article focuses on base-catalyzed and colloidal silica aerogels, which are fractal materials and we use an original method for the reconstruction of these aerogels from TEM images. The method used is iterative and leads to the same fractal dimension as the real material, computed from the internal two-point correlation function. Unlike the reconstruction of porous materials found in literature, our method is based on the distribution of matter and not of the porous network, and has the additional advantage of being only half statistical, i.e. only the coordinates in the z direction are statistically obtained while the coordinates x and y of the elements of matter are accurately obtained from TEM images of our samples