k-Wave
A MATLAB toolbox for the time-domain
simulation of acoustic wave fields
- Getting Started
- Examples
- Initial Value Problems
- Example: Homogenous Propagation Medium
- Example: Using A Binary Sensor Mask
- Example: Defining A Sensor Mask By Opposing Corners
- Example: Loading External Image Maps
- Example: Heterogeneous Propagation Medium
- Example: Saving Movie Files
- Example: Recording The Particle Velocity
- Example: Defining A Gaussian Sensor Frequency Response
- Example: Comparison Of Modelling Functions
- Example: Setting An Initial Pressure Gradient
- Example: Simulations In One Dimension
- Example: Simulations In Three Dimensions
- Example: Photoacoustic Waveforms in 1D, 2D and 3D
- Time Varying Source Problems
- Example: Monopole Point Source In A Homogeneous Propagation Medium
- Example: Dipole Point Source In A Homogeneous Propagation Medium
- Example: Simulating Transducer Field Patterns
- Example: Steering A Linear Array
- Example: Snell's Law And Critical Angle Reflection
- Example: The Doppler Effect
- Example: Diffraction Through A Slit
- Example: Simulations In Three-Dimensions
- Sensor Directivity
- Example: Focussed Detector in 2D
- Example: Focussed Detector in 3D
- Example: Modelling Sensor Directivity in 2D
- Example: Modelling Sensor Directivity in 3D
- Example: Sensor Element Directivity in 2D
- Example: Focussed 2D Array with Directional Elements
- Photoacoustic Image Reconstruction
- Example: 2D FFT Reconstruction For A Line Sensor
- Example: 3D FFT Reconstruction For A Planar Sensor
- Example: 2D Time Reversal For A Line Sensor
- Example: 2D Time Reversal For A Circular Sensor
- Example: 3D Time Reversal For A Planar Sensor
- Example: 3D Time Reversal For A Spherical Sensor
- Example: Image Reconstruction With Directional Sensors
- Example: Image Reconstruction With Bandlimited Sensors
- Example: Iterative Image Improvement Using Time Reversal
- Example: Attenuation Compensation Using Time Reversal
- Example: Attenuation Compensation Using Time Variant Filtering
- Example: Automatic Sound Speed Selection
- Diagnostic Ultrasound Simulation
- Example: Defining An Ultrasound Transducer
- Example: Simulating Ultrasound Beam Patterns
- Example: Using An Ultrasound Transducer As A Sensor
- Example: Simulating B-mode Ultrasound Images
- Example: Simulating B-mode Images Using A Phased Array
- Numerical Analysis
- Example: Controlling The Absorbing Boundary Layer
- Example: Source Smoothing
- Example: Filtering A Delta Function Input Signal
- Example: Modelling Power Law Absorption
- Example: Modelling Nonlinear Wave Propagation
- Example: Optimising k-Wave Performance
- Using The C++ Code
- Elastic Wave Propagation
- Example: Explosive Source In A Layered Medium
- Example: Plane Wave Absorption
- Example: Shear Waves And Critical Angle Reflection
- Example: Simulations In Three Dimensions
- Functions - By Category
- Functions - Alphabetical List
- Release Notes
- License
k-Wave Toolbox |
2D Time Reversal Reconstruction For A Circular Sensor Example
On this page… |
---|
Overview
This example demonstrates the use of k-Wave for the time-reversal reconstruction of a two-dimensional photoacoustic wave-field recorded over a circular array of sensor elements. The sensor data is simulated and then time-reversed using kspaceFirstOrder2D
. It builds on the 2D Time Reversal Reconstruction For A Line Sensor Example.
Simulating the data
The sensor data is simulated using kspaceFirstOrder2D
with an external image map for the initial pressure distribution in the same way as the Loading External Image Maps Example (this time the image is representative of vasculature). A plot of the initial pressure distribution (scaled to 256 by 256 grid points) and the Cartesian sensor mask used to record the pressure field (70 sensor points over a 270 degree measurement angle) is shown below.
Avoiding the inverse crime
To avoid the inverse crime (in which computations are run forwards and backwards using the same parameters and discretisation thereby possibly disguising any underlying errors), in this example the time-reversal reconstruction is computed using measurement data with added noise (using addNoise
) and a different computational grid. The use of a different reconstruction grid size is straightforward for a Cartesian sensor mask; in the forward simulation the pressure time-series at the Cartesian points are computed using interpolation and can thus be transposed to a grid of any size. The time-reversal reconstruction using a computational grid with 300 by 300 grid points is shown below.
Interpolating incomplete sensor data
In the reconstruction shown above, the edges of original image have been significantly blurred. This is due to outgoing waves from each discrete detector position on the measurement surface interacting with other positions at which a pressure value is also being enforced during the time reversal. This interaction can be avoided by interpolating the recorded data onto a continuous (rather than discrete) measurement surface within the k-space grid used for the reconstruction. This can be achieved using interpCartData
and a binary sensor mask of a continuous arc that is spatially equivalent to the original Cartesian measurement surface. This function calculates the equivalent time-series at the sensor positions on the binary sensor mask from those on the Cartesian sensor mask via interpolation (nearest neighbour is used by default).
% create a binary sensor mask of an equivalent continuous circle sensor_radius_grid_points = round(sensor_radius/kgrid_recon.dx); binary_sensor_mask = makeCircle(kgrid_recon.Nx, kgrid_recon.Ny, kgrid_recon.Nx/2, kgrid_recon.Ny/2, sensor_radius_grid_points, sensor_angle); % interpolate data to remove the gaps and assign to sensor structure sensor.time_reversal_boundary_data = interpCartData(kgrid_recon, sensor_data, cart_sensor_mask, binary_sensor_mask);
Details of the interpolation are printed to the command line.
Interpolating Cartesian sensor data... interpolation mode: nearest number of Cartesian sensor points: 70 number of binary sensor points: 574 computation completed in 0.018583s
The reconstructed image and a profile through x = -0.5 are shown below. The interpolation has considerably sharpened the edges of the reconstruction and the magnitude has also been improved through partial correction for the discontinuous aperture.
2D Time Reversal Reconstruction For A Line Sensor | 3D Time Reversal For A Planar Sensor |
© 2009-2014 Bradley Treeby and Ben Cox.