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 = 'https://www.creatis.insa-lyon.fr/EvaluationPlatform/picmus/dataset/';
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, ...
     '_transmission_',transmit_type,'nbPW_',nb_pw,'.hdf5'];
if (~exist([local_path,filename_dataset],'file'))
     tools.download(filename_dataset, url, local_path);
end
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'))
     tools.download(filename_scan, url, local_path);
end
scan_path = [local_path filename_scan];

Beamforming

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 = ...
     [picmus_path(),'/results/image_',signal_type,'_',pht_type,...
     '_firing_',scheme_firing,'nbPW_',nb_pw,'.hdf5'];

% 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();
image.read_file(image_path);
dynamic_range = 60; % dynamic range (dB) used for the display
image.show(dynamic_range); % 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.set_data_information(info);
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
metrics.evaluateSpeckleQuality();
metrics.evaluateGeometricalDistortion();
metrics.evaluateLinearIntensity();
metrics.evaluateContrast();
metrics.evaluateFWHM();
metrics.evaluateResolution();