Assessment and Classification of Motility of Terminal Ileum in Crohn’s Disease on Cine Magnetic Resonance Enterography
Basak Bayrambas1, Esin Ozturk-Isik1, and Oktay Algin2

1Biomedical Engineering Institute, Bogazici University, Istanbul, Turkey, 2Department of Radiology, Yildirim Beyazit University Medical School, Ankara, Turkey


Crohn’s disease is an inflammatory bowel disease mostly affecting motility in terminal ileum of small bowel. In this study, cine magnetic resonance enterography scans were used to assess the terminal ileum motility. Motility was quantified using optical flow based and gradient based analysis. ROC statistical analysis showed that immotility and motility were separable with 87% accuracy when analyzed with optical flow based algorithm and 89% accuracy with gradient based algorithm. The best classification accuracy of 90.5% was obtained when both optical flow and gradient based analysis results were used as features to train a kNN algorithm with 15-fold cross validation.


Crohn’s disease is an inflammatory bowel disease, which has a lifelong negative impact on patient’s digestive tract function and life quality. Although it may occur at any part of the gastrointestinal tract, it mostly affects the terminal ileum, which is the final section of the small intestine connecting small bowel to large bowel. In general, Crohn’s disease causes immotility at the affected bowel segment, therefore small bowel motility has a clinical significance in accurate diagnosis of the disease. Magnetic resonance enterography (MRE) provides valuable information regarding gastrointestinal tract.1,2 There have been a few studies on small bowel motility and motility assessment in Crohn’s disease.3,4 The purpose of this study is to compare two different methods to quantify terminal ileum motility based on MRE examinations and feasibility assessment of these methods for Crohn’s disease diagnosis and severity analysis using machine learning algorithms.


2D coronal plane balanced-SSFP sequence (True-FISP/Siemens), standard body matrix coil, and 3-tesla MR scanner (Siemens Skyra) were used for dynamic cine MRI acquisitions. An experienced radiologist defined terminal ileum as the region of interest (ROI) in each dynamic series. For motility assessment, 55 datasets of 31 patients (14 female, 17 male, aged 15-62) were used. Terminal ileum was marked as immotile in 16 datasets (9 patients), having reduced motility in 16 datasets (9 patients), and normal to high motility in 23 datasets (13 patients) by the radiologist. The motility was quantified by using two different methods, which were optical flow based analysis and gradient based analysis. All findings of entire MRE data and clinical work-ups were accepted as gold standard results for comparison.

Optical Flow Analysis: Dynamic images were analyzed with optical flow algorithm, which calculates velocity vector based on brightness of each pixel inplane to quantify motility 5,6. Magnitude of velocity was taken as a measure of motility for each pixel. Average motility was calculated within the defined ROI of terminal ileum marked by the radiologist.

Gradient Based Analysis: In each dynamic series, signal intensity–time curves were generated for each pixel. Generated curves were smoothed with a smoothing filter and gradients were calculated to generate gradient–time curves to quantify the change in each pixel. The average of gradients at each time point was taken as a measure of motility for each pixel. The mean motility within the defined ROI was calculated. Motility maps were also generated for the slice showing the small bowel by using each method (Figure 1).

For classification, weighted and medium k nearest neighbor (kNN) and medium Gaussian support vector machine (SVM) algorithms were trained with optical flow based and gradient based motility scores separately and together to classify patients as immotile and motile (normal-to-high or reduced motility). 15-folds cross validation was used. Mean scores were also analyzed with receiver operating characteristic curve (ROC) to find a cut-off value between each groups.


The ROC analysis resulted in an optimal cut-off value of 0.086 for gradient based analysis for an accuracy of 89%, sensitivity of 87%, and specificity of 93%, and a cut-off value of 77.428x10-8 for optical flow based analysis for an the accuracy of 89%, sensitivity of 87%, and specificity of 87% to separate immotile and motile terminal ileum groups (Table 1). Medium Gaussian SVM algorithm resulted in an accuracy of 85.5% for separating motile and immotile groups using optical flow based motility scores (Table 2). A classification accuracy of 87.3% was obtained for gradient based motility scores using medium kNN. The classification accuracy was higher when optical flow and gradient based motility scores were used together (90.9%, weighted kNN).


Cine MRE (CMRE) provides valuable information regarding gastrointestinal tract inflammatory bowel disorders (especially for Crohn’s disease). The data suggests that both optical flow based and gradient based methods provide appropriate motility scores to group the motility of terminal ileum of the patient according to the defined ROI when assessed with ROC analysis and machine learning algorithms. However, the gradient based analysis provided slightly better accuracy to group the patients as immotile, having reduced motility, or normal to high motility. kNN provided best classification results with 90.9% accuracy when optical flow based and gradient based motility scores were used together.


Optical flow and gradient based analysis of CMRE could be useful for diagnosis of small bowel disorders and motility grading assessments. Future studies will develop a software for assisting radiologists in semi- or fully-automated scoring of the bowel motility using machine learning algorithms.


No acknowledgement found.


1. Algin, O., et al., Magnetic resonance enterography findings of chronic radiation enteritis. Cancer Imaging, 2011. 11: p. 189-94.

2. Evrimler, S. and Algin O., MR enterography with oral contrast agent composed of methylcellulose, low-dose barium sulfate, sorbitol, and lactulose: assessment of diagnostic performance, reliability, image quality, and patient tolerance. Clin Imaging, 2016. 40(3): p. 523-30. 3. Odille, F., et al., Quantitative assessment of small bowel motility by nonrigid registration of dynamic MR images. Magn Reson Med, 2012. 68(3): p. 783-93.

4. Hahnemann, M.L., et al., Quantitative assessment of small bowel motility in patients with Crohn's disease using dynamic MRI. Neurogastroenterol Motil, 2015. 27(6): p. 841-8.

5. Hahnemann, M.L., et al., Motility mapping as evaluation tool for bowel motility: initial results on the development of an automated color-coding algorithm in cine MRI. J Magn Reson Imaging, 2015. 41(2): p. 354-60.

6. MATLABCENTRAL. Horn-Schunck Optical Flow Method. MathWorks, Natick, MA. Available at: http://www.mathworks.de/matlabcentral/fileexchange/22756-horn-schunck-optical-flow-method


Figure 1: Motility maps generated with gradient based analysis (a-c) and optical flow analysis (d-f). 0 corresponds to immotility, 2 corresponds to reduced motility and 3 corresponds to normal to high motility in generated maps. Marked ROIs show terminal ileum in each patient.

Table 1: ROC analysis results showing cut-off, accuracy, sensitivity, specificity and 95% confidence intervals corresponding to sensitivity and specificity results for each method.

Table 2: Supervised machine learning results when algorithms were trained with optical flow based motility scores only, gradient based motility scores only, and both optical flow and gradient based scores with known motility information given by an expert radiologist.

Proc. Intl. Soc. Mag. Reson. Med. 27 (2019)