An efficient algorithm for registration of pre- and intra- operative brain MRI images to correct intensity inhomogeneity