Magnetic resonance imaging or MRI is an imaging technique used primarily in medical diagnostics for representation of structure and function inside the body.