Over the last decades, scanning magnetic microscopy techniques have been increasingly used in paleomagnetism and rock magnetism. Different from standard paleomagnetic magnetometers, scanning magnetic microscopes produce high-resolution maps of the vertical component of the magnetic induction field on a plane located over the sample. These high- resolution magnetic maps can be used for estimating the magnetization distribution within a rock sample by inversion. Previous studies have estimated the magnetization distribution within rock samples by inverting the magnetic data measured on a single plane above the sample. Here we present a new spatial domain method for inverting the magnetic induction measured on four planes around the sample in order to retrieve its internal magnetization distribution. We have presumed that the internal magnetization distribution of the sample varies along one of its axes. Our method approximates the sample geometry by an interpretation model composed of a one-dimensional array of juxtaposed rectangular prisms with uniform magnetization. The Cartesian components of the magnetization vector within each rectangular prism are the parameters to be estimated by solving a linear inverse problem. Our method automatically deals with the averaging of the measured magnetic data due to the finite size of the magnetic sensor, preventing the application of a deconvolution before the inversion. Tests with synthetic data show the advantage of inverting the magnetic data on four planes around the sample and how this new acquisition scheme improves the estimated magnetization distribution within the rock sample. Moreover, they show the effects of position noise and misalignment problems during the scanning stage, the influence of the scanning geometry, the sensitivity of the magnetic sensor and the number of measurements on the observation planes. Based on these results with synthetic data, we analyze some strategies for minimizing the effects of position noise and misalignment during scanning stage as well as determining optimal acquisition design and model parameterization. Our results show that our method could be an interesting complement to traditional paleomagnetic techniques aiming at providing a non-destructive estimation of the magnetization distribution within geological samples.