-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathESF_LSF.m
91 lines (77 loc) · 3.51 KB
/
ESF_LSF.m
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% 2018 - Medical Imaging Project %
% MSc Biomedical Engineering - UPatras %
% Elissaios Petrai %
% petrai AT ceid.upatras.gr %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
function [] = ESF_LSF(Ifa, counterr, jjj, idd)
if idd == 1
%ESF Bone
figure('NumberTitle', 'off', 'name', 'ESF Bone')
x1 = [317.663776493256 391.652215799615];
y1 = [237.263005780347 237.263005780347];
improfile(Ifa, x1, y1)
title(sprintf('ESF Bone - Original Image'))
%LSF Bone
figure('NumberTitle', 'off', 'name', 'LSF Bone')
x = diff(improfile(Ifa, x1, y1));
plot(x)
title(sprintf('LSF Bone - Original Image'))
%ESF plastic water
figure('NumberTitle', 'off', 'name', 'ESF P.Water')
x2 = [349.232177263969 281.162813102119];
y2 = [281.162813102119 158.342003853565];
improfile(Ifa, x2, y2)
title(sprintf('ESF P. Water - Original Image'))
%LSF plastic water
figure('NumberTitle', 'off', 'name', 'LSF P. Water')
y = diff(improfile(Ifa, x2, y2));
plot(y)
title(sprintf('LSF P. Water - Original Image'))
elseif idd == 2
%ESF Bone
figure('NumberTitle', 'off', 'name', 'ESF Bone - Hanning filter')
x1 = [317.663776493256 391.652215799615];
y1 = [237.263005780347 237.263005780347];
improfile(Ifa, x1, y1)
title(sprintf('ESF Bone - Hanning 0.95 - Δr=%.2f - Δθ=%.2f', counterr, jjj))
%LSF Bone
figure('NumberTitle', 'off', 'name', 'LSF Bone - Hanning filter')
x = diff(improfile(Ifa, x1, y1));
plot(x)
title(sprintf('LSF Bone - Hanning 0.95 - Δr=%.2f - Δθ=%.2f', counterr, jjj))
%ESF plastic water
figure('NumberTitle', 'off', 'name', 'ESF P. Water - Hanning filter')
x2 = [349.232177263969 281.162813102119];
y2 = [281.162813102119 158.342003853565];
improfile(Ifa, x2, y2)
title(sprintf('ESF P. Water - Hanning 0.95 - Δr=%.2f - Δθ=%.2f', counterr, jjj))
%LSF plastic water
figure('NumberTitle', 'off', 'name', 'LSF P. Water - Hanning filter')
y = diff(improfile(Ifa, x2, y2));
plot(y)
title(sprintf('LSF P. Water - Hanning 0.95 - Δr=%.2f - Δθ=%.2f', counterr, jjj))
elseif idd == 3%for task 6. Hamming filter with cutoff 1, 0.9, 0.8 and for Δr=02, Δθ=1
%ESF Bone
figure('NumberTitle', 'off', 'name', 'ESF Bone - Hamming filter')
x1 = [317.663776493256 391.652215799615];
y1 = [237.263005780347 237.263005780347];
improfile(Ifa, x1, y1)
title(sprintf('ESF Bone - cutoff%.2f - Δr=0.2 - Δθ=1', jjj))
%LSF Bone
figure('NumberTitle', 'off', 'name', 'LSF Bone - Hamming filter')
x = diff(improfile(Ifa, x1, y1));
plot(x)
title(sprintf('LSF Bone - cutoff%.2f- Δr=0.2 - Δθ=1', jjj))
%ESF Plastic Water
figure('NumberTitle', 'off', 'name', 'ESF P.Water Hamming filter')
x2 = [349.232177263969 281.162813102119];
y2 = [281.162813102119 158.342003853565];
improfile(Ifa, x2, y2)
title(sprintf('ESF P. Water - cutoff%.2f - Δr=0.2 kai Δθ=1', jjj))
%LSF plastic water
figure('NumberTitle', 'off', 'name', 'LSF P.Water - Hamming filter')
y = diff(improfile(Ifa, x2, y2));
plot(y)
title(sprintf('LSF Plastic Water - cutoff %.2f - Δr=0.2 kai Δθ=1', jjj))
end