Fundamentals of magnetic resonance imaging