-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSec82.m
More file actions
executable file
·45 lines (29 loc) · 828 Bytes
/
Sec82.m
File metadata and controls
executable file
·45 lines (29 loc) · 828 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
%%Written by Vlora Riberdy
clear all
%Load the mat file
ourdata = load('C:\Users\vlora\Documents\Overview of Medical Imaging\CT Lab- Group 2\Data\XrayObject.mat');
object = ourdata.Object;
p = ourdata.p;
%Display the image
imshow(object,[])
axis square
%Calculate the total image length in cm
d = length(object)*p;
%Create the Radon Transform and rescale it for our voxel dimensions
[R1,xp] = radon(object,0);
R1 = R1/(1/p);
%Correct position
p1 = d/length(xp);
p2 = xp*p1;
%plot the radon transform
figure
plot(p2, R1)
%Create the sinogram
theta = 0:179; %set the number f projections
S = radon(object, theta);
S = S/(1/p); %rescale sinogram data for our voxel dimensions
%Display the sinogram
figure
imshow(S,[],'XData', theta,'YData', p2)
axis square
axis on