Skip to main content
NIHPA Author Manuscripts logoLink to NIHPA Author Manuscripts
. Author manuscript; available in PMC: 2023 Apr 28.
Published in final edited form as: Proc SPIE Int Soc Opt Eng. 2022 Apr 4;12033:120333A. doi: 10.1117/12.2611878

A Graph-theoretic Algorithm for Small Bowel Path Tracking in CT Scans

Seung Yeon Shin 1, Sungwon Lee 1, Ronald M Summers 1
PMCID: PMC10140653  NIHMSID: NIHMS1887661  PMID: 37123104

Abstract

We present a novel graph-theoretic method for small bowel path tracking. It is formulated as finding the minimum cost path between given start and end nodes on a graph that is constructed based on the bowel wall detection. We observed that a trivial solution with many short-cuts is easily made even with the wall detection, where the tracked path penetrates indistinct walls around the contact between different parts of the small bowel. Thus, we propose to include must-pass nodes in finding the path to better cover the entire course of the small bowel. The proposed method does not entail training with ground-truth paths while the previous methods do. We acquired ground-truth paths that are all connected from start to end of the small bowel for 10 abdominal CT scans, which enables the evaluation of the path tracking for the entire course of the small bowel. The proposed method showed clear improvements in terms of several metrics compared to the baseline method. The maximum length of the path that is tracked without an error per scan, by the proposed method, is above 800mm on average.

Keywords: Small bowel path tracking, graph theory, shortest path, abdominal computed tomography

1. INTRODUCTION

The small bowel is the longest (about 6 meters) part of the gastrointestinal tract between the stomach and the large bowel.1 It is highly convoluted with its pliability so that it can fit into the abdominal cavity. As a result, the small bowel has many touching parts along its path, which makes it difficult to track from one end to another. Computed tomography (CT) has been regarded as a primary imaging modality for small bowel evaluation since it is safe and comfortable compared to other imaging tests such as endoscopy.2 However, acquired 3D CT scans are reviewed by radiologists slice-by-slice for interpretation, which is laborious and time-consuming. An automatic system that identifies the small bowel could expedite the interpretation.

There have been research efforts to develop automatic methods for small bowel segmentation for the last decade.36 Considering the high difficulty of labeling the small bowel, the recent works based on deep learning presented data-efficient methods each by training with sparsely annotated CT volumes,4 by incorporating a cylindrical shape prior,5 or by developing an unsupervised domain adaptation technique for the small bowel.6 While the segmentation is useful for detecting lesions, blockages, and for distinguishing the bowels from adjacent lesions in the mesentery, it may be insufficient to identify the whole structure of the small bowel especially for the parts with lumpy segmentation due to the aforementioned touching issue (Fig. 2 (A)).

Figure 2:

Figure 2:

Example path tracking results. (A) Ground-truth (GT) path annotation (red) overlayed on the predicted small bowel segmentation (green). (B) Result corresponding to ‘Shortest Path’ in Table 1. (C) Result of the proposed method. In (B) and (C), each result (blue) is compared with the GT (red). (D-F) Coronal view results corresponding to (A-C).

Only a few previous works were performed to develop a method for small bowel path tracking.7,8 In the work by Oda et al.,7 the 3D U-Net9 is trained to predict a distance map from the centerlines of the small bowel. Qualitative evaluation was done for air-inflated bowels from CT scans, where the walls are more separable from the lumen than with other internal material. Harten et al.8 developed a deep orientation classifier that predicts direction proposals to track the small bowel path in 3D cine-MR scans. The tracking was performed for parts of the small bowel within a given field-of-view of the scans rather than for the entire course of the small bowel. Both of the methods require ground-truth (GT) centerlines of the small bowel to train their neural network models.

In this paper, we present a novel graph-theoretic method for small bowel path tracking, which does not require any supervision on the centerlines. To prevent a computed path from incorrectly penetrating a bowel wall, we detect the walls by ridge detection based on which a graph is constructed. Given a start node and an end node, it is found in our experiment that simply finding the shortest path between them on the graph produces a trivial solution with short-cuts due to the imperfection of the wall detection (Fig. 2(B)). We sample a set of must-pass nodes based on a predicted small bowel segmentation, and then find the optimal path that passes by all the must-pass nodes.

2. METHOD

2.1. Dataset

Our dataset consists of 30 high-resolution abdominal CT scans. All the scans are both intravenous and oral contrast-enhanced. Specifically, they were acquired with oral administration of Gastrografin and done during the portal venous phase. They were resampled to have isotropic voxels of 2mm3. Also, we manually cropped them along the z-axis to include from the diaphragm through the pelvis. Every scan has a GT segmentation, which is achieved using “Segment Editor” module in 3DSlicer10 by a radiologist with 12 years of experience. The GT segmentation covers the entire small bowel including the duodenum, jejunum, and ileum.

GT path of the small bowel is also achieved for a subset of 10 scans. It is drawn as interpolated curves that connect a series of manually placed points inside the small bowel. We note that this annotation took one full day for each scan. This set is used for the evaluation of the proposed path tracking method, and the remaining 20 scans, which we will call the segmentation training set, are used to train a network for segmentation prediction.

2.2. Graph Construction

The processing pipeline of the proposed method is summarized in Fig. 1.

Figure 1:

Figure 1:

Block diagram of the proposed method for small bowel path tracking. A region adjacency graph (RAG) whose nodes and edges are built based on the wall detection is constructed. A set of must-pass nodes are sampled to better cover the entire course of the small bowel in finding the shortest path between given start and end nodes. Then, a simplified graph that consists of only the start and end nodes, and the sampled must-pass nodes is constructed. The path tracking is performed by solving a travelling salesman problem (TSP) on the simplified graph.

Small Bowel Wall Detection and Supervoxel Generation

It is desired that a computed path moves forward within the lumen while not penetrating bowel walls. In our dataset, the lumen appears brighter than the walls due to the administered oral contrast. To utilize this information, we detect the walls by ridge detection (valley detection to be exact). The Meijering filter11 is used in this paper. Then, an input volume is segmented into supervoxels by Adaptive-SLIC12 to make a graph with the treatable number of nodes. S=sii=1N is the set of the generated supervoxels, where N is the number of the supervoxels. The output of the wall detection is used as input for supervoxel generation so that the supervoxels would well adhere to boundaries between the lumen and the walls.

RAG Construction

A region adjacency graph (RAG), G=(V,E), is constructed based on the generated supervoxels S and the wall detection map. V=vii=1N is a set of nodes and E is a set of edges. Each node vi in the RAG corresponds to each supervoxel si. An edge ei,j is created between two adjacent supervoxels si,sj and the edge cost Ci,j is defined as the average value in the wall detection map along their boundary. Thus, the cost between a supervoxel within the lumen but attached to the wall and a neighboring supervoxel on the wall would be high while that of adjacent supervoxels inside the lumen would be zero.

Small Bowel Segmentation

In parallel with the wall detection, supervoxel generation, and the RAG construction, small bowel segmentation is also performed in this paper with two purposes: 1) to remove the graph nodes that are located outside the small bowel, and 2) to sample must-pass nodes within it. We will explain more about 2) in the following section. We adopt the baseline model used in Ref. 5, which is based on the 3D U-Net,9 for segmentation. Being trained using the segmentation training set, it is used to segment the small bowel for the set with GT paths.

2.3. Path Tracking

Given the graph G, we designate a start node vst and an end node ved by providing coordinates for each on an input CT volume, possibly on the pylorus and the ileocecal junction, respectively. Then, a simple approach that can be adopted for path tracking is to find the shortest path between the start and end nodes on G. From all the possible paths ΓG between them, the optimal path ΓG*=arg minΓGei,jΓGCi,j is found by the Dijkstra’s algorithm. However, we found in our experiment that it produces trivial solutions with many short-cuts over the walls due to the imperfection of the wall detection.

Must-Pass Nodes Sampling

We thus propose to use must-pass nodes in finding the shortest path to let the search better cover the entire course of the small bowel. Firstly, we compute the Euclidean distance transformation from the inverted small bowel segmentation and the wall detection, where each voxel value represents the smallest Euclidean distance to the walls. Then, the must-pass nodes are sampled as local peaks on the distance map with the hope that they would be as close as possible to the centerlines. A requirement on the minimum value of peaks, θvpeak , and a requirement on the minimal allowed distance separating peaks, θdpeak , are fulfilled during the sampling. The set of the must-pass nodes is denoted by Vmp, where VmpV and Vmp|V|. Finding the optimal path that starts from vst, and passes by all the must-pass nodes Vmp, and ends at ved can be achieved by the constrained version of the Dijkstra’s algorithm*. The complexity of the algorithm, O2Vmp|V|+|E|log |V|2Vmp, increases exponentially with the number of the must-pass nodes, Vmp. Therefore, it is not feasible with a large number of must-pass nodes.

Graph Simplification

Alternatively, we make a simplified graph G'=V',E', which consists of only the start, end, and the must-pass nodes, and then find a travelling salesman problem (TSP) solution on it. V'= vm'm=1Vmp+2=vst,vedVmp is a new set of nodes for the graph and E' is a new set of edges. An edge is constructed for every pair of nodes in G' and the edge cost Cm,n' between nodes vm' and vn' is defined as:

Cm,n'=cost ΓG*vm',vn'M, if dvm',vn'δdvm',vn'δ, otherwise,  (1)

where M=maxp,qEdvp,vqδcostΓG*vp,vq. dvm',vn' denotes the Euclidean distance between vm' and vn'. cost ΓG*vm',vn' denotes the cost of the shortest path between vm' and vn' on the initial graph G. Note that the shortest path is computed only for pairs within a distance of δ, based on an assumption that a pair of nodes that are far from each other by the Euclidean distance would not be direct neighbors in a computed path. Otherwise, the Euclidean distance itself is used for calculating the edge cost.

Solving a TSP

We need a TSP solution that starts and ends at different given nodes. It can be achieved by adding a dummy node that has zero-cost edges with the start and end nodes, and infinity-cost edges with the remaining nodes. We use the nearest fragment operator13 to solve the TSP.

2.4. Evaluation Details

The desired volume of each supervoxel and the compactness were set as 216mm3 and 0.01 for Adaptive-SLIC.12 Thus, the number of the supervoxels, N, is decided depending on the size of an input volume. We adoped the same hyperparameters suggested in Ref.5 to train the network for small bowel segmentation. We used θvpeak =3mm and θdpeak =6mm for must-pass nodes sampling. δ=50mm was used for Equation (1).

The predicted path is evaluated based on its overlap with the GT path. True positive (TP), false positive (FP), and false negative (FN) points are defined as in Ref. 8, with a static distance tolerance of 10mm. Precision and recall values are then computed from the TP/FP/FN values. We also compute the curve-to-curve distance, which is suggested in Ref. 14. Our GT path is all connected from start to end of the small bowel compared to a set of segments of on average 88mm used in Ref. 8. To better understand the tracking capability of the proposed method, we provide the maximum length of the GT segment that is tracked without an error.

3. RESULTS

3.1. Quantitative Evaluation

Table 1 provides quantitative results of the baseline and the proposed methods. Although our graph is constructed based on the small bowel wall detection to prevent the tracking from penetrating a wall, simply computing the shortest path between start and end nodes, ‘Shortest Path’, totally fails in terms of the recall. On the other hand, the proposed method has a much higher recall with the help of the must-pass nodes. It shows clear improvements for all metrics except for the precision. We note that, for the proposed method, the maximum length of the GT path that is tracked without an error per scan is above 800mm on average.

Table 1:

Quantitative results for the baseline and the proposed methods. ‘Shortest Path’ denotes computing the shortest path without the use of the must-pass nodes. The result of the proposed method, where the ground-truth segmentation is used in place of the predicted segmentation, is also presented. Refer to the text for the explanation on the evaluation metrics.

Method Precision (%) Recall (%) Curve-to-curve distance (mm) Max. len. w/o error (mm)
Shortest Path 97.8 9.6 28.0 ± 7.5 756.2 ± 341.5
Ours 92.5 92.7 4.2 ± 1.2 810.0 ± 193.6
Ours w/ GT segm. 98.1 96.0 3.3 ± 0.3 840.6 ± 273.1

As mentioned inSection 2.2, small bowel segmentation is performed in the proposed method not only to remove the graph nodes that are located outside the small bowel but also to sample must-pass nodes within it. Therefore, the quality of the predicted segmentation affects the path tracking. The result based on the GT segmentation in place of the predicted segmentation is presented in Table 1, implying that a better tracking can be achieved by improving the segmentation.

3.2. Qualitative Evaluation

Fig. 2 shows example path tracking results. Observing the CT scans, the contact between different parts of the small bowel, indistinct appearance of the wall, and the heterogeneity of the lumen make the problem difficult. The trivial solution generated by the baseline method proves it. The proposed method better covers the entire course of the small bowel by the help of the must-pass nodes.

4. CONCLUSION

We have presented a new graph-based method for small bowel path tracking. We find the minimum cost path on a graph constructed based on the wall detection. An explicit constraint on the resulting path, which is implemented by the must-pass nodes, is also applied to better cover the entire course of the small bowel. The tracked path provides a better understanding on the small bowel structure than the segmentation, enabling precise localization of diseases along the course of the small bowel. Especially, it could help interpreting a CT scan before using capsule endoscopy, and preoperative planning by better visualization. In future work, we plan to include CT scans with different contrast media to increase the applicability of the proposed method.

ACKNOWLEDGMENTS

We thank Dr. James Gulley for patient referral and for providing access to CT scans. This research was supported by the Intramural Research Program of the National Institutes of Health, Clinical Center.

Footnotes

REFERENCES

  • [1].Society Gastrointestinal, “Small bowel syndrome.” https://badgut.org/information-centre/a-z-digestive-topics/short-bowel-syndrome (2020). [Google Scholar]
  • [2].Murphy KP, McLaughlin PD, O’Connor OJ, and Maher MM, “Imaging the small bowel,” Current opinion in gastroenterology 30(2), 134–140 (2014). [DOI] [PubMed] [Google Scholar]
  • [3].Zhang W, Liu J, Yao J, Louie A, Nguyen TB, Wank S, Nowinski WL, and Summers RM, “Mesenteric vasculature-guided small bowel segmentation on 3-d ct,” IEEE Transactions on Medical Imaging 32, 2006–2021 (Nov 2013). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • [4].Oda H, Nishio K, Kitasaka T, Amano H, Takimoto A, Uchida H, Suzuki K, Itoh H, Oda M, and Mori K, “Visualizing intestines for diagnostic assistance of ileus based on intestinal region segmentation from 3D CT images,” in [Medical Imaging 2020: Computer-Aided Diagnosis], Hahn HK and Mazurowski MA, eds., 11314, 728 – 735, International Society for Optics and Photonics, SPIE; (2020). [Google Scholar]
  • [5].Shin SY, Lee S, Elton D, Gulley JL, and Summers RM, “Deep small bowel segmentation with cylindrical topological constraints,” in Medical Image Computing and Computer Assisted Intervention – MICCAI 2020, Martel, Abolmaesumi P, Stoyanov D, Mateus D, Zuluaga MA, Zhou SK, Racoceanu D, and Joskowicz L, eds., 207–215, Springer International Publishing, Cham; (2020). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • [6].Shin SY, Lee S, and Summers RM, “Unsupervised domain adaptation for small bowel segmentation using disentangled representation,” (2021). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • [7].Oda H, Hayashi Y, Kitasaka T, Tamada Y, Takimoto A, Hinoki A, Uchida H, Suzuki K, Itoh H, Oda M, and Mori K, “Intestinal region reconstruction of ileus cases from 3D CT images based on graphical representation and its visualization,” in [Medical Imaging 2021: Computer-Aided Diagnosis], Mazurowski MA and Drukker K, eds., 11597, 388 – 395, International Society for Optics and Photonics, SPIE; (2021). [Google Scholar]
  • [8].van Harten L, de Jonge C, Stoker J, and Isgum I, “Untangling the small intestine in 3d cine-MRI using deep stochastic tracking,” in [Medical Imaging with Deep Learning], (2021). [DOI] [PubMed] [Google Scholar]
  • [9].Çiçek Ö, Abdulkadir A, Lienkamp SS, Brox T, and Ronneberger O, “3d u-net: Learning dense volumetric segmentation from sparse annotation,” in [Medical Image Computing and Computer-Assisted Intervention – MICCAI 2016], Ourselin S, Joskowicz L, Sabuncu MR, Unal G, and Wells W, eds., 424–432, Springer International Publishing, Cham; (2016). [Google Scholar]
  • [10].Fedorov A, Beichel R, Kalpathy-Cramer J, Finet J, Fillion-Robin J-C, Pujol S, Bauer C, Jennings D, Fennessy F, Sonka M, Buatti J, Aylward S, Miller JV, Pieper S, and Kikinis R, “3d slicer as an image computing platform for the quantitative imaging network,” Magnetic Resonance Imaging 30(9), 1323 – 1341 (2012). Quantitative Imaging in Cancer. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • [11].Meijering E, Jacob M, Sarria J-C, Steiner P, Hirling H, and Unser M, “Design and validation of a tool for neurite tracing and analysis in fluorescence microscopy images,” Cytometry Part A 58A(2), 167–176 (2004). [DOI] [PubMed] [Google Scholar]
  • [12].Achanta R, Shaji A, Smith K, Lucchi A, Fua P, and Süsstrunk S, “Slic superpixels compared to stateof-the-art superpixel methods,” IEEE Transactions on Pattern Analysis and Machine Intelligence 34(11), 2274–2282 (2012). [DOI] [PubMed] [Google Scholar]
  • [13].Ray SS, Bandyopadhyay S, and Pal SK, “Genetic operators for combinatorial optimization in tsp and microarray gene ordering,” Applied Intelligence 26, 183–195 (June 2007). [Google Scholar]
  • [14].Zhang P, Wang F, and Zheng Y, “Deep reinforcement learning for vessel centerline tracing in multi-modality 3d volumes,” in [Medical Image Computing and Computer Assisted Intervention – MICCAI 2018], Frangi AF, Schnabel JA, Davatzikos C, Alberola-López C, and Fichtinger G, eds., 755–763, Springer International Publishing, Cham; (2018). [Google Scholar]

RESOURCES