Calculation of T1, T2, and proton spin density images in nuclear magnetic resonance imaging