Several thousand life-saving liver transplants are performed each year. One of the most common causes of early transplant failure is arterial stenosis of the anastomotic junction. Early detection of transplant arterial stenosis can help prevent transplant failure and the need to re-transplant. Doppler ultrasound is the most common screening method, but it suffers from poor specificity. Positive screening cases proceed to angiography which is an invasive and expensive procedure. A more accurate test could decrease the number of normal patients who would have to undergo this invasive diagnostic procedure. We present a turnkey clinical decision support tool for automated prediction of stenosis based on Fourier spectrum analysis of Doppler sonograms to compute a Stenosis Index that has been shown to have higher accuracy than traditional measures. The results of the automated approach compare favorably with the manual approach. Software is available from the authors on request.
Several thousand life-saving liver transplants are performed each year. One of the most common causes of early transplant failure is arterial stenosis of the anastomotic junction. Early detection of transplant arterial stenosis can help prevent transplant failure and the need to re-transplant. Doppler ultrasound is the most common screening method, but it suffers from poor specificity. Positive screening cases proceed to angiography which is an invasive and expensive procedure. A more accurate test could decrease the number of normal patients who would have to undergo this invasive diagnostic procedure. We present a turnkey clinical decision support tool for automated prediction of stenosis based on Fourier spectrum analysis of Doppler sonograms to compute a Stenosis Index that has been shown to have higher accuracy than traditional measures. The results of the automated approach compare favorably with the manual approach. Software is available from the authors on request.
Chronic liver disease, including cirrhosis, is one of the top 10 causes of death. It was ranked as the 8th and 10th leading cause of death in 1980 and 2014 respectively, with 24,584 deaths in 2014 (NCHS, CDC). Cirrhosis is the commonest indication for a liver transplant. According to the Liver Foundation (ALF), 6000 transplants are performed every year, with 16,000 on the waiting list. One of the most common early causes of hepatic transplant failure is stenosis of the arterial anastomosis between donor and recipient. If detected early, the stenosis can be treated, thereby preventing failure of a precious organ transplant. The definitive diagnosis of stenosis is by conventional angiography. However, angiography is expensive, invasive (requiring puncture of the femoral artery) and the imaging contrast agent can be nephrotoxic and/or trigger immune reactions. Ultrasound imaging of blood flow based on the Doppler effect is a safe alternative for screening for stenosis. A typical Doppler sonogram is shown in Figure 1. Different equations based on systolic and diastolic peak blood flow velocities, mean blood velocity and time to attain peak velocity (Dodd et al, 1994; Park et al, 2011) have been used to predict the presence of stenosis (see right panel of Figure 1). However, these are of limited accuracy as they suffer from both false positives and false negatives. One reason for their limited predictive accuracy is the fact that they are based on lossy representations that sample blood flow only at a few time points during each cycle. We have recently shown that Fourier analysis of the frequency dependent power distribution of blood flow downstream of the transplant anastomosis can be used to compute a Stenosis Index (SI) (Chan et al, 2013; Le et al, 2016). The SI measure, which takes into consideration the entire temporal profile of blood flow, can be thresholded to predict stenosis with 69% sensitivity and 90% specificity, compared with a specificity of 33% for the resistivity index (RI) in the same patient population. The reported specificity is a conservative estimate because the dataset used to compute accuracy was from subjects who underwent computed tomography angiography on suspicion of stenosis; these were the more difficult cases to pronounce as normal.
Figure 1.
A) A typical sonogram image. The waveform is located in the lower left corner where the outer rectangle is known by a machine setting. The other features are dynamically extracted. B) Different types of noise and deformities a waveform can have: light noise above the waveform (top), noise corrupting the waveform (middle), missing waveforms (second from bottom). C) Existing measures to predict stenosis.
The SI measure is currently calculated using interactive MATLAB scripts that require intermediate decisions by a human expert. This paper presents a fully automated image analysis clinical decision support tool for the diagnosis of hepatic arterial stenosis based on the SI index. As part of the process, we present methodology to solve the important problem of automatic waveform detection from noisy real world Doppler sonograms (see middle panel of Figure 1). As such, this tool has the potential to be used inline as part of the workflow in radiology clinics.The rest of the paper is organized as follows. The Methods section details the algorithmic process for automatic waveform extraction and subsequent Fourier analysis. The Results & Discussion section describes the refinement and application of the tool to real world data. The last section summarizes the paper and suggests future work.
Methods
Dataset
The dataset used in this paper is a set of 50 Doppler sonograms randomly selected from an IRB, HIPAA compliant study of 159 patients totaling over 717 images capturing the blood flow distribution of the left, right and proper hepatic arteries. All patients had catheter angiography for suspected transplant hepatic arterial stenosis or had computed tomography (CT) scans that showed no arterial narrowing between January 2006 and December 2010 at a single tertiary care medical center. All ultrasounds were performed in a 30-day window prior to angiography or CT.
Algorithms
There are three main phases in the automated process used to predict stenosis (Figure 2). First, the envelope of the waveform is determined using an automated sequence of steps (Figure 3). Next, the envelope is used as input to derive a Fourier spectrum. Finally, the power distribution of the Fourier spectrum is used to calculate the Stenosis Index (Figure 1).
Figure 2.
The scheme for predicting stenosis with the Stenosis Index (SI). A sonogram image is reduced into a region of interest and the waveform extracted. A discrete Fourier transform is applied and the SI computed to predict stenosis (liver background image from Abu-Wasel et al, 2013).
Figure 3.
Overview of steps for extracting a waveform envelope from a sonogram. The region of interest is initially determined using presets for the outer boundary and then further reduced to the inner rectangle. Methods listed on the right are then used for envelope detection.
Determination of Region of Interest
Instrumental parameters are used to locate the baseline and upper bound (red “outer rectangle” in Figure 1) of the initial region of interest (ROI). Alternatively, specific patterns of solid white (baseline) and solid black pixels (upper edge of sonogram) are used to find the respective bounds. The ROI is narrowed down to a smaller rectangle (cyan line in Figure 1) that bounds the waveform by analyzing the first and second derivatives, and the transition from bright to dark, of the marginal distribution of pixel brightness in the vertical dimension. In other words, the waveform is expected to be found below the region where the sharpest drop in average brightness occurs.
Waveform Envelope Determination by Edge Detection
The envelope or crest of the waveform in a Doppler sonogram represents the instantaneous peak velocity. This is the highest during systole and lowest during diastole. A horizontal edge detection filter is used to find the wave envelope. This is a simple mask that integrates the differences in intensities of a local area above and below a given pixel, so that an edge of white waveform below and dark background above scores the highest.
Waveform Envelope Determination by 95th percentile
The distribution of velocity at each time point is analyzed to find the 95th percentile of the instantaneous velocity distribution. This is taken to be the estimate of the local peak velocity or the top of the waveform at each timepoint.
Noise compensation
Instantaneous mean velocities within the small rectangle (local mean at every time point) are calculated first. The sonogram is then padded with artificial counts (‘pseudocounts’ as prior) up to half of the mean instantaneous velocity. The rationale is to compensate for random noise above the waveform, but without altering the outline of the waveform. The 95th percentile is recalculated after padding.
Isolation of corrupted waveform sections
Autocorrelation was used to find the putative frequency of the waveform. This was followed by slicing the sonogram timeline into slices, with each slice corresponding to the estimated wavelength. The slices (individual waves) were aligned to each other to identify parts of the sonogram that were markedly dissimilar to the other waves. The corresponding subsequence of the sonogram was eliminated from further analysis.
Determination of Optimal Sonogram Subsequence
The objective is to find the best subsequence of three cycles of the signal in a given sonogram. In the first step, an estimate of the average pulse rate (frequency) is made by analyzing the small rectangular region for a periodic pattern.
Estimation of Prediction Error
A gold standard set of 50 sonogram envelopes was created manually by painting the waveform on the set of 50 randomly chosen sonograms. This was compared with each method for predicting the envelope. Error was estimated as the mean squared error and percent absolute error. The bias component of error was estimated by calculating the mean difference between the prediction and the ground truth.
Fourier Transform & SI Index
The envelope was subjected to a discrete Fourier transform. The SI index was calculated as described in (Chan et al, 2013) by taking the ratio of the power in the high frequency components to that in the low frequency components of the Fourier spectrum.
Implementation
The project was implemented in the Eclipse IDE using Java 1.8.0_101. We implemented all modules of the software except for the discrete Fourier transform, which was imported from Project Nayuki’s implementation (Nayuki, 2016). Analysis and charts were generated in R 3.2.0.
Results & Discussion
Blood flow velocity should be ideally measured at or just beyond the arterial anastomosis of the liver transplant to detect the presence of stenosis. However, this junction is often obscured by overlying bowel gas which greatly attenuates and scatters the sound waves needed for ultrasound imaging. As an alternative, downstream blood flow within the right or left hepatic arteries is often measured. In contrast to imaging the carotid artery, which is relatively close to the surface of the body, imaging of arteries within the abdomen is more challenging. Respiration can cause the artery to move in and out of the imaging field, the orientation of flows can be both towards and away from the probe, and flow in adjacent blood vessels can be superimposed on arterial flow measurements. Automatic detection of the waveform is therefore not a trivial task. Even an expert ultrasound technician might occasionally make errors in locating the systolic peak and diastolic trough in blood velocity. Sample images of Doppler sonograms of hepatic arteries are shown in the middle panel of Figure 1. Features of the Doppler sonogram that make extraction of the envelope challenging are aliasing of the waveform, ‘salt and pepper’ noise, faint or sparse signals, patchy waveforms with interior ‘holes,’ inversion of the waveform, incomplete/interrupted waveform, and wrap around start and end points. More than half the real world images suffer from one of the above defects, making it challenging to automate envelope extraction.Aliasing and ‘salt and pepper’ noise make it hard to detect the junction between the crest of the wave and background. ‘Holes’ within waveforms make it challenging for an edge detection algorithm to find the correct edge. Inversion of the waveform is caused by blood flow directed away from the ultrasound probe; any automation should also take this possibility into account. For a more accurate Fourier transform, a minimum sample size of three contiguous waves is necessary. When only a subset of a sonogram is usable, the waveform detection algorithm should be able to detect and extract the corresponding subsequence. Finally, in the cases where the sonogram is useless, the detection algorithm should be ideally able to conclude that a repeat sonogram is needed.The larger orange rectangle encompassing the region of interest (ROI) (labeled ‘outer rectangle’ in Figure 2) was first isolated based on instrument specific parameters. The cyan line in Figure 2 represents the upper bound of a more focused rectangular ROI corresponding to peak velocities (extraction procedure is described under Methods). The result of wave envelope detection with a simple horizontal edge filter is shown in Figure 4. The speckled nature of the Doppler waveform causes the edge filter to frequently underestimate the peak velocities. In contrast, the 95th percentile of the instantaneous velocity distribution performs quite well (Figure 5). When the sonogram is sparse, the diastolic minimum velocity is overestimated as noise above the waveform might correspond to the 95th percentile. A common technique for overcoming random noise is Gaussian smoothening. However, since the interior of the waveform has many dark areas, and the data is highly directional (waveform below, background above) this wasn’t found to be useful. Instead we make use of a velocity prior to overcome the problem of noise above the waveform. As described in the Methods section, ‘pseudocounts’ were added to bias the instantaneous velocity distribution closer to the baseline, and thus prevent overshoot.
Figure 4.
Envelope detection by using an edge filter.
Figure 5.
The lower panels show the instantaneous distribution of velocity corresponding to a single time point of the sonogram in the above panels and corresponding 95th percentile value of blood flow. The sonogram on the right has been augmented with pseudocounts to skew the velocity distribution. As a result, the new 95th percentile (black line) threshold is shifted to a lower velocity.
To tackle incomplete waveforms or those that contain only a few good regions, a combination of autocorrelation and self-similarity of individual waves (described under methods) was used to detect regions of degraded sonogram. The corresponding subsequence of the sonogram was eliminated by ‘digital apoptosis’ and excluded from downstream Fourier analysis.The comparative performance of different approaches to tracing the wave envelope is shown in Table 1 and the left panel of Figure 6. The addition of pseudocounts close to the baseline reduces the error in waveform detection for both the whole sonogram as well as the best contiguous section of the sonogram having three peaks (3Form). Overall, the contiguous section of three peaks has the lowest mean squared error. The error histogram (Figure 6) and the low median error (Table 1) indicate that the vast majority of images have very low error, with most of the error coming from just a few images. The subsequence of the three best peaks has the lowest absolute percent error. This indicates the benefit of focusing on the best part of sonogram and the success of the automated method for isolating it. We found that the systematic error (average of signed error) is positive and less than one percent. This indicates that choosing the 95th%ile does not systematically underestimate the true envelope.
Table 1.
Comparison of error estimates with/without pseudocounts for full versus best 3-wave form.
3Form (pseudocounts)
3Form
Full Waveform (pseudocounts)
Full Waveform
Avg MSE ± SD
157 ± 16.9
220 ± 21.4
181 ± 17.3
261 ± 22.8
Median MSE
50
41
70
51
Avg Absolute % Error
7.1 ± 0.36
8.3 ± 0.63
8.1 ± 1.58
9.7 ± 0.87
Figure 6.
Left: Percent error in envelope estimation by best 3-wave subsequence with & without pseudocounts (‘buffer’), and full sonogram with & without pseudocounts; Right: Distribution of MSE contribution from random sample of 50 images.
A comparison of the Fourier spectrum obtained by interactive and automated methods is shown in Figure 7. The first large peak represents the fundamental frequency of the Doppler sonogram corresponding to the pulse rate. The series of peaks to the right represent higher frequency components that we have previously shown to carry relatively more power in normal versus stenosed arteries. The similarity between the two spectra illustrates the success of automation in approximating the interactive method of computing the Stenosis Index.
Figure 7.
Left: Interactive estimation of Fourier spectrum and Stenosis Index from sonogram by human expert; Right: Fully automated estimation of Fourier spectrum and Stenosis Index for same sonogram.
Conclusions & Future Work
We have described an automated clinical decision support tool for the prediction of arterial stenosis in liver transplant recipients. Strengths of the approach are automated extraction of the waveform from noisy sonograms and the use of Fourier analysis for comprehensive analysis of blood flow. Ideally, there should be a low number of false negatives, even if it means having more false positives. This is true for the Stenosis Index, which has high sensitivity and moderate specificity. It can be therefore used as a screening tool to pick up early signs of stenosis. The software is currently being evaluated by radiologists prior to an IRB approved clinical study of its effectiveness. The technique used for waveform extraction is general enough to be applied to other forms of Doppler data. We are also planning to explore machine learning alternatives (Krishnamoorthy et al, 2015) to the Stenosis Index.
Authors: Sherwin Chan; Michael Felden McNeeley; Thomas Xuan Le; Daniel S Hippe; Manjiri Dighe; Theodore J Dubinsky Journal: Ultrasound Q Date: 2013-09 Impact factor: 1.657
Authors: Thomas X Le; Daniel S Hippe; Michael F McNeeley; Manjiri K Dighe; Theodore J Dubinsky; Sherwin S Chan Journal: J Ultrasound Med Date: 2016-12-28 Impact factor: 2.153
Authors: Blake A Hamby; Daniel E Ramirez; George E Loss; Hernan A Bazan; Taylor A Smith; Edward Bluth; W Charles Sternbergh Journal: J Vasc Surg Date: 2013-01-18 Impact factor: 4.268