During MR imaging, the image of the object may get deformed due to the slope between the MR probe and the object. It is in general undesirable, particularly for 3D imaging. In this paper we propose a novel method to reconstruct the undeformed image of the object by measuring the deformation at the time of the MR scan. The image registration technique coupled with genetic algorithm is used to predict the deformation of the object. The inverse of this deformation is then applied to the image, generating the image that would have been seen had there been no slope with the probe. The proposed algorithm has been tested on a set of brain MR images and shown to remove the deformation and so give improved 3D reconstructions.