Optical CT scan

56
Optical CT scan School of Physics Dublin Institute of Technology Kevin Street, Dublin 8. Andrew O’Neill Dt260/3 Submission date 24/5/13 1 | Page

Transcript of Optical CT scan

Page 1: Optical CT scan

Optical CT scan

School of Physics

Dublin Institute of Technology

Kevin Street, Dublin 8.

Andrew O’NeillDt260/3

Submission date 24/5/13

Supervised by Dr Justin Donnelly

1 | P a g e

Page 2: Optical CT scan

Abstract

Computed Tomography or CT is used in a number of applications ranging from the medical sector to the industrial. The applications in the medical sector vary; it has been applied to multiple areas which include Ultrasonic imaging, Magnetic Resonance Imaging and Computed axial Tomography. In the Industrial sector it has been used in non-destructive testing and allows for imaging of nearly any object. CT is also useful in other areas like astronomy and archaeology.

In this project the student was to reconstruct a device made by previous student Barry Haycock. The apparatus consisted of a laser as the light source and a photodiode as the detector. The apparatus was built to show a student step by step how a CT works.

The Iteration method combined with the Radon and iRadon transforms were used in the reconstruction of an image. Using projections of a sample a 2D slice can be obtained of a 3D object.

2 | P a g e

Page 3: Optical CT scan

Acknowledgements

This project would not have been possible without the input and guidance from Dr Justin Donnelly.

I want to also thank Ciara O Hara for her help on the photodiode and Fran Pedreschi for showing me the offset on the DAQ.

Also I would like to thank Fergal Wallace, Philip Hilliard, Michelle Laycock, Paula McEntaggart, Darren Ryan Keogh and Craig Spence, for their support.

Finally I would like to thank Ali Doyle without whom none of this would have happened.

3 | P a g e

Page 4: Optical CT scan

Table of contents

Abstract 2 Acknowledgements 3 Table of Contents 4 Nomenclature 6

1. Introduction

1.1. Invention and creation of Computed tomography 7

1.2 Types of CT Systems 8

1.3 Reconstruction Methods 12

1.4 Limitation of CT 13

1.5 Future of CT 14

2. Theory

2.1 Analytic and Iterative Reconstruction Algorithm 15

2.2 Back Projection 16

2.3 Radon Transform 17

2.4 Inverse Radon 18

3. Apparatus

3.1 Design 19

3.2 Components 20

3.3 Reconstruction 22

3.4 Experimental setup 23

4. Matlab

4.1 Code implemented 24

4.2 Analysis of code 27

4.3National instruments data acquisition code 29

4 | P a g e

Page 5: Optical CT scan

5. Apparatus Analysis

5.1 Advantages/disadvantages of setup 30

5.2 Errors and issues 30

5.3 Future work 31

6. Results

6.1 Matlab code data output 32

6.2 iRadon image reconstructions 33

6.3 Radon transform data output 34

7. Discussion and Conclusions

7.1 Discussion 35

7.2 Conclusion 35

References 36

Appendix: Matlab code

(i) Reconstruction program 37(ii) National instruments program for photodiode 40

Appendix: Data sheets (i) Photodiode Data Sheet 41

(ii)NIDAQ Data sheet 42

(iii)Laser Data sheet 43

Appendix: Original project proposal 44

5 | P a g e

Page 6: Optical CT scan

Nomenclature

(CT) Computed Tomography, Computed Axial Tomography.

(NIDAQ) National Instruments Data Acquisition Card.

(Matlab) Text based computed language. Specifically used to aid solution and graphing of Logic problems.

(Iteration Reconstruction) Method of image reconstruction

(Matrix) A set a values arranged into column’s and rows stated by user

(MRI) Magnetic Resonance Imaging. A method for imaging tissue using magnetic fields.

(Photodiode) Absorbs light and emits a voltage high when there is more light and low when it is dark.

(Beam) The ray sum of the laser obtained by the photodiode

(Projection) Group of ray sums that constitute a sweep past the object at one angle

(Projection Angle) The angle of the projection being sampled

(RADON) Computes projections of an image matrix along specified directions

(IRADON) iradon uses the filtered back-projection algorithm to perform the inverse Radon transform.

(Backprojection) Method of image reconstruction

6 | P a g e

Page 7: Optical CT scan

1. Chapter 1 Introduction

1.1 Invention and development of Computed Tomography

Godfrey Hounsfield (1919-2004) Invented the CT. He came up with the Idea that one could determine what is inside a box/object by taking x-rays at all angles around the box/object. He constructed a computer that could take the input of the x-rays at various angles and create an image of the object in slices. In 1979 Hounsfield and Cormack were awarded the Nobel Prize in medicine for the invention of CT. Cormack invented the algorithm that complemented Hounsfield’s invention. Below is an image of the original design implemented by Hounsfield.

Fig 1.1 Original design of Hounsfield’s invention

As seen above in fig 1.1 there is a turntable in the centre were the object is placed an x-ray source is positioned at location (d) and the detector is at (f).

7 | P a g e

Page 8: Optical CT scan

1.2 Types of CT Systems

First Generation Systems

First generation Systems were the first type implemented as shown in chapter 1.1 Page 1 created by Hounsfield and the same one that was implement by Barry Haycock and reconstructed for this project. In devices of this type took 160 samples per rotation and 180 translations. This meant that there were just fewer than 30000 measurements per image.

Fig 2.2 1st Generation System. Systems of this type needed up to 5 minutes to get enough information for just one 2d slice The issue with this was when getting enough 2d information to create a 3d image which could take a few days depending on the detail necessary.

8 | P a g e

Page 9: Optical CT scan

Second Generation CT systems

A second generation CT system had a narrow fan beam the size of around 10 degrees. The machine consisted of multiple detectors and multiple angle acquisition at each position this meant it had a larger angle rotation however translation was still required. Even though it was faster than the 1st Generation it was still relatively slow at 20s per slice. Below is a image of a 2nd Generation System.

Fig 3.1 uses a fan beam emitted for incident radiation, along with two linear detector arrays.

9 | P a g e

Page 10: Optical CT scan

Third Generation Systems

Also uses a fan beam however it has a wider angle between 50 and 55 degrees. It has multiple rotating detectors ranging from (500-1000). The System was rotation only this mean that no translation is required as it’s the detectors that rotate around the object and not the object moving. This System is also much faster than previous generations, rotating as fast as 0.5s per rotation. This is the most common modern scanner design used in commercial applications. The main drawback to this design is that the detectors and the x-rays have to be in perfect sync if it’s off slightly then artefacts and errors can occur.

Fig 4.1 As stated above the source and detector have to be in perfect sync to decrease error.

10 | P a g e

Page 11: Optical CT scan

Fourth Generation systems

The Fourth generation uses a fan beam like previous generations. The difference in design between the 3rd and 4th generation is that there are static detectors all around the gantry and only the tube rotates. This is desirable because it avoids the artefact errors previous stated. The main limitation to this device is the scattering of x-ray which can also cause artefacts in the image. Below is an image of a fourth Generation System. Also this device used slip ring technology which allows for the mapping of a whole object by moving the detector in the z direction this method is faster and used in medicine to this day.

Fig 1.5 the detector is static and only the source moves which limits errors that were in previous generations

11 | P a g e

Page 12: Optical CT scan

1.3 Reconstruction Methods

Reconstruction in CT refers to a mathematical process that creates images from projections of x-ray data. This data is acquired by the methods previously stated in Introduction 1.2. Two major methods of reconstruction are analytical reconstruction and iterative reconstruction. Analytical reconstruction is based on filtered back projection; this is implemented in most CT designs because of the computational efficiency and stability.

Back projection

The basic theory is that the projections of the x-rays are summed together across the path they passed through. A full description will be shown in Chapter 2.

Iterative Reconstruction

Iterative reconstruction methods were successfully used in the early years of Ct, but the availability of large computational demands was a factor in different approaches that were implemented. However over the last few years resurgence in interest in the iterative method has been seen. This is because computers can now handle this data with speed this is because of quad core technology which can divide the work load over many cores and reduce the heavy computational component seen in iterative reconstruction. As stated previously a more in depth look at this approach will be seen in chapter 2.

12 | P a g e

Page 13: Optical CT scan

1.4 Limitations of CT

The limits of CT are becoming smaller as advances in technology improve however there are still draw backs to this device. One of major draw backs is the issue with portability the machine is very large and cumbersome and has to be in a centred location. Also an object or patient has to immobile during the scan to prevent any artefacts during scans.

Also it is difficult to monitor and to attend the patient at the same time which in turn requires specific equipment and staff. Also if a patient is to large then they cannot be scanned not because the x-ray wont penetrate them but because the machine can’t fit them.

A primary limitation of CT scanning is resolution, approximately 1 centimetre. A cancer smaller than this cannot be easily detected using Computed Tomography.

Also the level of radiation received during a CT scan is modest. Also an allergic reaction can occur with the contrast dye however this is rare less than 1% of patients develop symptoms. CT scans are very expensive ranging from €2500 for abdomen to €4000 for a pelvic scan. Soft- tissue details in areas like the brain and joints can be better evaluated with magnetic resonance imaging. In pregnant women while CT can be performed safely it is not recommended because a foetus can be very sensitive to x-ray. Also if a woman is pregnant and does proceed with the scan she will be instructed not to breast feed as the intravenous dye could harm the new born child.

Even though there are a lot of drawbacks the benefits out way the limits it can detect 9 out of ten liver cancers and is heavily relied on in the medical industry as a primary diagnostic tool.

13 | P a g e

Page 14: Optical CT scan

1.5 Future of Computed Tomography

The future of CT lies with reducing the radiation dose significantly and collimating the beam to the intended volume of interest as opposed to a large sweep of the body which impacts image quality. Also faster CT scans are becoming the normal with over 256 slices per rotation. Another progress in CT is the compensation for movement in the patient which will further increase resolution and diagnostic capabilities. Also the resolution of computed tomography is always increasing. Sub millimetre resolution is highly desired in CT; however this comes at a cost of a higher radiation dose. In small animal imaging it is possible to do a full body scan at 180um resolution in under a minute this uses a cone beam orientation.

Developments of portable x-ray sources using carbon nanostructures as field-emission electron sources generate x-rays whenever required because it does not have a heater of a filament and doesn’t require preheating making it more cost effective. The source will be able to produce more than 300 high definition X-ray transmission images using just two AA batteries. Also the x-ray source can be inspected immediately as there is no preheating. Also the speed in which images will be realised will be up to 1/1000 images per second. Because of such a low demand of power in theory the device will be able to run via usb on a computer which will also increase processing time as well as being cost effective as well.

14 | P a g e

Page 15: Optical CT scan

Chapter 2 Theory

2.1 Analytic and Iterative Reconstruction Algorithm

fig 2.1 a diagram of the algorithm that computes the values of pixels in a matrix given the ray sums.

How algorithm works is to find values of 4 pixels given values in 6 ray sums. Difference between estimated and measured projections is computed and divided by number of pixels in a given direction. The result of this is then added to the current estimate. The first step (c) project initial estimate in vertical direction apply algorithm and update the pixel values. Repeat this for the next set of angles and a solution will be found when iteration is completed. However when there are more pixels then more iteration’s are required. This is the algorithm that was implemented in this experiment because it is simple to understand and easy to implement.

15 | P a g e

Page 16: Optical CT scan

2.2 Back projection

Back projection works by summing the attenuation of any ray-path to the pixels that it passes through. Each pixel has added to its value the value of the attenuation that occurred to each ray that passed through it. This means that the pixels that contain a dense object will develop higher values. The main drawback to this method is the star formation that is all about the object in the image this is especially prevalent in the project as only four different projections were used. The more projections, the less this starring becomes apparent. This is due to the way the image reconstructs, the fact that a very dense object anywhere in a sample causes the increase in each pixel that share a ray path in any projection. This blurring is known a kernal blurring. Kernal blurring is a mathematical function that becomes added to all the pixels around the dense object (kind of like a set of weights added to the values). The kernal is a radially symmetrical function 1/r where r is the distance from the most dense point.To fix the Kernal blurring a convolution filter is added to the algorithm. The filter is basically just another Kernal that is comprised of a set of numbers to be summed or multiplied by the value of certain pixels.

Fig 2.2 Back projection reconstructs image by taking each view and smearing it along the path it was originally acquired. The resulting image is a blurry version of the correct image.

16 | P a g e

Page 17: Optical CT scan

2.3 Radon Transform

The radon function computes projections of an image matrix along specified directions. A projection of a two-dimensional function f(x, y) is a set of line integrals. The radon function computes the line integrals from beams in a certain direction. The beams are spaced 1 pixel unit apart. To represent an image the radon takes multiple, parallel-beam projections of the image at different angles by rotating the source and translating it in the x, y direction. The figure below demonstrates this.

fig 2.3

Where Theta is the rotation angle, x is the source and, y is the detector .

The Radon Transform can be defined by

(1)(2)

Where p is the slope and is its intercept. The resulting image of this is a sinusoidal wave of said image. To reconstruct this back into the original then the inverse radon will need to be implemented.

17 | P a g e

Page 18: Optical CT scan

2.4 Inverse Radon Transform

The inverse Radon transform or iradon reconstructs the image form projection data in a two dimensional array. In matlab the algorithm for this is I=iradon(R, Theta) were the image is I ,R is the two dimensional array and theta is the set of angles in degrees. Iradon reconstructs an image from parallel beam projections like the radon transform however it uses the projects previously calculated by radon to reconstruct an image. The reconstruction is basically filtered back projection however unlike filtered back projection it can use the original radon transform projection data and reconstruct an image. Below is an example using radon and iradon

P = phantom(128); R = radon(P,0:179); I = iradon(R,0:179) ;imshow(P) figure, imshow(I)

fig 2.4 Phantom after reconstruction

Fig 2.5 Phantom before reconstruction

P=phantom(128) this sets what the image is and its size. R = radon(P,0:179) this tells the radon to scan from 0 degrees to 179 I = iradon(R,0:179); takes the projection data R from the radon in the previous line and reconstructs image imshow(P) gives a visual representation of Phantom then imshow (I) shows the iradon’s reconstructed image.

18 | P a g e

Page 19: Optical CT scan

Chapter 3 Apparatus

Design setup 3.1

The design consists of a laser that is fixed to a retort stand that is directed toward a photodiode between this is a turntable that can be adjusted in the x, y direction and also rotated 360 degrees. It has to be able to move in the x, y direction because there is only one beam so being able to adjust the x and y allows for multiple beams to be used. This is controlled manually by the user which brings about a lot of error. Originally the design had a program that set the x, y plotter automatically however this was outdated and unusable. The solution to this issue will be discussed in chapter 3.3. The photodiode absorbs light and gives a voltage output. The output of the photodiode is connected to the X, Y plotter then in turn connected to the National Instruments Data Acquisition Card. This card along with a program in Matlab obtains this voltage data. The data is then manually entered into the iteration program as beams. The program will be described in chapter 4.

19 | P a g e

Page 20: Optical CT scan

Fig 3.1

3.2 Components of apparatus

TSLR250R Light to Voltage Optical Sensors (Photodiode)

Fig 3.2(Photodiode) full data sheet can be found in appendix

20 | P a g e

Page 21: Optical CT scan

Hewlett Packard 7015b X, Y Plotter

Fig 3.3 (X,Y Plotter) full data sheet can be found in appendix

National instruments DAQ usb6009

21 | P a g e

Page 22: Optical CT scan

Fig 3.4 (Data Acquisition card ) See Appendix for details

Fig3.5 Pasco Basic Optics Diode Laser

3.3 Reconstruction

The original machine was very outdated being ten years since anybody had used it the task was to reconstruct the old machine and the reprogram it using matlab instead of Labview which was previously implemented. The first stage was to check the photodiode and laser. Both were non-operational and needed to be replaced. Also after taking off the cover to the x, y plotter it was realized that the original Data Acquisition card was unusable because it was outdated and broken. Fixing this issue required cutting out the old holder for the card and connecting a new Data acquisition card however this was problematic as

22 | P a g e

Page 23: Optical CT scan

the old Photodiode was found to be non-operational. Solving this issue involved getting a new photodiode that had a portable power supply because the national instruments device hadn’t a sufficient enough power source. The output of the photodiode was connected to AI0 channel in the DAQ card. This allowed the card to read voltages from the photodiode. The photodiode had a large aperture that was allowing a lot of background light, tape was used to block out most of the light and make the aperture smaller. When in darkness the photodiode read 20mV and when saturated with light it could reach as high as 3.7V this was a solid range to work with when scanning an object. The laser was also found to be broken this was replaced by a similar laser that also had an external power supply. The x, y plotter also had its own power supply making the setup very cumbersome. The national instruments DAQ was powered via usb which also help with obtaining the data from the Optical CT. The turntable connected to the x, y plotter was set in increments of 4 degrees. A protractor was used to get the projection angles that were to be used, these angles were 0 45 90 and 135 degrees.

A piece of copper was placed on top of the turntable because there was a screw that unbalanced any object that was placed. The last part of the reconstruction was to get a phantom image to scan. It was found that three pieces of clear tape one denser than the other would be an ideal candidate to scan as it would show all the density’s easily in a small set of pixels. On the next page is an image of the reconstructed CT scanner.

3.4 Experimental Setup

23 | P a g e

Page 24: Optical CT scan

Fig 3.6 This is the experiential setup of the CT scan.

Chapter 4 Matlab

4.1 Code Implemented

clear clc disp('Andrew O Neill Project Year 3 Dt260/3')disp('Optical CT scan Code ')pause on

24 | P a g e

Page 25: Optical CT scan

pause(6)pause querypause off

%Enter voltage values from Photodiode Beam1 = 3.6879*25;Beam2 = 3.58*25;Beam3 = 2.392*25;Beam4 = 3.366*25;Beam5 = 3.505*25;Beam6 = 2.856*25;Beam7 = 3.687*25;Beam8 = 3.658*25;Beam9 = 2.413*25;Beam10 =3.457*25;Beam11 =2.540*25;Beam12= 0;

Raysum1=Beam1/3;Raysum2=(Beam1/3)+(Beam2/3)+(Beam3/3);Raysum3=Beam3/3;Difference1=Beam4-Raysum1;Difference2=Beam5-Raysum2;Difference3=Beam6-Raysum3;Pixdif1=Difference1/1;Pixdif2=Difference2/3;Pixdif3=Difference3/1;

Pix1=(Beam1/3)+(Pixdif2);Pix2=Beam1/3;Pix3=Pixdif1;Pix4=Beam2/3;Pix5=Beam2/3+Pixdif2;Pix6=Beam2/3;Pix7=Pixdif3;

25 | P a g e

Page 26: Optical CT scan

Pix8=Beam3/3;Pix9=Beam3/3+Pixdif2;

Raysum4=Pix3+Pix6+Pix9;Raysum5=Pix2+Pix5+Pix8;Raysum6=Pix1+Pix4+Pix7; Difference4=Beam7-Raysum4;Difference5=Beam8-Raysum5;Difference6=Beam9-Raysum6;Pixdif4=Difference4/3;Pixdif5=Difference5/3;Pixdif6=Difference6/3;

Pix10=Pix1+Pixdif6;Pix11=Pix2+Pixdif5;Pix12=Pix3+Pixdif4;Pix13=Pix4+Pixdif6;Pix14=Pix5+Pixdif5;Pix15=Pix6+Pixdif4;Pix16=Pix7+Pixdif6;Pix17=Pix8+Pixdif5;Pix18=Pix9+Pixdif4; Raysum7=Pix18;Raysum8=Pix12+Pix14+Pix16;Raysum9=Pix10;Difference7=Beam10-Raysum7;Difference8=Beam11-Raysum8;Difference9=Beam12-Raysum9;Pixdif7=Difference7;Pixdif8=Difference8/3;Pixdif9=Difference9;

Pix19=Pix10+Pixdif9;Pix20=Pix11;Pix21=Pix12+Pixdif8;Pix22=Pix13;Pix23=Pix14+Pixdif8;

26 | P a g e

Page 27: Optical CT scan

Pix24=Pix15;Pix25=Pix16+Pixdif8;Pix26=Pix17;Pix27=Pix18+Pixdif7; Density=[Pix19 Pix20 Pix21;Pix22 Pix23 Pix24;Pix25 Pix26 Pix27]; R = radon(Density, 0:179); theta = R(:,179); I = iradon( [theta theta], [1 1] )/2; imshow(I, []) for i = 1:179 %increments the angle theta = R(:,i); %filters the original R value by above loop

I = I + iradon( [theta theta], [i i] )/2;%as above this is filtering the iradon to give a cleaner value figure(1)% displays with the original iradon to view filtration

imagesc(I) %displays the filter in process around the phantom colormap(jet) end display(I)

4.2 Analysis of code

The code starts by clearing any previous variables or data then it clears the command window using the code clc. Then the title of the project is displayed along with the name of the creator. This is then paused for six seconds and then the program resumes. Beams 1:12 represent for projection angles for example beam 1:3 is for the 0 degree angle then 4:6 is the 45 degree and so 7:9 is 90 degrees and finally 10:12 is 135 degrees. The program creates a 3X3 matrix each coordinate in this matrix is a pixel. Each pixel will have a different colour depending on the density of the object that has been scanned; also the

27 | P a g e

Page 28: Optical CT scan

beams that have been obtained via the national instruments DAQ determine what the density will be in each pixel. After the beam values have been entered then the beams will be entered as ray sums to split the beam into each pixel. The word ray sum in the program is arbitrary the beam values themselves are the actual ray sums. The difference between beams and the ray sum values are taken this difference is then added on to each pixel in the next set of beams this repeats itself until the end of the program were the last set of pixel values are put into an array and shown as an image. The radon transform in this program is unnecessary however it gives the user a better idea of what the program is doing. The radon transform is taking the image that was just created and taking it back to its beams this is then reconstructed by the iradon which uses filtered backprojection to reconstruct the image. It was done at the end because weeks were spent on the radon transform adding it to the program just improved the visual experience for the user as well as showing the radon and iradon in use.

4.3 The National Instruments data acquisition code

ai = analoginput('nidaq','Dev1');addchannel(ai,0);

set(ai,'SampleRate',1000)set(ai,'SamplesPerTrigger',5)start(ai)wait(ai,2)

28 | P a g e

Page 29: Optical CT scan

data = getdata(ai);data+1.4301

plot(data)Beam=ans-3.713endenddisplay(Beam)

delete(ai)clear ai

4.4 Analysis of NIDAQ code

The Data Acquisition code begins by stating what the device is and the channel the device is located. The channel is added that the Photodiode is connected to. Then after this a sample rate of 1000 is set this means it’s going to be a 1000 samples per second, the next line states how many samples does the user want in this case 5 samples will be taken from the photodiode. The program then activates the channel the wait is there so the computer can obtain the data. Data is then taken from the channel ai. It

29 | P a g e

Page 30: Optical CT scan

was found that the device had an offset voltage of -1.4301 this had to be added on to get the true values for the voltages. The data is then plotted this is not necessary however it allows the user to see if the photodiode is responding correctly. As stated previously the photodiode when in darkness had a voltage of 20mV and in saturated light Voltage up to 3.713V. This had to be reversed because the pixels in matlab display colours of only large numbers if the density on the voltage is larger in bright conditions this meant that when viewing the density that all the colours were the opposite. The transparent materials would have large densities and the solid material would have little to no density. Reversing the Photodiode fixed this issue and displayed good results. The value of this beam is then entered into the Iteration program for reconstruction.

Chapter 5 Analysis of apparatus

5.1 Advantages and disadvantages of apparatus

Advantages of apparatus, the DAQ that was installed which has a usb which increased data speed and performance. Also because the detector and the laser had to be replaced this meant that the machine was nearly entirely up to date. The code that was used for both data acquisition and reconstruction was very quick and efficient which meant large amounts of data could be processed at a time.

30 | P a g e

Page 31: Optical CT scan

Disadvantages of the apparatus, the x, y plotter had to be used manually which meant that the error would be higher and artefacts in the images would be prevalent. The laser the Photodiode and the x, y plotter was all externally powered which made the device very large. The National Instruments Data Acquisition Card could only power up to 200mA which meant that it was incompatible with powering the 350mA laser and photodiode. Another disadvantage was that matlab was prone to crashing; this may have just been the computer that I was using though.

5.2 Errors

As stated the x, y plotter had to manually translate which meant that the projections that were acquired had a margin of error. Another error issue was the offset of the DAQ card this had to be read from a multimeter which itself had an error of +-0.05. The photodiode had to be reversed in the program as stated previously this was calculated by connecting the photodiode to the multimeter and then to the DAQ and read to the computer. This issue with this was that the multimeter was constantly varying when the photodiode was covered and put into darkness so an average reading was taken from 5 samples. The reading was 20mV +- 5mV which is a larger than wanted error.

5.3 Future work

The apparatus has to get a DAQ card that can support both the laser and the photodiode, this would make the system more compact and easier to use. Also in the program more pixels can be added. This can be done by following the pattern in the program and applying extra beams and pixels. Another improvement would be if a student could write code to make the x, y plotter automatic this would dramatically decrease error. Also to create a 3D image a z direction would need to be added this could be done by adding two vertical x, y plotters one attached to the laser and the other to the photodiode. Both would have to be in sync

31 | P a g e

Page 32: Optical CT scan

together. Finally if this set up was accomplished then multiple lasers and detectors could be added to create even more detail.

Chapter 6 Results

6.1 Matlab code data output

Andrew O Neill Project Year 3 Dt260/3

Optical CT scan Code

ans =

32 | P a g e

Page 33: Optical CT scan

on

Density =

0 33.5910 30.9686

11.8057 17.0797 25.3719

15.4517 22.7919 86.4250

This is the density that’s reconstructed in the iteration program. What is seen here is the different densities of the cello tape that were used on the left hand side reading vertical so 0, 11.8057 and 15.4517 these represent a piece of cello tape that is just one strip so most of the laser passes through each time the reason for the two higher numbers is because at an angle of 90 degrees the tape is in line with the other pieces of tape with larger densities. Obviously the next set of data beside this is a thicker piece of tape and finally at the end a tape that blocks a lot of light this was very successful as it showed that the program was working as needed.

6.2 iradon image reconstructions

33 | P a g e

Page 34: Optical CT scan

fig 6.1 each pixel represents a density

Density =

0 33.5910 30.9686

11.8057 17.0797 25.3719

15.4517 22.7919 86.4250

Each number here represents a pixel in the above image the number 0 being location 1,1 and the number 33.5910 being location 1,2 and finally 30.9686 being 1,3 this is then repeated in the next 2 rows were 1 is changed to 2 and then 2 is changed to 3 in the final row.

6.3 Radon transform data output

34 | P a g e

Page 35: Optical CT scan

Below is the data output for the R value for 0, 45, 90 and 135 degrees in the Radon transform.

0 degrees 45 degrees 90 degrees 135 degrees

0 0 0 0

3.4072 6.8863 14.9524 36.5288

29.6259 41.0411 100.1689 88.8353

76.3498 113.0972 64.7085 81.0968

116.2569 68.7734 55.3217 36.3361

17.8457 13.6874 8.3340 0.6884

0 0 0 0

What are seen above are 7 beams in descending order each value is the ray sum of each pixel at that current projection angle. These values are then put into the Inverse Radon Transform algorithm which then reconstructs it into an image. This was not necessary in this program as stated in the Theory chapter however using the radon transform was for the students understanding of how CT reconstruction works. The program works just on the iteration method the only use for the radon transform in this program was for visual representation of the data. Also a lot of time was spent trying to use the radon transform. However there was an issue in understanding why at every angle did the beam split the centre pixel from a 100% to 75% its original value then split the 25% between the two opposing beams. Research into this found that if the beam hit the border of the pixel then it would split between the two others however a reason for why this would be of benefit was not found.

Chapter 7 Discussion and Conclusion

35 | P a g e

Page 36: Optical CT scan

7.1 Discussion

There are many ways to create a CT scan in this project the Hounsfield approach was taken. This project was difficult because the CT scan machine that was previously built wasn’t in running order and had to be restored to original functionality. Also the code to reconstruct an image had to be created this took a lot of time because understanding how the mathematics of CT scanning took a while to comprehend. If there was more time allocated then the pixels could have been expanded and more beams introduced.

7.2 Conclusion

The brief was to create a CT scanner and reconstruct an image. The machine was built and a phantom object was scanned and it was reconstructed. Even though the image is very crude it still meets the brief that was proposed. Overall the project was a success however the CT scan could be improved dramatically if more time had been given. The program created and machine made are not very understandable at first glance. This write up should be read before the machine and code is used.

References

36 | P a g e

Page 37: Optical CT scan

[1] Timothy G Feeman ‘’ Mathematics of medical Imaging a beginners guide ’’ Sumat 2009

[2] Paul Suetens ‘’ Fundmentals of Medical Imaging ‘’ Second edition 2009

[3] Barry Haycock ‘’ CT scan’’ 2007

[4] Mathworks documentation centre.

http://www.mathworks.co.uk/help/images/ref/iradon.html

[5]Wolfram MathWorld

http://mathworld.wolfram.com/RadonTransform.html

[6]Mathworks Documentation centre

http://mathworld.wolfram.com/RadonTransform.html

[7] Science direct

http://www.sciencedirect.com/science/article/pii/S016890021100461X

Appendix: Matlab reconstruction code

37 | P a g e

Page 38: Optical CT scan

clear clc disp('Andrew O Neill Project Year 3 Dt260/3')disp('Optical CT scan Code ')pause onpause(6)pause querypause off

%Enter voltage values from Photodiode Beam1 = 3.6879*25;Beam2 = 3.58*25;Beam3 = 2.392*25;Beam4 = 3.366*25;Beam5 = 3.505*25;Beam6 = 2.856*25;Beam7 = 3.687*25;Beam8 = 3.658*25;Beam9 = 2.413*25;Beam10 =3.457*25;Beam11 =2.540*25;Beam12= 0;

Raysum1=Beam1/3;Raysum2=(Beam1/3)+(Beam2/3)+(Beam3/3);Raysum3=Beam3/3;Difference1=Beam4-Raysum1;Difference2=Beam5-Raysum2;Difference3=Beam6-Raysum3;Pixdif1=Difference1/1;Pixdif2=Difference2/3;Pixdif3=Difference3/1;

38 | P a g e

Page 39: Optical CT scan

Pix1=(Beam1/3)+(Pixdif2);Pix2=Beam1/3;Pix3=Pixdif1;Pix4=Beam2/3;Pix5=Beam2/3+Pixdif2;Pix6=Beam2/3;Pix7=Pixdif3;Pix8=Beam3/3;Pix9=Beam3/3+Pixdif2;

Raysum4=Pix3+Pix6+Pix9;Raysum5=Pix2+Pix5+Pix8;Raysum6=Pix1+Pix4+Pix7; Difference4=Beam7-Raysum4;Difference5=Beam8-Raysum5;Difference6=Beam9-Raysum6;Pixdif4=Difference4/3;Pixdif5=Difference5/3;Pixdif6=Difference6/3;

Pix10=Pix1+Pixdif6;Pix11=Pix2+Pixdif5;Pix12=Pix3+Pixdif4;Pix13=Pix4+Pixdif6;Pix14=Pix5+Pixdif5;Pix15=Pix6+Pixdif4;Pix16=Pix7+Pixdif6;Pix17=Pix8+Pixdif5;Pix18=Pix9+Pixdif4; Raysum7=Pix18;Raysum8=Pix12+Pix14+Pix16;Raysum9=Pix10;Difference7=Beam10-Raysum7;Difference8=Beam11-Raysum8;Difference9=Beam12-Raysum9;Pixdif7=Difference7;Pixdif8=Difference8/3;Pixdif9=Difference9;

39 | P a g e

Page 40: Optical CT scan

Pix19=Pix10+Pixdif9;Pix20=Pix11;Pix21=Pix12+Pixdif8;Pix22=Pix13;Pix23=Pix14+Pixdif8;Pix24=Pix15;Pix25=Pix16+Pixdif8;Pix26=Pix17;Pix27=Pix18+Pixdif7; Density=[Pix19 Pix20 Pix21;Pix22 Pix23 Pix24;Pix25 Pix26 Pix27]; R = radon(Density, 0:179); theta = R(:,179); I = iradon( [theta theta], [1 1] )/2; imshow(I, []) for i = 1:179 %increments the angle theta = R(:,i); %filters the original R value by above loop

I = I + iradon( [theta theta], [i i] )/2;%as above this is filtering the iradon to give a cleaner value figure(1)% displays with the original iradon to view filtration

imagesc(I) %displays the filter in process around the phantom colormap(jet) end display(I)

Appendix: National Instruments data acquisition code for matlab

40 | P a g e

Page 41: Optical CT scan

ai = analoginput('nidaq','Dev1');addchannel(ai,0);

set(ai,'SampleRate',1000)set(ai,'SamplesPerTrigger',5)start(ai)wait(ai,2)

data = getdata(ai);data+1.4301

plot(data)Beam=ans-3.713endenddisplay(Beam)

delete(ai)clear ai

Appendix: Photodiode data sheet

41 | P a g e

Page 42: Optical CT scan

Appendix: National Instruments 6009 DAQ

42 | P a g e

Page 43: Optical CT scan

Appendix: Laser data sheet

43 | P a g e

Page 44: Optical CT scan

Appendix: Originally proposed project

44 | P a g e

Page 45: Optical CT scan

45 | P a g e

Page 46: Optical CT scan

As well as providing soft-tissue images of very high contrast, the digital nature of its image generation process allows for quantitative assessment and evaluation of CAT images. The standard method of reconstructing CAT scans is the algebraic reconstruction technique (ART) and integral transform (IT) techniques. Another approach is to use neural networks in which distributed data are used with recursion to “settle” on a reconstructed image. This project will involve:

- Developing an optical CAT scan system involving a laser and photodiode.

- Developing a physical phantom for optical CAT scanning,

RESOURCES/EQUIPMENT: (PLEASE INDICATE WHICH ITEAMS ARE CURRENTLY AVAILABLE AND WHICH NEED TO BE AQUIRED/PURCHASED) - Laser pointer, photodiode, turntable, x-y plotter.

- Access to a pc and MATLAB / C compiler (available)

MILESTONES: (PLEASE INDICATE AT LEAST 5 MILESTONES TO BE REACHED BY THE STUDENT IN THE COURSE OF THE PROJECT) 1) Construction of apparatus (turntable, laser, photodiode)

2) Interface with computer software via MATLAB.

3) Creation of a physical phantom,

4) Scanning the phantom.

5) Reconstructing the phantom image.

DELIVERABLES: - Optical CAT scan apparatus.

- Phantom objects.

- A CAT scan image reconstructed from the physically-gathered data

46 | P a g e