Creatis- Univesity of Lyon || NTNU || Technical University of Denmark

Matlab toolbox

Evaluation framework
We provide in the PICMUS framework a matlab toolbox which allows the structuration of the code to make efficient the comparison of the performance of the different reconstruction methods from the same dataset. We provide hereunder some example of the use of the proposed library.
Getting the data

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

% data location
url = '';
local_path = [picmus_path(),'/data/']; % location of example data in this computer

% deal with dataset
pht_type = 'numerical'; % or 'in_vitro_type1', 'in_vitro_type2', 'in_vitro_type3';
signal_type = 'rf'; % or 'iq';
transmit_type = '1'; % compounding scheme for pw selection (see Procedure link);
nb_pw = '75'; % an odd value between 1 and 75;
filename_dataset = ['dataset_',signal_type,'_',pht_type, ...
if (~exist([local_path,filename_dataset],'file')), url, local_path);
dataset_path = [local_path filename_dataset];

% deal with the scanning region (grid from which to reconstruct the image)
filename_scan = 'scanning_region_picmus.hdf5';
if (~exist([local_path,filename_scan],'file')), url, local_path);
scan_path = [local_path filename_scan];


The standard DAS method has been implemented in the toolbox. The same code works both for IQ and RF data. We launch it in the example below.

% Path where to save reconstructed image
image_path = ...

% Reconstruct bmode image
fprintf(1,'Launching beamforming algorithm...........'); tic;
image = beamformer.das(scan_path,dataset_path,image_path);
fprintf(1,'done in %0.2fs\n',toc);

% Visualized beamformed image
image = us_image();
dynamic_range = 60; % dynamic range (dB) used for the display; % display reconstructed images

Evaluating the quality of the reconstructed images

The quality of the reconstructed images can be easily assess through the "us_picmus_metrics" class.

% Setup info structure
info = tools.generate_data_info_structure('numerical_phantom');

% If you work on the in_vitro_type1 data, you should set the following line
% info = tools.generate_data_info_structure('in_vitro_type1');

% If you work on the in_vitro_type2 data, you should set the following line
% info = tools.generate_data_info_structure('in_vitro_type2');

% If you work on the in_vitro_type3 data, you should set the following line
% info = tools.generate_data_info_structure('in_vitro_type3');

% Create picmus metric data object
metrics = us_picmus_metrics();
metrics.image = image;
metrics.scan = image.scan;
metrics.flagDisplay = 1; % Set this flag to 1 to display intermediate results
metrics.evaluate(); % This method launch all the metrics at once

% Each metric can be launched separately