Gradient-based maximization of mutual information for multimodality image registration