In order to maximize the SNR of an image in consideration of signal correction in a multi-echo sequence, flip angles of a plurality of refocus high frequency magnetic field pulses are determined in a multi-echo imaging sequence. Using an index that reflects the SNR of an image after signal correction of a plurality of acquired echo signals, a flip angle at which the SNR of the image becomes a maximum is determined by repeatedly calculating the index by changing information specifying the flip angle of each refocus RF pulse according to an optimization method set in advance.