Upload
others
View
0
Download
0
Embed Size (px)
Citation preview
WASHINGTON UNIVERSITY
JEE 4980 Senior DesignUltrasound Elasticity Imaging Final Report
Steven Goodwin Mark Green
12/16/2008
2 Goodwin & Green
ABSTRACT
Within this report, we have developed a useful way of retrieving a strain image from an organic culture through compression and ultra sound imaging. Two signals, one before compression and then one afterwards, are used to produce a strain image. The two signals are compared, their differences are analyzed, a displacement image is formed, a clean up phase is introduced, and then the derivative of this signal is taken to produce the much needed strain image. A simulation of human tissue was formed in the use of tofu samples. Being able to develop these images can prove to be more beneficial to person who wants to shy away from having painful and sometimes unnecessary biopsies.
INTRODUCTION
Ultrasound imaging is a non-invasive medical test that helps doctors diagnose and treat a variety of medical conditions. An ultrasound scan involves exposing a part of the body to high-frequency sound waves to produce pictures of the inside of the body. These ultrasound images are captured in real-time. They show structure and movement of the body’s internal organs, as well as blood flowing through blood vessels. Conventional ultrasounds display images in thin, flat sections of the body. The advancements in ultra sound technology include three-dimensional and four-dimensional imaging. 3-D ultra sounds format the sound wave data into 3-D images. 4-D ultra sound is simply 3-D in motion.
Ultrasound imaging has helped many physicians to diagnose a variety of conditions and assess organ damage following any type of illness. Doctors are able to evaluate symptoms such as pain, swelling, and infection. Ultrasound is also useful in examining many of the body’s internal organs such as the heart, blood vessels, liver, kidneys, uterus and unborn child in pregnant patients, just to name a few. Doctors can use ultrasound as a guide during procedures such as needle biopsies and to diagnose a variety of heart conditions as well as assess damage after a heart attack. Many ultra sound images can help doctors to see and evaluate tumors and other cancerous growths. With knowledge about the speed and volume of blood flow from some ultrasound images, a doctor can often determine whether a patient is a good candidate for a certain type of procedure.
The procedure of ultrasound imaging is based on the same principles involved in sonar. When a sound wave strikes an object, it bounces back or echoes. By measuring the echo waves it is possible to determine how far away the object is and its size, shape and consistency. In the medical field, ultrasound is used to detect changes in the appearance of organs, tissues and vessels or detect abnormal masses such as tumors. In an ultrasound examination, a transducer sends the sound waves and records the echoing waves. When the transducer is pressed against the skin, it directs small pulses of inaudible, high frequency sound waves into the body. As the sound waves bounce off of internal organs, fluids, and tissues, the sensitive microphone in the transducer records tiny changes in the sound’s pitch and direction. These signature waves are instantly measured and displayed by a computer, which in turn creates a real-time picture on the
3 Goodwin & Green
monitor. One or more frames of moving pictures are typically captured as still images. (The Radiology Information Resource for Patients)
METHODOLOGY
Our path to greatness started with learning and understanding the code of previous
projects. Our initial step was to develop and recognize two signals. The first, before the compression and second, examining the tissue sample after compression. These two signals are placed on top of each other to compare their peaks and valleys. One looked for similarities and then how far off or shifted apart they were. This is better known as getting the displacement image. A cross correlation function was used to perform this in the algorithm. Now this developed the much wanted displacement image. A displacement plot will be generated. This will aid in detecting whether the compression and the displacement due to the compression was linear in nature. By taking the derivative of this signal, one can obtain the strain plot. If this plot is linear without and blips, then you have achieved a good strain image.
4 Goodwin & Green
Tfu2.mat results
Figure1
0 20 40 60 80 100 120 140 160 180 200-2500
-2000
-1500
-1000
-500
0
500
1000
1500
2000
This is a figure of (b_data000) and (b_data020). We focused on column 177, and
row 300 to 414. This shows that the displacement of the two signals is around 6.
Figure 2
-100 -80 -60 -40 -20 0 20 40 60 80 100-1.5
-1
-0.5
0
0.5
1
1.5
2x 10
8
This is a figure of our cross-correlation. When we magnify the image, the peak
value is located around 21. This is telling us that the variable shiftlocation is 21.
5 Goodwin & Green
Figure 3
0 20 40 60 80 100 120 140 160 180 200-250
-200
-150
-100
-50
0
50
100
150
200
This is a figure of the two signals with one of them shifted by the displacement
amount found by cross-correlating. This figure is a check to see if the signals will line up on top of each other.
6 Goodwin & Green
Plot of Displacement Image
0 200 400 600 800 1000 12000
10
20
30
40
50
60
This is a displacement plot of one column of tfu2.mat.
Plot of Strain Image
0 100 200 300 400 500 600 700 800 900 1000-1
-0.5
0
0.5
1
1.5
2
This is a plot of the strain. It is not a good picture because the strain is the
derivative of the displacement image. This means that it is the slope of the line. Slope equals rise over run. So as you can see in the displacement image that as the line goes up it levels out and our strain sees this and goes back to zero.
7 Goodwin & Green
Displacement Image
50 100 150 200 250
10
20
30
40
50
60
70
80
90
100
110
0
10
20
30
40
50
60
70
80
90
100
This is one of the better displacement images of tfu2.mat. This image shows the
compression of the tfu2. This image shows the displacement due to compression to be more or less in certain areas. The area from columns 150 to 225 shows an area of a hard compression. This can be determined from the uniform displacement seen in the circular region.
8 Goodwin & Green
Strain Image
50 100 150 200 250
100
200
300
400
500
600
700
800
900
1000
1100
0
0.5
1
1.5
2
2.5
3
3.5
4
This is our strain image. We get this when we take the derivative of our
displacement image. You can see that where it gets a lighter blue area it is showing a harder surface, thus showing that this area has something in it making it not compress so easily.
9 Goodwin & Green
Tufu1.m results
Figure 1
0 20 40 60 80 100 120 140 160 180 200-400
-300
-200
-100
0
100
200
300
400
This is a figure of (b_data000) and (b_data020).
Figure 2
-100 -80 -60 -40 -20 0 20 40 60 80 100-3
-2
-1
0
1
2
3
4
5x 10
6
This figure shows our cross-correlation. When we magnify the image, the peak value is located a little past zero.
Figure 3
10 Goodwin & Green
0 5 10 15 20 25 30 35 40-400
-300
-200
-100
0
100
200
300
400
This is a figure of the two signals with one of the signals shifted by the shift
displacement amount found by cross-correlation. This is a check to see if the signals will line up on top of each other. As you can see these signals do not line up on top of each
other. Our program was not compatible with tfu.
11 Goodwin & Green
Plot of Displacement
0 200 400 600 800 1000 12000
10
20
30
40
50
60
This is a displacement plot at one column of tfu1.mat.
Plot of Strain
0 100 200 300 400 500 600 700 800 900 1000-1
0
1
2
3
4
5
6
7
This is a plot of the strain. It is not a good picture because the strain is the
derivative of the displacement image. This means that it is the slope of the line. Slope equals rise over run. So as you can see in the displacement image that as the line goes up it levels out and our strain sees this and goes back to zero. As again as in tfu2, tfu1 does not produce a good derivative of the strain image.
12 Goodwin & Green
Displacement Image
50 100 150 200 250
10
20
30
40
50
60
70
80
90
100
110
0
10
20
30
40
50
60
70
80
90
100
This is the displacement image from tfu1. It is one of our better images.
Strain Image
50 100 150 200 250
100
200
300
400
500
600
700
800
900
1000
1100
0
0.5
1
1.5
2
2.5
3
3.5
4
This is the strain image. As you can see this strain image is not too good.
13 Goodwin & Green
ElasticitySimimages.mat
14 Goodwin & Green
ElasticitySimImages.mat results
Figure 1
0 20 40 60 80 100 120 140 160 180 200-6
-5
-4
-3
-2
-1
0
1
2
3
4
This is a figure of the variables (impost) and (impre) that we set to signals. The
signals show a displacement of maybe one if that. They seem to be right on top of each other. From where this picture of the figure is taken, I think this plot shows the beginning of the run of the program. At the beginning they start at the same time and then the start to separate.
Figure 2
-100 -80 -60 -40 -20 0 20 40 60 80 100-400
-300
-200
-100
0
100
200
300
400
This is a figure of our cross-correlation. When we magnify the image, the peak
value is located around 0, or maybe one.
15 Goodwin & Green
Figure 3
0 5 10 15 20 25 30 35 40-6
-5
-4
-3
-2
-1
0
1
2
3
4
This is a figure of the two signals with one of the signals shifted by the amount
found by cross-correlating. The figure is a check to see if the signals will line up on top of each other. As you can see they are not.
16 Goodwin & Green
Plot of Displacement Image
0 200 400 600 800 1000 12000
10
20
30
40
50
60
This is a plot of our displacement image at one column of elasticitySimImages.mat.
Plot of Strain Image
0 100 200 300 400 500 600 700 800 900 1000-1
-0.8
-0.6
-0.4
-0.2
0
0.2
0.4
0.6
0.8
1
This is the plot of our derivative of our displacement image, which is our strain image. As you can see it is not a good strain. From our displacement image the slope of the line is rise over run. As our plot of our displacement image rises, it levels out then goes higher and levels out again. So our derivative sees this going back to zero and our line goes up and down.
17 Goodwin & Green
Displacement Image
50 100 150 200 250
10
20
30
40
50
60
70
80
90 2
4
6
8
10
12
14
16
18
20
This is one of our pictures of our displacement image.
Strain Image
50 100 150 200 250
10
20
30
40
50
60
70
80
900.04
0.06
0.08
0.1
0.12
0.14
0.16
0.18
0.2
0.22
0.24
This is the strain of our displacement image.
18 Goodwin & Green
Matlab codes
1.) immagepractice.m 2.) elaasticitysimimagecode.m
19 Goodwin & Green
immagepractice.m
The following matlab code is what we used to run tfu2.mat and tfu1.mat in matlab. We are calling in our immagepractice.m showplots =0; for p = 1:256 % this for column 177. %columns 256 p for q =30:1200; %:378); %rowsq = 378 qrange = q:q+36; y =(b_data000(qrange,p)); %setting variable to signal y1 =(b_data015(qrange,p)); %setting variable to signal samplerate = 5; yup = resample(y,samplerate,1); y1up = resample(y1,samplerate,1); if (showplots) figure (1) clf plot(yup); %plotting both signals on to each other hold on plot (y1up,'g'); end maxlags = 20*samplerate; [c,lags] = xcorr(yup,y1up,maxlags); %give the shift and shift location of the two signals in question if (showplots) figure(2) clf plot(lags,c); end [maxcross, shiftlocation] = max(c);
20 Goodwin & Green
[shift(q,p)] = lags (shiftlocation); if shift(q,p) < shift(q-1,p)-10 shift(q,p) = shift(q-1,p); end if (showplots) figure(3) %want plot both signals with one of them shifted by the shift amount clf % this is a figure of two signals placed on top of each other % with one signal being shifted plot(1:37,y); hold on plot ([1:37]+shift(q,p),y1,'g'); end end end % for 30:10:1200; put a new say shiftcut = shift of the range where shift % is actually asigned % shiftcut = shiftcut = shift(30:10:1200,:) figure clf imagesc (shiftcut) figure windowSize = 25; average= filter(ones(1,windowSize)/windowSize,1,shift); imagesc (diff(average)) caxis([0 4]) colorbar
21 Goodwin & Green
ElasticitySimimages.mat
The following code was run with elasticitysimimages.mat. It is called our elasticitysimimagecode.m it mirrors our imagingpractice.m code with changes to the parameters.
% this is a code that is going to try to run some of the simulations from % the web site. showplots =0; for p = 1:256 %1:256 % this for column 177. %columns 256 p for q =30:970; %:378); %rowsq = 378 qrange = q:q+36; y =impost(p,qrange); %setting variable to signal y1 =(impre(qrange,p)); %setting variable to signal samplerate = 5; yup = resample(y,samplerate,1); y1up = resample(y1,samplerate,1); if (showplots) figure (1) clf plot(yup); %plotting both signals on to each other hold on plot (y1up,'g'); end maxlags = 20*samplerate; [c,lags] = xcorr(yup,y1up,maxlags); %give the shift and shift location of the two signals in question if (showplots) figure(2)
22 Goodwin & Green
clf plot(lags,c); end [maxcross, shiftlocation] = max(c); [shift(q,p)] = lags (shiftlocation); if shift(q,p) < shift(q-1,p)-10 shift(q,p) = shift(q-1,p); end if (showplots) figure(3) %want plot both signals with one of them shifted by the shift amount clf % this is a figure of two signals placed on top of each other % with one signal being shifted plot(1:37,y); hold on plot ([1:37]+shift(q,p),y1,'g'); end end end % for 30:10:1200; put a new say shiftcut = shift of the range where shift % is actually asigned % shiftcut = shiftcut = shift(30:10:970,:) figure clf imagesc (shiftcut) figure windowSize = 25; average= filter(ones(1,windowSize)/windowSize,1,shift); imagesc (diff(average)) %imagesc(diff(shiftcut)) %caxis([0 4]) colorbar
23 Goodwin & Green
Tfu2.mat results
1. The results did give us a good displacement image. 2. From the displacement image we were able to develop a derivative of our
displacement image to get a strain image. 3. Our strain image did show where the elasticity on the tfu2 was hard or soft. 4. There were a lot of blips in the picture which were due to the algorithm we
developed.
Tfu1.mat results
1. Too many blips and areas of distortion. 2. Our displacement image was showing a lot of blips. 3. Therefore our strain image was not able to see the hard or soft tissue. 4. This had to do with our code. We did not develop a filter to smooth out the blips.
ElasticitySimImage.mat results
1. Our displacement image was good. 2. From our color bar we were able to see where the compression of the object was
hard or soft. 3. Our strain image was also good. We can see that the elasticity of the object while
being compressed, as being hard or soft.
24 Goodwin & Green
Conclusion
1. Overall, the project was successful despite the fact the team had limited knowledge of matlab. 2. The code was the result of trail and error. With the help and suggestions of others, an algorithm was written. 3. Marginal results were achieved using the tfu1.mat and elesticitysimimage.mat. 4. Good results were produced from the tfu.2 mat. 5. Given more time, the use of different filters would have been used to clean up the blips while processing tfu1.mat and the elasticitysimimage .mat.
25 Goodwin & Green
Recommendations
1. To reduce on the errors in our code 2. To produce an algorithm that will have a program to filter out the blips. 3. To advance the algorithm to produce 3-D image in real time. 4. We really did not time our program, but it did take a log time to run, so somehow
we could find a way to speed up our time.
26 Goodwin & Green
References
The Radiology Information Resource for Patients (2008) General Ultrasound Imaging. RadiologyInfo. Retrieved on 121408 from http://www.radiologyinfo.org/en/info.cfm?pg=genus JEE 4980 Final Report George Michaels and Mary Watts spring of 2008. http://classes.engineering.wustl.edu/jee4980/