| k-Wave Toolbox |
|
Create k-Wave ultrasound transducer
transducer = makeTransducer(kgrid, settings)
makeTransducer creates an object of the kWaveTransducer class which can be substituted for the source or sensor inputs when using kspaceFirstOrder3D. For additional information, see the Defining An Ultrasound Transducer Example.
Note: This function will not work with older versions of MATLAB in which custom class definitions are not supported. |
|
k-Wave grid structure returned by |
|
input structure used to define the properties of the transducer (see below) |
The following parameters can be appended as fields to the settings input structure. These parameters are fixed when the transducer is initialised (they cannot be changed without re-creating the transducer). All the settings are optional and are given their default values if not defined by the user.
| Property | Description | Default |
|---|---|---|
|
total number of transducer elements |
|
|
width of each element in grid points |
|
|
length of each element in grid points |
|
|
spacing (kerf width) between the transducer elements in grid points |
|
|
position of the corner of the transducer within the grid in grid points |
|
|
radius of curvature of the transducer [m] (currently only |
|
|
signal used to drive the ultrasound transducer (where the sampling rate is defined by |
|
The following parameters can also be appended as fields to the settings input structure, and can additionally be modified after the transducer has been initialised.
| Property | Description | Default |
|---|---|---|
|
transducer elements that are currently active elements |
(all elements) |
|
beamforming delay offset (used to force beamforming delays to be positive) |
|
|
focus depth in the elevation direction [m] |
|
|
focus distance used to calculate beamforming delays [m] |
|
|
receive apodization - can be set to any of the window shapes supported by |
|
|
sound speed used to calculate beamforming delays [m/s] |
|
|
steering angle used to calculate beamforming delays [deg] |
|
|
transmit apodization - can be set to any of the window shapes supported by |
|
|
k-Wave transducer object which can be used to replace the |
In addition to the input parameters given above (which are also accessible after the transducer has been created), the kWaveTransducer object has a number dependent properties and methods.
| Property | Description |
|---|---|
|
user defined input signal appended and prepended with additional zeros depending on the values of |
|
binary mask of the active transducer elements |
|
current number of active transducer elements |
|
total width of the transducer in grid points |
| Method | Description |
|
return a binary mask of the active transducer elements (identical to |
|
return a binary mask of all the transducer elements (both active and inactive) |
|
return a vector of the beam forming delays (in units of time samples) for each active element based on the focus and steering angle settings |
|
combine the sensor data returned by |
|
return a mask of the active transducer elements, where the mask values contain the beamforming delays (an integer input can also be given to control the beamforming delays used, where 1: both delays, 2: elevation only, 3: azimuth only) |
|
return a vector of the elevation beam forming delays (in units of time samples) for each active element based on the elevation focus setting |
|
return the receive apodization |
|
return the transmit apodization |
|
return a mask of the active transducer elements, where the mask values indicate which transducer element each grid point corresponds to |
|
return a mask of all the transducer elements (both active and inactive), where the mask values indicate which transducer element each grid point corresponds to |
|
plot the transducer using |
|
print a list of the transducer properties to the command line |
|
combine the input sensor data using the current apodization and beamforming setting to generate a single scan line |
|
return a mask of the active transducer elements, where the mask values contain the apodization weights |
For example, running the following commands at the command line
kgrid = makeGrid(128, 1e-3, 128, 1e-3, 128, 1e-3); kgrid.t_array = makeTime(kgrid, 1500); settings.number_elements = 72; settings.active_elements = zeros(72, 1); settings.active_elements(1:16) = 1; transducer = makeTransducer(kgrid, settings); transducer.properties
will produce the following output:
k-Wave Transducer Properties transducer position: [1 1 1] transducer width: 72mm (72 grid points) number of elements: 72 number of active elements: 16 (elements 1 to 16) element width: 1mm (1 grid points) element spacing (kerf): 0ym (0 grid points) element pitch: 1mm (1 grid points) element length: 20mm (20 grid points) sound speed: 1540m/s focus distance: infinite elevation focus distance: infinite steering angle: 0 degrees
makeGrid, kspaceFirstOrder3D
|
makeTime | maxND | ![]() |
© 2009-2014 Bradley Treeby and Ben Cox.