PICMUS challenge: simulation, resolution-distortion test

This example reads (or downloads if it cannot find the data locally) a dataset used in the PICMUS challenge and beamforms it with USTB's general beamformer. A 75 plane-wave sequence was simulated with Field II to estimate the beamforming method resolution and geometric distortion.

by Alfonso Rodriguez-Molares alfonso.r.molares@ntnu.no and Olivier Bernard olivier.bernard@insa-lyon.fr 26.05.2017

Contents

Checking if the file is in the local path, and downloading otherwise

We define the local path and the url where the data is stored

% data location
url='http://ustb.no/datasets/';      % if not found data will be downloaded from here
local_path = [ustb_path(),'/data/']; % location of example data in this computer
addpath(local_path);
filename='PICMUS_simulation_resolution_distortion.uff';

% check if the file is available in the local path & downloads otherwise
tools.download(filename, url, local_path);

Reading channel data

Now that the file is on the path we deine a UFF object to interact with it.

uff_file=uff(filename,'read');

This dataset should contain the following structures: * channel_data, * beamformed_data and, * scan

We can check it out with the index function

display=true;
content = uff_file.index('/',display);
UFF: Contents of PICMUS_simulation_resolution_distortion.uff at /
   - /beamformed_data: beamformed_data [uff.beamformed_data] size(1,1)
   - /channel_data: channel_data [uff.channel_data] size(1,1)
   - /scan: scan [uff.linear_scan] size(1,1)

This dataset should contain the following structures: * channel_data, * beamformed_data and, * scan

We can check it out with the index function

display=true;
content = uff_file.index('/',display);
UFF: Contents of PICMUS_simulation_resolution_distortion.uff at /
   - /beamformed_data: beamformed_data [uff.beamformed_data] size(1,1)
   - /channel_data: channel_data [uff.channel_data] size(1,1)
   - /scan: scan [uff.linear_scan] size(1,1)

Plotting beamformed_data

We can read the beamformed_data object and plot it

b_data=uff_file.read('/beamformed_data');
b_data.plot();
UFF: reading beamformed_data [uff.beamformed_data]
UFF: reading sequence [uff.wave]
UFF: reading sequence_0001 [uff.wave]
UFF: reading sequence_0002 [uff.wave]
UFF: reading sequence_0003 [uff.wave]
UFF: reading sequence_0004 [uff.wave]
UFF: reading sequence_0005 [uff.wave]
UFF: reading sequence_0006 [uff.wave]
UFF: reading sequence_0007 [uff.wave]
UFF: reading sequence_0008 [uff.wave]
UFF: reading sequence_0009 [uff.wave]
UFF: reading sequence_0010 [uff.wave]
UFF: reading sequence_0011 [uff.wave]
UFF: reading sequence_0012 [uff.wave]
UFF: reading sequence_0013 [uff.wave]
UFF: reading sequence_0014 [uff.wave]
UFF: reading sequence_0015 [uff.wave]
UFF: reading sequence_0016 [uff.wave]
UFF: reading sequence_0017 [uff.wave]
UFF: reading sequence_0018 [uff.wave]
UFF: reading sequence_0019 [uff.wave]
UFF: reading sequence_0020 [uff.wave]
UFF: reading sequence_0021 [uff.wave]
UFF: reading sequence_0022 [uff.wave]
UFF: reading sequence_0023 [uff.wave]
UFF: reading sequence_0024 [uff.wave]
UFF: reading sequence_0025 [uff.wave]
UFF: reading sequence_0026 [uff.wave]
UFF: reading sequence_0027 [uff.wave]
UFF: reading sequence_0028 [uff.wave]
UFF: reading sequence_0029 [uff.wave]
UFF: reading sequence_0030 [uff.wave]
UFF: reading sequence_0031 [uff.wave]
UFF: reading sequence_0032 [uff.wave]
UFF: reading sequence_0033 [uff.wave]
UFF: reading sequence_0034 [uff.wave]
UFF: reading sequence_0035 [uff.wave]
UFF: reading sequence_0036 [uff.wave]
UFF: reading sequence_0037 [uff.wave]
UFF: reading sequence_0038 [uff.wave]
UFF: reading sequence_0039 [uff.wave]
UFF: reading sequence_0040 [uff.wave]
UFF: reading sequence_0041 [uff.wave]
UFF: reading sequence_0042 [uff.wave]
UFF: reading sequence_0043 [uff.wave]
UFF: reading sequence_0044 [uff.wave]
UFF: reading sequence_0045 [uff.wave]
UFF: reading sequence_0046 [uff.wave]
UFF: reading sequence_0047 [uff.wave]
UFF: reading sequence_0048 [uff.wave]
UFF: reading sequence_0049 [uff.wave]
UFF: reading sequence_0050 [uff.wave]
UFF: reading sequence_0051 [uff.wave]
UFF: reading sequence_0052 [uff.wave]
UFF: reading sequence_0053 [uff.wave]
UFF: reading sequence_0054 [uff.wave]
UFF: reading sequence_0055 [uff.wave]
UFF: reading sequence_0056 [uff.wave]
UFF: reading sequence_0057 [uff.wave]
UFF: reading sequence_0058 [uff.wave]
UFF: reading sequence_0059 [uff.wave]
UFF: reading sequence_0060 [uff.wave]
UFF: reading sequence_0061 [uff.wave]
UFF: reading sequence_0062 [uff.wave]
UFF: reading sequence_0063 [uff.wave]
UFF: reading sequence_0064 [uff.wave]
UFF: reading sequence_0065 [uff.wave]
UFF: reading sequence_0066 [uff.wave]
UFF: reading sequence_0067 [uff.wave]
UFF: reading sequence_0068 [uff.wave]
UFF: reading sequence_0069 [uff.wave]
UFF: reading sequence_0070 [uff.wave]
UFF: reading sequence_0071 [uff.wave]
UFF: reading sequence_0072 [uff.wave]
UFF: reading sequence_0073 [uff.wave]
UFF: reading sequence_0074 [uff.wave]
UFF: reading sequence_0075 [uff.wave]

Loading channel data & scan

The file also contain channel_data and scan. We read it so we can replicate the beamformed image in the UFF file.

channel_data=uff_file.read('/channel_data');
scan=uff_file.read('/scan');
UFF: reading channel_data [uff.channel_data]
UFF: reading sequence [uff.wave]
UFF: reading sequence_0001 [uff.wave]
UFF: reading sequence_0002 [uff.wave]
UFF: reading sequence_0003 [uff.wave]
UFF: reading sequence_0004 [uff.wave]
UFF: reading sequence_0005 [uff.wave]
UFF: reading sequence_0006 [uff.wave]
UFF: reading sequence_0007 [uff.wave]
UFF: reading sequence_0008 [uff.wave]
UFF: reading sequence_0009 [uff.wave]
UFF: reading sequence_0010 [uff.wave]
UFF: reading sequence_0011 [uff.wave]
UFF: reading sequence_0012 [uff.wave]
UFF: reading sequence_0013 [uff.wave]
UFF: reading sequence_0014 [uff.wave]
UFF: reading sequence_0015 [uff.wave]
UFF: reading sequence_0016 [uff.wave]
UFF: reading sequence_0017 [uff.wave]
UFF: reading sequence_0018 [uff.wave]
UFF: reading sequence_0019 [uff.wave]
UFF: reading sequence_0020 [uff.wave]
UFF: reading sequence_0021 [uff.wave]
UFF: reading sequence_0022 [uff.wave]
UFF: reading sequence_0023 [uff.wave]
UFF: reading sequence_0024 [uff.wave]
UFF: reading sequence_0025 [uff.wave]
UFF: reading sequence_0026 [uff.wave]
UFF: reading sequence_0027 [uff.wave]
UFF: reading sequence_0028 [uff.wave]
UFF: reading sequence_0029 [uff.wave]
UFF: reading sequence_0030 [uff.wave]
UFF: reading sequence_0031 [uff.wave]
UFF: reading sequence_0032 [uff.wave]
UFF: reading sequence_0033 [uff.wave]
UFF: reading sequence_0034 [uff.wave]
UFF: reading sequence_0035 [uff.wave]
UFF: reading sequence_0036 [uff.wave]
UFF: reading sequence_0037 [uff.wave]
UFF: reading sequence_0038 [uff.wave]
UFF: reading sequence_0039 [uff.wave]
UFF: reading sequence_0040 [uff.wave]
UFF: reading sequence_0041 [uff.wave]
UFF: reading sequence_0042 [uff.wave]
UFF: reading sequence_0043 [uff.wave]
UFF: reading sequence_0044 [uff.wave]
UFF: reading sequence_0045 [uff.wave]
UFF: reading sequence_0046 [uff.wave]
UFF: reading sequence_0047 [uff.wave]
UFF: reading sequence_0048 [uff.wave]
UFF: reading sequence_0049 [uff.wave]
UFF: reading sequence_0050 [uff.wave]
UFF: reading sequence_0051 [uff.wave]
UFF: reading sequence_0052 [uff.wave]
UFF: reading sequence_0053 [uff.wave]
UFF: reading sequence_0054 [uff.wave]
UFF: reading sequence_0055 [uff.wave]
UFF: reading sequence_0056 [uff.wave]
UFF: reading sequence_0057 [uff.wave]
UFF: reading sequence_0058 [uff.wave]
UFF: reading sequence_0059 [uff.wave]
UFF: reading sequence_0060 [uff.wave]
UFF: reading sequence_0061 [uff.wave]
UFF: reading sequence_0062 [uff.wave]
UFF: reading sequence_0063 [uff.wave]
UFF: reading sequence_0064 [uff.wave]
UFF: reading sequence_0065 [uff.wave]
UFF: reading sequence_0066 [uff.wave]
UFF: reading sequence_0067 [uff.wave]
UFF: reading sequence_0068 [uff.wave]
UFF: reading sequence_0069 [uff.wave]
UFF: reading sequence_0070 [uff.wave]
UFF: reading sequence_0071 [uff.wave]
UFF: reading sequence_0072 [uff.wave]
UFF: reading sequence_0073 [uff.wave]
UFF: reading sequence_0074 [uff.wave]
UFF: reading sequence_0075 [uff.wave]

Beamforming

We define a beamformer, and the corresponding transmit and apodization windows, and launch it.

bmf=beamformer();
bmf.channel_data=channel_data;
bmf.scan=scan;

% receive apodization
bmf.receive_apodization.window=uff.window.tukey50;
bmf.receive_apodization.f_number=1.7;
bmf.receive_apodization.apex.distance=Inf;

% transmit apodization
bmf.transmit_apodization.window=uff.window.tukey50;
bmf.transmit_apodization.f_number=1.7;
bmf.transmit_apodization.apex.distance=Inf;

% launch beamforming
b_data_new=bmf.go({process.das_mex process.coherent_compounding});

Comparing results

We plot both images side by side.

figure;
b_data.plot(subplot(1,2,1),'Original');
b_data_new.plot(subplot(1,2,2),'New');