Measurement of spin-lattice relaxation times in nuclear magnetic resonance imaging