k-Wave Toolbox |

## Image Reconstruction With Directional Sensors Example

On this page…
Overview Running the simulation Time-reversal image reconstruction

### Overview

This example demonstrates how the directionality of sensor elements can give rise to artefacts in time reversal photoacoustic image reconstruction. It builds on the Sensor Element Directivity in 2D and 2D Time Reversal Reconstruction For A Line Sensor examples.

- open the file in the MATLAB Editor
- run the file in MATLAB

For a more detailed discussion of this example and the underlying techniques, see B. T. Cox and B. E. Treeby, "Effect of sensor directionality on photoacoustic imaging: A study using the k-Wave toolbox," in Proc. SPIE 7564, p. 75640I, 2010.

Back to Top

### Running the simulation

The simulation is first invoked using a rectangular binary sensor mask with omnidirectional elements in the same way as previous examples. Directionality is then added to the sensor elements by assigning an angle to the corresponding elements in an Nz by Nx matrix passed to `sensor.directivity_angle`. These are assigned such that the maximum sensitivity of each sensor face faces inward.

    % define a four-sided, square sensor
    sensor.mask = zeros(kgrid.Nz, kgrid.Nx);
    sensor.mask(1, :) = 1;
    sensor.mask(Nz, :) = 1;
    sensor.mask(:, 1) = 1;
    sensor.mask(:, Nx) = 1;

    % run the simulation for omnidirectional detector elements
    sensor_data = kspaceFirstOrder2D(kgrid, medium, source, sensor, input_args{:});

    % define the directionality of the sensor elements
    sensor.directivity_angle = zeros(kgrid.Nz,kgrid.Nx);
    sensor.directivity_angle(1, :) = 0;     % max sensitivity in z direction
    sensor.directivity_angle(Nz, :) = 0;    % max sensitivity in z direction
    sensor.directivity_angle(:, 1) = pi/2;  % max sensitivity in x direction
    sensor.directivity_angle(:, Nx) = pi/2; % max sensitivity in x direction

    % define the directivity size
    sensor.directivity_size = 20*kgrid.dx;

    % run the simulation with directional elements
    sensor_data_directional = kspaceFirstOrder2D(kgrid, medium, source, sensor, input_args{:});

Back to Top

### Time-reversal image reconstruction

To examine the effect of sensor directionality on time reversal image reconstruction, the sensor data recorded from both the omni-directional and directional sensor elements is used to reconstruct the initial photoacoustic pressure distribution.

    % reset the initial pressure
    source.p0 = 0;

    % assign the time reversal data for the omnidirectional case
    sensor.time_reversal_boundary_data = sensor_data;

    % run the time reversal reconstruction
    p0_recon = kspaceFirstOrder2D(kgrid, medium, source, sensor, input_args{:});

    % assign the time reversal data for the directional case
    sensor.time_reversal_boundary_data = sensor_data_directional;

    % run the time reversal reconstruction with directional elements
    p0_recon_directional = kspaceFirstOrder2D(kgrid, medium, source, sensor, input_args{:});

The reconstructed pressure distributions are shown below. For the omni-directional sensor, the initial pressure is reconstructed exactly (note, the inverse crime in which the same simulation parameters are used in both simulation and reconstruction has been committed). However, when using the directional sensor, image artifacts are introduced into the reconstruction.

Back to Top

© 2009, 2010, 2011 Bradley Treeby and Ben Cox.