The principle of magnetic resonance imaging is based on the nuclear magnetic alignments or nuclear magnetic resonance in the brain. The following site will give some state of the art information about this advanced technic of brain scan, which is very much safer that x-ray or charged particle tomography that can permanently destroy the cells structures.
http://www.cis.rit.edu/htbooks/mri/