Evaluation of gradient inhomogeneity in the optimal design of gradient coils.