jee 4980 – senior design project...jee 4980 – senior design project: ultrasound and elasticity...

25
JEE 4980 – Senior Design Project: Ultrasound and Elasticity Imaging Spring 2008 Dr. Jason Trobaugh Nick Baer Christine Robinson Curt Wibbenmeyer 1

Upload: others

Post on 16-Jul-2020

11 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: JEE 4980 – Senior Design Project...JEE 4980 – Senior Design Project: Ultrasound and Elasticity Imaging Spring 2008 Dr. Jason Trobaugh Nick Baer Christine Robinson Curt WibbenmeyerAbstract:

JEE 4980 – Senior Design Project:

Ultrasound and Elasticity Imaging

Spring 2008 Dr. Jason Trobaugh

Nick Baer Christine Robinson Curt Wibbenmeyer

1

Page 2: JEE 4980 – Senior Design Project...JEE 4980 – Senior Design Project: Ultrasound and Elasticity Imaging Spring 2008 Dr. Jason Trobaugh Nick Baer Christine Robinson Curt WibbenmeyerAbstract:

Abstract: In this paper we have thoroughly investigated, developed, and tested an algorithm that will aid in the elastography of soft tissues. The long term goal of the project was to produce an easy to use, efficient, and adaptable algorithm that would take a set of raw ultrasound images and ultimately produce a strain image for use in determining relative elasticity of any object within the soft tissue of the body. We began development with test data that would produce known results and expanded our algorithm to properly function with various types of soft tissue including the tissues of the human body and poroelastic phantoms such as tofu. Beginning with previously established, structural algorithmic framework, we developed a set of project objectives that we believed were important in developing a finished product. We then took these objectives and implemented them using psuedocode followed by a functional algorithm in MATLAB. Using MATLAB and a continuous reevaluation of our project objectives we were able to produce an algorithm that produced consistent displacement estimates from known test data as well as from experimental tissues such as tofu and tissues from the body. Once these displacement estimates were satisfactory, strain images were produced from the displacement data. The remainder of this paper briefly refreshes the early work on the project followed by a more thorough discussion of the results obtained and possible avenues for future work and research. Introduction: Before delving into the intricacies of the project, it is necessary to provide some fundamental background of the subject matter at hand. This project consists of two areas of study that are of particular importance: Ultrasound and Elasticity Imaging. Ultrasound1 is a medical imaging technique that uses high frequency sound waves and their echoes. The basic premise is that high frequency sound waves (on the order of 1 to 5 MHz) are transmitted into the body with an ultrasonic probe. These waves propagate through the body’s tissue at the speed of sound (in tissue). When a wave hits something solid in the tissue it is reflected back to the probe. Waves that have not encountered a reflective object in the tissue continue to propagate through the body until a reflective surface is encountered. Once a wave has been reflected, the machine calculates the distance from the probe and the return time of the signal echo. It then displays the intensities and distance in the form of a two dimensional image on a screen. Ultrasound has proven extremely useful in the medical field where it is used in a wide variety of applications, most notably Obstetrics and Gynecology. Ultrasound has proven to be less harmful than other imaging techniques as the risks are minimal when proper precautions are taken. Perhaps the largest advance in ultrasound has come in the last decade with its use in elasticity imaging. Ultrasound imaging is the core element of the project as it is provides the raw signals that our algorithm uses to produce a final result. Elasticity Imaging2 is the use of ultrasonic images to measure an object’s relative firmness or tendency to displace when a force is applied. The core of an elastograph comes from a series of ultrasonic images that are analyzed from the raw signals. The basic premise (for a 2 signal system) starts with taking the raw signals and up-sampling them to obtain smooth features that can be easily compared. Once the signals are up-sampled, a cross-correlation (a sliding dot product) is computed at every point along the signals. The cross-correlation provides a direct

2

Page 3: JEE 4980 – Senior Design Project...JEE 4980 – Senior Design Project: Ultrasound and Elasticity Imaging Spring 2008 Dr. Jason Trobaugh Nick Baer Christine Robinson Curt WibbenmeyerAbstract:

measure of the similarity between the two signals. Using the values from the cross-correlation, the displacement between the two signals can be estimated. The strain can now be obtained by taking the gradient of the displacement. Knowing the elasticity of an object could possibly allow someone to determine, for instance, if a tumor embedded in the tissue of a human is cancerous based on how firm it is. Elasticity imaging has become an invaluable resource in the early detection of cancers, particularly breast cancers3. In recent years elasticity imaging has provided medical experts a method of detecting malignant cancers with very high certainty, ultimately reducing the number of biopsies that have to be conducted. Early Project Research and Development: The early stages of the project were geared towards producing the initial proposal to further develop the algorithm. The following is a review of the processes undertaken early in our work. We began the project by establishing a problem statement that encompassed the project as a whole. This is stated below: Problem Statement:

To produce an algorithm that can accept a set of pre and post compression ultrasound signals taken from any soft tissue as input. The algorithm will then transform the input into an elasticity image that will be used to determine the relative elasticity of any object within the tissue where the raw signals originated. After careful consideration of the problem statement we initially developed what we believed to be a fundamental set of project objectives. These objectives were: Project Objectives:

• Easy of use: The final program should be provide a user friendly environment that obtains the input signals and processes them with little or no extra user input.

• Efficient: The final program should be able to take input signals and process them efficiently to

minimize the time required to process a given set of input. • Robust: The final program should be robust enough to handle errors in processing without

causing total failure of the system. • Adaptable: The final program should be able to adapt to any combination of input signals and

produce a quality elasticity image. The program should be able to interpret input signals from a variety of soft tissues.

3

Page 4: JEE 4980 – Senior Design Project...JEE 4980 – Senior Design Project: Ultrasound and Elasticity Imaging Spring 2008 Dr. Jason Trobaugh Nick Baer Christine Robinson Curt WibbenmeyerAbstract:

A flowchart was then produced to outline the algorithm development process. This would be our base model for revision of the algorithm throughout the project.

Algorithm Development

Input Raw Signal(s)

Up-Sample Raw Signals

Shift Smoothed Signals (Window)

Cross-Correlate Smooth, Shifted

Signals

Modify Shift Value

Produce Displacement Curve / Image

Modify Sample Rate

Take gradient of the Displacement Curve /

Image

Elasticity / Strain Image

The development of the algorithm was implemented via segments of pseudo code and coded in MATLAB. The first part of the development was based on the SimDisplacement data which contained four single arrays of simulated signals which would produce a sinc function as known output. The results from all phases of this development are explained below.

4

Page 5: JEE 4980 – Senior Design Project...JEE 4980 – Senior Design Project: Ultrasound and Elasticity Imaging Spring 2008 Dr. Jason Trobaugh Nick Baer Christine Robinson Curt WibbenmeyerAbstract:

Figure 1: Raw signals 1 and 2 from the SimDisplacement arrays. The figure above represents the raw, non-up-sampled signals from the SimDisplacement data. It is obvious that the two signals above do not line up and posses a shift relative to each other. This raw, jagged signal and the time shift were the first issue that must be corrected in order to develop our algorithm. Figure 2: Initial Displacement Curve – SimDisplacement data When we initially developed the correlation function, we knew the resulting displacement curve should ultimately resemble the sinc function (our known output). The above figure shows crude signs of this result before the algorithm was improved. This initial displacement curve reinforced the fact that the signals in Figure 1 needed to be properly aligned and up-sampled to obtain a quality displacement curve.

5

Page 6: JEE 4980 – Senior Design Project...JEE 4980 – Senior Design Project: Ultrasound and Elasticity Imaging Spring 2008 Dr. Jason Trobaugh Nick Baer Christine Robinson Curt WibbenmeyerAbstract:

Figure 3: Second Displacement Curve with up-sampled data The displacement curve above represents the displacement curve after our initial attempt at up-sampling and shifting the raw signals. As seen above, this proved to work partially in our favor. Over the same range as before, we obtained a curve with fewer discrepancies and some minor spikes. These spikes represent errors in the function of our algorithm’s ability to obtain a proper cross-correlation of the two functions. This would be remedied next by adding code to effectively limit the range of the correlation function so that it doesn’t look beyond the proper point when computing the cross-correlation. Doing so produced the following images. Figure 4a: Up-sampled, shifted, spike corrected signals from SimDisplacement

6

Page 7: JEE 4980 – Senior Design Project...JEE 4980 – Senior Design Project: Ultrasound and Elasticity Imaging Spring 2008 Dr. Jason Trobaugh Nick Baer Christine Robinson Curt WibbenmeyerAbstract:

Figure 4b: Final Displacement Curve using up-sampled, shifted, spike corrected data The figures above show that we were able to manipulate the algorithm to produce a quality displacement curve that could take a set of raw signals, up-sample them, shift them so that they are properly aligned from one frame to the next, and essentially filter them so that when they are cross-correlated against each other an accurate representation of the true cross-correlation is obtained. This “true” cross-correlation is evident by the sinc function phenomenon that is seen in the displacement curve. Once we knew that the correct displacement curve had been produced, we concluded that we could alter the code of our algorithm and apply it to the Forearm Reduced 4980 data. In order for our algorithm to correctly function with the forearm data, we would need to once again alter our code. After adjusting some of the limiting parameters and adding nested for loops that allowed us to do single column comparisons, we obtained the following displacement image. Figure 5: Displacement image from Forearm Reduced data

7

Page 8: JEE 4980 – Senior Design Project...JEE 4980 – Senior Design Project: Ultrasound and Elasticity Imaging Spring 2008 Dr. Jason Trobaugh Nick Baer Christine Robinson Curt WibbenmeyerAbstract:

The results presented above represent the research and development that took us into the mid-semester proposal deadline. Our new goal for the remainder of the semester was to take the displacement images we had developed and turn them into the strain images. Initially the only resource (ultrasound data) available for use was the Forearm Reduced data set. This proved to be a cumbersome obstacle as the data was difficult to interpret with any level of confidence. In order to ensure that our algorithm was functioning correctly, it was the general consensus that better tissue models with more controlled parameters would be needed. With the assistance of Dr. Trobaugh, we were provided with tofu phantoms that would produce clean and accurate displacement images if the algorithm were functioning properly. The remainder of the semester’s work was dedicated to producing quality displacement and strain images through work with image smoothing and filtering. The results of this work are presented in the next section accompanied by discussion and interpretation of the results. Results: Displacement Images: Immediately after the proposal, we began working with the Forearm Reduced data trying to improve upon our displacement image seen in Figure 5 above. The main goal was to try and remove some of the yellow spikes in the displacement images. It was our belief that these spikes were caused by an inability of our algorithm to pick up the correct peaks when doing the cross-correlation. Considerable work was done to improve this, however it was relatively unsuccessful. The final Forearm Reduced displacement image is seen below. Figure 6: Final Displacement and Strain Images from Forearm Reduced Data

As seen from the pictures above, trying to remove the existing anomalies only resulted in producing new ones in different areas of the displacement image. A valiant attempt was made to perform various levels of image filtering and smoothing using the MATLAB ‘polyval’ and ‘polyfit’ commands. At the last minute, we also learned of using the ‘wiener2’ filter that is part

8

Page 9: JEE 4980 – Senior Design Project...JEE 4980 – Senior Design Project: Ultrasound and Elasticity Imaging Spring 2008 Dr. Jason Trobaugh Nick Baer Christine Robinson Curt WibbenmeyerAbstract:

of the MATLAB image processing toolbox. These proved to be outside the level of our MATLAB expertise and would have been too time consuming to pursue any further. Instead we chose to work with our current blip correction devices and window sizes that were previously employed. Although not the most effective methods of smoothing, it produced results of decent quality that allowed us to continue working with the tofu phantoms in the amount of time that we had to work with. Tofu Phantoms: We next worked with the tofu phantoms provided by Dr. Trobaugh. This was done because the Forearm Reduced data proved difficult to work with and produce confident results. There were three tofu samples provided to use. Tofu Phantom 1: The first phantom (named Tofu) was nothing more than a solid block of tofu that had been uniformly compressed a distance of 4 mm. Using our algorithm, we produced the following displacement images (Initial and Smoothed): Figure 7: Tofu Displacement Image (Initial) and Smoothed

The images above showed no signs of the anomalies present in the forearm data. The results of this tofu phantom are consistent with what we would expect from a solid block under uniform compression. The image to the right was the result of slight adjustment to the window size and blip correction within the algorithm and shows more detail than the initial image.

9

Page 10: JEE 4980 – Senior Design Project...JEE 4980 – Senior Design Project: Ultrasound and Elasticity Imaging Spring 2008 Dr. Jason Trobaugh Nick Baer Christine Robinson Curt WibbenmeyerAbstract:

Tofu Phantom 2: The second tofu phantom (named Tofu2) consisted of a core of less elastic tofu embedded within a block of more elastic tofu. This sample was once again compressed in a uniform manner from above a distance of 4 mm. Maintaining the same filtering attributes from the above images our algorithm produced the following displacement images: Figure 8: Tofu2 Displacement Image

Looking at the color bar in the image above we see the behavior that one would expect from a less elastic material embedded in a medium of higher elasticity. The image clearly shows the boundary between the less elastic core and the surrounding medium. From the color bar it is obvious that the core displaced less than the encompassing medium. The image shows that the solid portion of the phantom displaces like the tofu from the images above (as expected). Tofu Phantom 3: The third phantom (named Tofu1) was the opposite of the above case where the core was more elastic than the surrounding block. The core in this block was placed closer to the center than in phantom 2 and was uniformly compressed a distance of 4mm. Maintaining the same filtering attributes as the other 2 trials out algorithm produced the following displacement image: Figure 9: Tofu1 Displacement Image

10

Page 11: JEE 4980 – Senior Design Project...JEE 4980 – Senior Design Project: Ultrasound and Elasticity Imaging Spring 2008 Dr. Jason Trobaugh Nick Baer Christine Robinson Curt WibbenmeyerAbstract:

In the picture above it is a little more difficult to pick out the core. It is seen in the bottom left of the image in a circular form. The fact that the core was more elastic than the surrounding medium would lead us to the behavior seen in the displacement image above. The core obviously possesses an almost identical displacement as the surrounding medium. This feature is what makes it difficult to decipher its location. Strain Images: The goal for the last portion of the semester was to take our algorithm and adapt it to produce a strain image from the displacement data we had obtained. There were many different methods researched to produce the most effective strain image. We looked at the MATLAB functions ‘gradient’, ‘jacobian’, and ‘diff’ in order to select the most effective method. The gradient and jacobian functions were found to require more work and alteration of the code to produce the same result that could be obtained from using the diff function directly. Therefore we focused our efforts on using the ‘diff’ function to produce the strain images. The initial effort to produce a strain image came from the Forearm Reduced data. The strain image we produced seemed to be of reasonable quality. However, with the difficulties faced in obtaining a quality displacement image, the results led to some doubt to the integrity of the strain image. With that said, we used the original displacement image (Figure 5) to produce a strain image of the Forearm Data: Figure 9: Forearm Reduced Strain Image

This seemed to be a strain image of reasonable quality. We went back to the original movie of the Forearm Data to compare some of the features seen in the above image and determined that this could be a reasonable representation of the strain in the Forearm. However, due to the overall uncertainty associated with this data, we chose to focus more effort on the tofu phantoms.

11

Page 12: JEE 4980 – Senior Design Project...JEE 4980 – Senior Design Project: Ultrasound and Elasticity Imaging Spring 2008 Dr. Jason Trobaugh Nick Baer Christine Robinson Curt WibbenmeyerAbstract:

Tofu Phantom 1: Looking at the displacement image above (Figure 7) it is evident that the displacement is approximately linear throughout the range of the image. Knowing that the strain is the derivative of the displacement, intuitively we should obtain an image of a solid color (constant strain). This behavior was verified by the image below. Figure 10: Solid Tofu Strain

Tofu Phantom 2: From the displacement image above (Figure 8) we expected different behavior for the second phantom. It was out belief that we should see a clear boundary in the strain image where the less elastic core was present. We did not expect much change in the surrounding medium as it still possessed its linear displacement characteristics. Our algorithm produced the following strain image of the area around the core of phantom two: Figure 11: Tofu2 Core Area Strain Image

12

Page 13: JEE 4980 – Senior Design Project...JEE 4980 – Senior Design Project: Ultrasound and Elasticity Imaging Spring 2008 Dr. Jason Trobaugh Nick Baer Christine Robinson Curt WibbenmeyerAbstract:

The image above confirmed our hypothesis about seeing a clear boundary between the two mediums. The deviations in the elasticity characteristics are especially obvious in the boundary area between the core and block. Perhaps with more detail in the color bar and caxis, we could have further differentiated the difference in the strain and produced an image with even more detail. The intense bright spots along the boundary of this image are most likely due to air bubbles present in the tofu sample. This will be looked at in detail in the discussion section. Tofu Phantom 3; From previous experience with the second phantom and the displacement image of the third phantom, we hypothesized that the strain image for this phantom would be nearly constant (one color) with the possibly exception of the boundary being visible because of air bubbles. Our algorithm produced the following strain image: Figure 12: Tofu1 Strain Image

It is slightly easier to locate the core in this strain image because of the circular bright spots that are present in the same location as the displacement image (Figure 9). This verified our hypothesis that the strain would be almost constant throughout this image. Discussion: First, it is important to note that as we progressed through deeper levels of development, we realized that some of the objectives we outlined would be difficult to obtain in the time allotted. Rather than trying to conform to an unrealistic set of goals, we continued development with a simpler goal of producing a functional algorithm that would produce quality images and could be improved by future coursework. It is also important to step back and reflect on exactly what we have learned through the course of this semester. Looking at the above results, we can draw a few conclusions about our work. One main point of this project was for us to decipher the relationship between displacement and elasticity. In the early stages of development this relationship wasn’t entirely clear. This was definitely the case when we were working with the Forearm Reduced data as it proved very

13

Page 14: JEE 4980 – Senior Design Project...JEE 4980 – Senior Design Project: Ultrasound and Elasticity Imaging Spring 2008 Dr. Jason Trobaugh Nick Baer Christine Robinson Curt WibbenmeyerAbstract:

difficult for us to produce any images of substantial quality. It is now the belief that this set of data was perhaps too complicated for the algorithm we developed. There were too many independent variables for us to eliminate in order to produce confident results. In order to show that our algorithm could produce quality output, we felt that a more controlled set of data needed to be introduced. This call for action was answered with several tofu phantoms provided by Dr. Trobaugh. With these phantoms we were able to determine that our algorithm could in fact produce expected results. As development became more involved, the need for extra levels of image filtering and smoothing became clear. Although we knew filtering was needed, we had to educate ourselves as to why this was the case. We determined that the crux of this issue came from a weak design of our initial cross-correlation function. While image smoothing and filtering could certainly improve the results we were obtaining, it was noted that all we were essentially doing was masking the underlying larger problem. The filtering process works well, but skewing the original data was certainly not the results we wanted to obtain. Branching from the results above we were able to understand the importance of the early work with the cross-correlation function. After all of this work had been done, perhaps the most important thing drawn from the experiment was the overall importance of the cross-correlation to the entire project. Having some signals background, we understood what the cross-correlation was, and how it functioned. What we didn’t foresee was its effect on the remainder of the project. The cross-correlation was by far the single portion of the project that should have been allotted the most time for quality development. Reflecting back, had we spent a substantial amount of time perfecting the cross-correlation, the remainder of the project would have a much nicer flow and balance. This balance would have allowed us time to fulfill some of the initial project objectives that we were forced to overlook. Future Work: There are several design alternatives and project objectives that we did not have ample time to investigate. These issues would be good candidates for future research and development to improve the overall functionality and efficiency of the algorithm. Perhaps these issues are worth spending another semester on to push the envelope of development. Future semesters could research possible design alternatives such as two dimensional motion tracking and multiple column comparison of the data. They could also look at the possibility of interference in the form of echoes. The very principle of ultrasound relies on echoes to function. Eliminating interference could prove to be a large step in producing quality results. Another avenue of investigation could be something similar to that in the Righetti4 paper where the tofu phantoms are left in the water bath for an extended period of time to allow all air bubbles to surface, hence enhancing the end result. Conclusion: On a final note, we believe that the project was an overall success. We recognize that there are many areas of the project that should have been investigated that could have given us better results. If we were to start from the beginning we would have prioritized the project differently to ensure seamless transactions in our research and development.

14

Page 15: JEE 4980 – Senior Design Project...JEE 4980 – Senior Design Project: Ultrasound and Elasticity Imaging Spring 2008 Dr. Jason Trobaugh Nick Baer Christine Robinson Curt WibbenmeyerAbstract:

Appendix:

- Feasibility Study - Matlab Code

15

Page 16: JEE 4980 – Senior Design Project...JEE 4980 – Senior Design Project: Ultrasound and Elasticity Imaging Spring 2008 Dr. Jason Trobaugh Nick Baer Christine Robinson Curt WibbenmeyerAbstract:

Feasibility: The following cost analysis of the design of this software is based upon Barry Boehm's Constructive Cost Model (COCOMO).1 There are three (3) methods for calculating software development projects, organic, semidetached, and embedded. We have chosen for estimating purposes the organic mode, quoted from Boehm’s Basic estimating COCOMO site: Organic

In the organic mode, relatively small software teams develop software in a highly familiar, in-house environment. Most people connected with the project have extensive experience in working with related systems within the organization, and have a thorough understanding of how the system under development will contribute to the organizations objectives. Very few organic-mode projects have developed products with more than 50 thousand delivered source instructions (KDSI).

Since the organic mode description most closely fits this project, we have chosen it for estimating the costs of this design. The other types of projects are Semidetached and Embedded, which require more complicated input than this project requires. This cost analysis is based upon an average cost rate for person-months of $10,000.00. The results are as follows: Figure a. – Project Logistics:

Task Effort (Person Months) Schedule (Months) Staff

(Avg.) Cost ($) Plans and requirements 0.1 0.3 0.3 1000Product Design 0.3 0.6 0.5 3000Programming 1.4 1.9 0.7 14000Detailed Design 0.5 0.6 0.2 5000Code and Unit Test 0.8 0.5 0.2 8000Integration and Test 0.3 0.5 0.5 3000Totals: 3.4 4.4 2.4 34000

Note: Cost is only a function of Effort, other categories are logistical We believe that this cost is outweighed by the benefits, described in the project Overview and Objectives.

1 http://cost.jsc.nasa.gov/COCOMO.html

16

Page 17: JEE 4980 – Senior Design Project...JEE 4980 – Senior Design Project: Ultrasound and Elasticity Imaging Spring 2008 Dr. Jason Trobaugh Nick Baer Christine Robinson Curt WibbenmeyerAbstract:

Matlab Code: upsample_factor = 10; windowsize = 20; overlap = 15; maxlag = 15 * upsample_factor; blip = 1 * upsample_factor; %makes a array of all 0's to be filled in later% d_curve = zeros(1,1); for j = 30:240 prev = 10; for i = 50:1100 %%%%goes though the arrays from 50 to 1100%%%% small_low = i-windowsize; small_high = i+windowsize; large_low = small_low-overlap; large_high = small_high+overlap;

data1= (b_data030( small_low:small_high, j))'; data2= (b_data035( large_low:large_high, j))';

%%%%%The following resamples the window at upsample_rate and pads the front end with 0's%%%% redata1 = [zeros(1, maxlag)resample(data1,upsample_factor,1)]; redata2 = resample(data2,upsample_factor,1); %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%xcorr is comparing the resampled data minus the amount of %"maxlag" on each end

%c = the corrilation between the 2 arrays %lags = the distance between the 2 arrays %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% [c,lags] = xcorr(redata1,redata2,maxlag); prevlag = prev+maxlag; %uses the previous displpacment number and adds maxlag [cmax,location]= max(c(prevlag-blip:prevlag+blip)); %%%takes the max of c between +-blip around 'prev'%%% [lags_small] = lags (prevlag-blip:prevlag+blip); %%%makes a array of the lag between +-blip around 'prev'%%% d_estimator = lags_small(location);

17

Page 18: JEE 4980 – Senior Design Project...JEE 4980 – Senior Design Project: Ultrasound and Elasticity Imaging Spring 2008 Dr. Jason Trobaugh Nick Baer Christine Robinson Curt WibbenmeyerAbstract:

%%%%uses the location of the max c point to find the displacement number(what we need)%%% prev = d_estimator; %%%%The following resets the ‘prev’ if it ever goes negative%%%% if d_estimator < -5 prev = 10; end %%%%The following puts the displacement number in the blank array in position 'i,j'%%%% d_curve(i,j) = d_estimator; end j end %%%The following creates the strain matrix%%% strain = diff(d_curve); %%%%The following plots the difference image and the strain image figure%%%% imagesc (d_curve); figure(gcf);caxis([0 35]); colorbar; axis([10 250 50 1000]) title('Displacement Image') figure imagesc (strain); figure(gcf);caxis([0 5]); colorbar; axis([10 250 50 1000]) title('Strain Image')

18

Page 19: JEE 4980 – Senior Design Project...JEE 4980 – Senior Design Project: Ultrasound and Elasticity Imaging Spring 2008 Dr. Jason Trobaugh Nick Baer Christine Robinson Curt WibbenmeyerAbstract:

References: 1http://en.wikipedia.org/wiki/Ultrasound Accessed: 2/18/2008

2http://en.wikipedia.org/wiki/Elastography Accessed: 2/18/2008.

3Svensson, W.E., and Amiras, D. “Ultrasound Elasticity Imaging.” Breast Cancer Online. 2006. www.bco.org

4Raffaella Righetti, Mariapaola Righetti, Jonathan Ophir,Thomas A Krouskop. “The feasibility of estimating and imaging the mechanical behavior of poroelastic materials using axial strain elastography. 15 May 2007. (http://classes.engineering.wustl.edu/jee4980/data/RighettiStrain2007.pdf) Other References:

Hall, Timothy F. “Beyond the Basics: Elasticity Imaging with US.” AAPM/RSNA

Physics Tutorial for Residents: Topics in US 2003: 1657-1671. (http://ese.wustl.edu/class/fl07/jee4980/data/HallElasticityRev01.pdf)

Single Element Focused Ultrasound Transducer Method for Harmonic Motion Imaging by Caroline Maleke, et al (http://www.bme.columbia.edu/eekweb/journals/2006-Ultrasonic-maleke.pdf)

19

Page 20: JEE 4980 – Senior Design Project...JEE 4980 – Senior Design Project: Ultrasound and Elasticity Imaging Spring 2008 Dr. Jason Trobaugh Nick Baer Christine Robinson Curt WibbenmeyerAbstract:

PROJECT MANUAL JEE4980 SENIOR DESIGN

Nick Baer

Christine Robinson Curt Wibbenmeyer

Spring 2008

Page 21: JEE 4980 – Senior Design Project...JEE 4980 – Senior Design Project: Ultrasound and Elasticity Imaging Spring 2008 Dr. Jason Trobaugh Nick Baer Christine Robinson Curt WibbenmeyerAbstract:

TABLE OF CONTENTS

1. Project Overview.........................................3 2. MATLAB code............................................4 3. Code Parameters Definitions.......................6 4. Parameter Adjustments................................7

2

Page 22: JEE 4980 – Senior Design Project...JEE 4980 – Senior Design Project: Ultrasound and Elasticity Imaging Spring 2008 Dr. Jason Trobaugh Nick Baer Christine Robinson Curt WibbenmeyerAbstract:

Project Overview

The goal of this project was to produce an algorithm that could accept a set of pre and post compression ultrasound signals taken from any soft tissue as input. The algorithm should then transform the input into an elasticity image that can be used to determine the relative elasticity of any object within the tissue where the raw signals originated. We used the data from the tfu2 ultrasound. The results shown in this manual reference this data, which can be found on the JEE4980 website.

3

Page 23: JEE 4980 – Senior Design Project...JEE 4980 – Senior Design Project: Ultrasound and Elasticity Imaging Spring 2008 Dr. Jason Trobaugh Nick Baer Christine Robinson Curt WibbenmeyerAbstract:

MATLAB Code

The following Code shows the algorithm used to interpret the tfu2 data and produce the final displacement and strain images: %run tfu2.mat upsample_factor = 10; windowsize = 40/2; overlap = 15; maxlag = 15 * upsample_factor; blip = 1 * upsample_factor; d_curve = zeros (1,1); for j = 30:240 prev = 10; for i = 50:1100 small_low = i-windowsize; small_high = i+windowsize; large_low = small_low-overlap; large_high = small_high+overlap; data1= (b_data030 ( small_low:small_high, j))’; data2= (b_data040 ( large_low:large_high, j) redata1 = [zeros (1, maxlag) resample \ (data1,upsample_factor,1)];

BLIP: Recommended at 1 x upsample factor For this analysis, the blip limits the spike on the displacement curve to 10 (upsample=10), so that the curve cannot jump more than a value of 10. This is good because it makes the curve smooth. It can be bad, because if the curve hits a spot outside of the blip range, it looks for the prevlag value + blip, and can’t find the value, so we lose the curve. If this result occurs, try adjusting the blip to a higher value.

9

4

Page 24: JEE 4980 – Senior Design Project...JEE 4980 – Senior Design Project: Ultrasound and Elasticity Imaging Spring 2008 Dr. Jason Trobaugh Nick Baer Christine Robinson Curt WibbenmeyerAbstract:

fails early or becomes a flat line, try increasing the window size. If the window size is too big, the program may have too large a space to find peaks, and as a result the curve can show spikes or dips. For example, when the window size was adjusted up to 100, the displacement curve showed a large dip at approximately column 500. If large sections of incorrect peaks and valleys occur, try decreasing the window size. OVERLAP: Recommended at 15 The same results occur when increasing and decreasing the overlap as when the window size is adjusted. This is due to the fact that the overlap is the number of columns by which the window size for the second vector is adjusted. MAXLAG: Recommended at 15 x upsample factor When the maxlag factor is increased, the displacement curve looks step like with very large values and jumps in the curve, for reasons unknown. When the maxlag is decreased, the displacement curve quickly goes negative, for reasons unknown. The best results for the maxlag value is setting maxlag factor equal to the overlap value.

redata2 = resample \(data2,upsample_factor,1);

[c,lags] = xcorr (redata1,redata2,maxlag);

prevlag = prev+maxlag;

[cmax,location]= max(c(prevlag-blip:prevlag+blip))

prev = d_estimator; if d_estimator < -5 prev = 10; end d_curve (i,j) = d_estimator; end j end strain = diff (d_curve); figure imagesc (d_curve); figure (gcf);caxis ([0 35]); colorbar; axis ([10 250 50 1000]) title (‘Displacement Image’) figure imagesc (strain); figure (gcf);caxis ([0 5]); colorbar; axis ([10 250 50 1000]) title (‘Strain Image’)

5

8

Page 25: JEE 4980 – Senior Design Project...JEE 4980 – Senior Design Project: Ultrasound and Elasticity Imaging Spring 2008 Dr. Jason Trobaugh Nick Baer Christine Robinson Curt WibbenmeyerAbstract:

Code Parameters Upsample Factor: The rate at which we re-sampled the data. An upsample factor of 10 would analyze 1 vector 10 times. Window size: The window size is the size of the arrays that are being compared by using a sliding dot product to get the correlation function. For this analysis, we used a window size of +- 20 around the i value, i value from 50:1100. Overlap: The difference between the size of the two windows.

Maxlag: The maxlag is used in the cross correlation to return the correlation sequence over the lag range. Blip: The blip limits the spike on the displacement curve.

Parameter Adjustments We had the following results when adjusting the parameters. UPSAMPLE FACTOR: Recommended at 10 Increasing the upsample factor gives a smooth displacement curve, but causes the program to run very slowly. This curve is smooth because of the number of times the program analyzes the data, but the time it takes is a practical disadvantage. Decreasing the upsample factor may speed the results, but produces a curve that is not smooth. If the program produces a curve that looks choppy, try increasing the upsample factor. Keep in mind that there are other factors, such as the size of arrays being analyzed and number of loops, that will increase the program run time. WINDOW SIZE: Recommended at 20

7

If the window size is too small, the program may not find the matching peaks and the resulting displacement curve will fail. For example, when the window size was adjusted down to 3, the curve went flat at approximately column 200. If the curve

6