Comparison of magnetic resonance imaging and endoscopy in distinguishing the type and severity of inflammatory bowel disease.