Similar Items: Optimal control theory for applications in Magnetic Resonance Imaging