-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
example.m
72 lines (62 loc) · 3.08 KB
/
example.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
% exemplary application of
% the filtered backpropagation (FBP) for
% steered plane waves and
% the two-dimensional space
%
% -------------------------------------------------------------------------
% REFERENCES:
% -------------------------------------------------------------------------
% [1] M. F. Schiffner and G. Schmitz, “Plane wave pulse-echo ultrasound diffraction tomography with a fixed linear transducer array,” in
% Acoust. Imaging, ser. Acoust. Imaging, A. Nowicki, J. Litniewski, and T. Kujawska, Eds., vol. 31, Springer Netherlands, 2012, pp. 19–30.
% DOI : <a href="matlab:web('https://dx.doi.org/10.1007/978-94-007-2619-2_3')">10.1007/978-94-007-2619-2_3</a>
% [2] A. J. Devaney, “A filtered backpropagation algorithm for diffraction tomography,”
% Ultrasonic Imaging, vol. 4, no. 4, pp. 336–350, Oct. 1982.
% DOI : <a href="matlab:web('https://dx.doi.org/10.1016/0161-7346(82)90017-7')">10.1016/0161-7346(82)90017-7</a>
%
% -------------------------------------------------------------------------
% ABOUT:
% -------------------------------------------------------------------------
% author: Martin F. Schiffner
% date: 2023-05-03
% modified: 2023-06-21
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% clear workspace
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
close all;
clear;
clc;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% 0.) parameters
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% load RF data acquired from tissue phantom
load( 'data_RF.mat' );
% bandwidth
f_bounds = [ 2.25, 6.75 ] * 1e6;
% dependent parameters
positions_z = ( 64 + (0:511) ) * element_pitch / 4;
% dynamic range for illustration
dynamic_range_dB = 60;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% 1.) beamform RF data and show results
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% call filtered backpropagation (FBP)
[ image_compound, images_single, positions_x ] = fbp_pw( element_pitch, positions_z, data_RF, f_s, theta_incident, c_avg, f_bounds );
%--------------------------------------------------------------------------
% 1.) show results
%--------------------------------------------------------------------------
c_limits = [ -dynamic_range_dB, 0 ];
figure( 1 );
for index_theta = 1:numel( theta_incident )
subplot( 1, numel( theta_incident ), index_theta );
imagesc( positions_x * 1e3, positions_z * 1e3, 20 * log10( abs( images_single( :, :, index_theta ) ) / max( max( abs( images_single( :, :, index_theta ) ) ) ) ), c_limits );
title( sprintf( 'Steering angle: %.1f°', rad2deg( theta_incident( index_theta ) ) ) );
xlabel( 'Lateral position (mm)' );
ylabel( 'Axial position (mm)' );
colormap gray;
end
figure( 2 );
imagesc( positions_x * 1e3, positions_z * 1e3, 20 * log10( abs( image_compound ) / max( abs( image_compound( : ) ) ) ), c_limits );
title( 'Coherent compounding' );
xlabel( 'Lateral position (mm)' );
ylabel( 'Axial position (mm)' );
colormap gray;