You are on page 1of 18

DEVELOPMENT OF IMAGE RECONSTRUCTION ALGORITHM FOR

BIOMEDICAL IMAGING
Submitted in partial fulfilment of the requirement for the award of
the degree of
Bachelor of Technology
in
Applied Electronics & Instrumentation Engineering

By:
Name University Reg. No University Roll No
Sayak Roy 201260105510022 12620005041
Swastik Paul 201260105510013 12620005057
Utsav Bose 201260105510042 12620005059
Yshan Roy 201260105510050 12620005061

Under The Supervision of


Dr. Santanu Ghorai
Department of Applied Electronics & Instrumentation Engineering
Heritage Institute of Technology

[1]
DEPARTMENT
OF
APPLIED ELECTRONICS & INSTRUMENTATION ENGINEERING
HERITAGE INSTITUTE OF TECHNOLOGY

This is to certify that the project work entitled


DEVELOPMENT OF IMAGE RECONSTRUCTION ALGORITHM FOR BIOMEDICAL IMAGING
has been successfully completed by

Name University Reg. No University Roll No


Sayak Roy 201260105510022 12620005041
Swastik Paul 201260105510013 12620005057
Utsav Bose 201260105510042 12620005059
Yshan Roy 201260105510050 12620005061

in partial fulfilment for the award of the degree of


Bachelor of Technology
in
Applied Electronics and Instrumentation Engineering
Maulana Abul Kalam Azad University of Technology, 2023

Santanu Ghorai
Project Guide External Examiner
Dept. of AEIE
Prof. (Dr.) Madhurima Chattopadhyay
Head of the Dept.
Dept. of AEIE

[2]
CONTENTS

Abstract……………………………………………………………………………………………………….4

Chapter 1 Introduction……………………………………………………………………………………5
1.1 Importance of Photoacoustic imaging
1.2 Previous Work
1.3 Goal of the Thesis

Chapter 2 Overview of method…………………………………………………………………………...7


2.1 Simulation of ultrasound waves
2.2 Time reversal algorithm
2.3 FFT algorithm

Chapter 3 Theoretical Study……………………………………………………………...………………15

Chapter 4 Sample Results………………………………………………………………………………..16

References……………………………………………………………………………………………………18

[3]
ABSTRACT

Medical imaging has undergone remarkable advancements over the years, revolutionizing our understanding
of the intricate structures and functions of the human body. Among the innovative technologies that have
emerged, photoacoustic imaging (PAI) stands out as a promising hybrid technique that seamlessly integrates
the benefits of both optical and acoustic imaging modalities. This cutting-edge technology holds immense
potential across a spectrum of biomedical applications, ranging from cancer detection to functional brain
imaging, vascular imaging, and monitoring various physiological processes.

At the heart of photoacoustic imaging lies a sophisticated yet elegantly simple principle. The process
initiates with the absorption of short laser pulses by biological tissues. This absorption results in localized
heating and thermoelastic expansion within the tissue, giving rise to ultrasonic waves. These waves, in turn,
can be captured by highly sensitive sensors. The subsequent step involves leveraging these photoacoustic
signals for the reconstruction of high-resolution images. This groundbreaking approach offers a non-
invasive and real-time visualization of biological tissues at various depths, providing invaluable insights for
clinicians and researchers alike.

To achieve the intricate task of signal reconstruction in photoacoustic imaging, several algorithms play a
pivotal role. Among them, the time reversal algorithm, Fast Fourier Transform (FFT) algorithm, iterative
reconstruction algorithm, and the delay and sum algorithm are prominent. Each algorithm contributes to
refining and enhancing the captured signals, ultimately yielding detailed and accurate images of the
biological structures under examination. This computational prowess allows clinicians to visualize tissues
with unprecedented clarity, enabling early detection of abnormalities and contributing to more effective
medical interventions.

The versatility of photoacoustic imaging extends its applicability to diverse clinical scenarios. In cancer
detection, for instance, PAI offers enhanced sensitivity to haemoglobin and other biomolecules, enabling the
identification of tumours at an early stage. In functional brain imaging, the modality provides a unique
window into cerebral hemodynamic, shedding light on brain function. Additionally, PAI's capability in
vascular imaging and monitoring physiological processes positions it as a valuable tool for cardiovascular
studies and other areas of medical research.

[4]
CHAPTER 1
INTRODUCTION

1.1 Importance of Photoacoustic imaging

Photoacoustic Imaging (PAI) has emerged as a versatile and powerful tool across various research domains,
significantly contributing to the advancement of knowledge and innovation. In the realm of cancer research,
PAI proves instrumental for early detection, tumour characterization, and monitoring therapeutic responses .

The photoacoustic effect involves the conversion of light into acoustic waves through absorption and
localized thermal excitation. When brief pulses of light hit a sample, they get absorbed, and the resultant
energy transforms into heat. This heat, in turn, generates detectable sound waves due to pressure fluctuations
in the surrounding medium. An ultrasound probe captures these acoustic waves, and the recorded raw data
serves as the basis for reconstructing images. Three notable algorithms for reconstructing photoacoustic
images are Delay and Sum, FFT, and Time Reversal. While Time Reversal holds the potential for achieving
the highest image quality, its current impracticality for real-time reconstruction (due to a lengthy 20-minute
computation time for one frame) directs our focus in this project towards developing algorithms using Delay
and Sum and FFT methods.

1.2 Previous Work

In the realm of Photoacoustic Imaging (PAI), a wealth of previous work has significantly advanced our
understanding and application of this hybrid imaging modality. Studies focusing on cancer detection and
characterization have explored PAI's potential for early diagnosis, monitoring tumour angiogenesis, and
distinguishing between malignant and benign lesions (figure 1).

1.3 Goal of the Thesis

In this thesis it has been proposed to design, implement, and compare the Time reversal, FFT algorithm for
time complexity, accuracy, and quality of image. The main objective of our project is to establish and test
two accurate, reliable image reconstruction algorithms using the time reversal and FFT method. The
developed MATLAB programs are to be able to take in the pre-beam-formed data acquired by the ultrasound
system and reconstruct proper images of the planned seeds in the phantom. When an initial working
algorithm is developed, the second primary objective is to optimize the algorithm to produce images with a
higher resolution. The testing of the performance of developed algorithms starts with a simplified case –

[5]
producing a photoacoustic image of the metal seeds in homogenous media. Once satisfactory results are
obtained with using homogenous media, the project will then focus on testing using inhomogeneous media,
which is a more likely case in practical applications. At the end of the project, a complete set of working
image reconstruction algorithms will be delivered, along with this final project report discussing the design
and performance of these algorithms in details

Figure 1

[6]
CHAPTER 2
OVERVIEW OF METHOD

2.1 Simulation of Ultrasound waves


We have used the k wave toolbox available in MATLAB for the simulation of ultrasound waves, by simply
implementing the steps shown below:

a) Defining the grids


b) Defining initial pressure
c) Defining medium properties
d) Defining sensor position
e) Running the simulation

The following assumptions are made for simplification:

i. The medium is homogenous.


ii. Pressure is circularly distributed across the plane of magnitude 3pa
iii. The sensor we have used is a line sensor consisting of 128 sensor points
iv. The plane consists of 128×128 grids with a spacing of 0.2mm.

Creating the k-space grid


The simulation functions in k-Wave require four input structures. These define the properties of the
computational grid, the material properties of the medium, the properties and locations of any acoustic sources,
and the properties and locations of the sensor points used to record the evolution of the pressure and velocity
fields over time. Starting with the computational grid, the simulations are performed on a regular Cartesian
mesh (for users with a background in finite-element methods, this is analogous to a structured mesh containing
identical rectangular elements). The medium discretisation is performed using kWaveGrid. Both the total
number of grid points (Nx, Ny) as well as the spacing between the grid points (dx, dy) in each Cartesian
direction are used to compute the discretisation, and an object of the kWaveGrid class is returned. As the
numerical techniques used in k-Wave are based heavily on the fast Fourier transform (FFT), the simulations
will be fastest when the number of grid points in each direction is given by a power of two or has small prime
factors (see checkFactors).

% create the computational grid

Nx = 128; % number of grid points in the x (row) direction

Ny = 128; % number of grid points in the y (column) direction

dx = 0.1e-3; % grid point spacing in the x direction [m]

dy = 0.1e-3; % grid point spacing in the y direction [m]

kgrid = kWaveGrid(Nx, dx, Ny, dy);

[7]
Defining the medium properties
For a homogeneous medium, the sound speed is set as a scalar value in SI units (i.e., metres per second).
Power law acoustic absorption can also be optionally set by assigning values
to medium.alpha_coeff and medium.alpha_power. These respectively correspond to the power law coefficient
or prefactor in units of dB/(MHz^y cm) and the power law exponent or power y. It is useful to note that for a
homogeneous medium, the computation of the acoustic pressure is not dependent on the ambient density.
Consequently, if no velocity inputs or outputs are required, medium.density does not need to be specified. For
modelling nonlinear effects, medium.BonA should also be specified. In this case, k-Wave includes a number
of additional nonlinear terms in the discrete governing equations.

% define the properties of the propagation medium

medium.sound_speed = 1500; % [m/s]

medium.alpha_coeff = 0.75; % [dB/(MHz^y cm)]

medium.alpha_power = 1.5;

The grid spacing (dx and dy) and the sound speed govern the maximum frequency that the simulation grid is
able to propagate. This frequency is printed to the command line when the simulation runs, and can be
calculated (for each Cartesian direction) by f_max_x = medium.sound_speed/(2*dx).

Defining the initial pressure distribution


The initial pressure distribution is set as a matrix which contains the initial pressure values for each grid point.
This matrix must be the same size as the medium discretisation defined by the computational grid (i.e., it must
have Nx rows and Ny columns). Several functions are included in the toolbox for the creation of simple
geometric shapes. In this example, the function makeDisc is used to create an initial pressure distribution in
the shape of two small discs with different diameters. This distribution is assigned to the p0 field of
the source structure. There are no restrictions on source.p0 except that it must be the same size as the
computational grid.

% create initial pressure distribution using makeDisc

disc_magnitude = 5; % [Pa]

disc_x_pos = 50; % [grid points]

disc_y_pos = 50; % [grid points]

disc_radius = 8; % [grid points]

disc_1 = disc_magnitude * makeDisc(Nx, Ny, disc_x_pos, disc_y_pos, disc_radius);

disc_magnitude = 3; % [Pa]

disc_x_pos = 80; % [grid points]

disc_y_pos = 60; % [grid points]

disc_radius = 5; % [grid points]

disc_2 = disc_magnitude * makeDisc(Nx, Ny, disc_x_pos, disc_y_pos, disc_radius);

[8]
source.p0 = disc_1 + disc_2;

The sensor mask defines the positions within the computational domain where the pressure field is recorded
at each time-step. The sensor mask can be given in one of three ways:

1. A binary matrix which specifies the grid points that record the data (see the Using A Binary
Sensor Mask Example).
2. The grid coordinates of two opposing corners of a line (1D), rectangle (2D) or cuboid (3D) (see
the Defining A Sensor Mask By Opposing Corners Example).
3. A set of Cartesian coordinates lying within the dimensions of the computational domain.
In 2D, Cartesian coordinates must be specified as a 2 x N matrix, where the Cartesian origin is assumed to be
in the center of the grid. Here the function makeCartCircle is used to set the sensor mask to the Cartesian
coordinates of a set of evenly spaced points on a circle.

% define a centered circular sensor

sensor_radius = 4e-3; % [m]

num_sensor_points = 50;

sensor.mask = makeCartCircle(sensor_radius, num_sensor_points);

Figure 2

Running the simulation


The computation is started by calling the function kspaceFirstOrder2D with the four input structures defined
above. By default, a visualisation of the propagating wave-field and a status bar are displayed, with frame

[9]
updates every ten time-steps. The default k-Wave color map displays zero as white, positive pressures as
yellows to reds to black, and negative pressures as light to dark blue-greys (see getColorMap).

% run the simulation

sensor_data = kspaceFirstOrder2D(kgrid, medium, source, sensor);

2.2 Time reversal algorithm

The time reversal algorithm is a numerical method that solves the wave equation by working backward from
the recorded pressure at detectors towards the source. While it is capable of handling inhomogeneous media,
the practical downside is the substantial computational time required, often taking up to 20 minutes to
process a single frame. Despite its ability to provide more accurate results when compared to the delay and
sum method, the time reversal algorithm is not suitable for clinical imaging due to its impractical processing
times.

The steps involved in implementing the time reversal algorithm are:

a) Loading sensor data


b) Resetting initial pressure
c) Assign time reversal data
d) Run time reversal function
e) Display the reconstructed image

Performing the time-reversal reconstruction


The first-order k-Wave functions already described for the simulation of photoacoustic wave propagation can
also be used for photoacoustic image reconstruction by assigning the time varying pressure recorded over the
detector array to sensor.time_reversal_boundary_data. This pressure is then enforced, in time reversed order,
as a Dirichlet boundary condition over the given sensor mask. If the sensor mask is given as a set of Cartesian
coordinates then the sensor data, indexed as sensor_data(sensor_position, time), must be given in the same
order. An equivalent grid-based sensor mask computed using nearest neighbour interpolation is then used to
enforce the boundary condition within the computational grid at each time step. If the sensor mask is instead
given as a binary grid, the sensor data must be ordered using MATLAB's standard column-wise linear matrix
indexing.
By passing the sensor data returned from a k-space forward simulation directly
to sensor.time_reversal_boundary_data and then calling kspaceFirstOrder2D, it is straightforward to simulate
the measurement and reconstruction process (note, in this simple example the 'inverse crime' is committed in
which the same numerical parameters are used for both simulation and reconstruction). When using the
simulation functions in time reversal mode, the array of time points kgrid.t_array must be explicitly defined.
This array is created here using the makeTime method of the kWaveGrid class.

% run the simulation

sensor_data = kspaceFirstOrder2D(kgrid, medium, source, sensor, input_args{:});

[10]
% reset the initial pressure

source.p0 = 0;

% assign the time reversal data

sensor.time_reversal_boundary_data = sensor_data;

% run the time reversal reconstruction

p0_recon = kspaceFirstOrder2D(kgrid, medium, source, sensor, input_args{:});

Figure 3

2.3 FFT algorithm

The Fast Fourier Transform (FFT) algorithm, when applied to image reconstruction, excels in producing
more precise photoacoustic images compared to the delay and sum method. This algorithm involves
performing FFT on the sensor data, converting the time-step signal into the wavenumber-frequency domain.
Subsequently, the reconstructed signal undergoes an inverse FFT to obtain the final reconstructed image.
However, a significant limitation of this approach is its exclusive suitability for wave propagation in a
homogeneous medium.

a) The steps involved in performing the FFT algorithm are:


[11]
b) Loading sensor data
c) Resetting initial pressure
d) Defining grids
e) Resampling the reconstructed initial pressure
f) Display the reconstructed image

Defining a smooth initial pressure distribution


The sensor data used for the reconstruction is generated using kspaceFirstOrder2D in the same way as in
the Initial Value Problems examples. (The reconstruction of experimental data can approached in the same
fashion by substituting the numerical sensor data with experimental measurements.) It is important to note
that, by default, the function kspaceFirstOrder2D spatially smooths the initial pressure distribution
using smooth (see the Source Smoothing Example). To provide a valid comparison, the output of the
reconstruction code kspaceLineRecon must be compared to the smoothed version of the initial pressure used
in the simulation. This can be achieved by explicitly using smooth before passing the initial pressure
to kspaceFirstOrder2D.

% smooth the initial pressure distribution and restore the magnitude

source.p0 = smooth(source.p0, true);

The default smoothing within kspaceFirstOrder2D can be modified via the optional input parameter ‘Smooth’.
If given as a single Boolean value, this setting controls the smoothing of the initial pressure along with the
sound speed and density distributions. To control the smoothing of these distributions
individually, ‘Smooth’ can also be given as a three element array controlling the smoothing of the initial
pressure, the sound speed, and the density, respectively.

Defining the time array


Although kspaceFirstOrder2D can be used to automatically define the simulation length and time-step (by
default kgrid.t_array, kgrid.Nt, and kgrid.dt are set to ‘auto’ by kWaveGrid), this information is also required
by kspaceLineRecon and thus in this example the time array must be explicitly created. This can be easily
achieved by directly calling the makeTime method of the kWaveGrid class. This is the same function that is
called internally by the first-order simulation functions when kgrid.t_array is set to ‘auto’.

% create the time array

kgrid.makeTime(medium.sound_speed);

[12]
Figure 4

Simulating the sensor data


The FFT reconstruction function kspaceLineRecon requires data recorded along an equally spaced line-
shaped array of sensor points. A sensor with this shape can be created by defining a binary sensor mask matrix
with a line of 1's along the first matrix row (i.e., a line along x = const).

% define a binary line sensor

sensor.mask = zeros(Nx, Ny);

sensor.mask(1, :) = 1;

Performing the reconstruction


The reconstruction is invoked by calling kspaceLineRecon with the recorded sensor data, as well as the
properties of the acoustic medium and the sampling parameters. By default, the sensor data input must be
indexed as p(time, sensor_position). This means the simulated sensor data returned
by kspaceFirstOrder2D which is indexed as sensor_data(sensor_position, time) must first be rotated.
[13]
Alternatively, the optional input parameter 'DataOrder' can be set to 'yt' (the default settings is 'ty'). By setting
the optional input parameter 'Plot' to true, a plot of the reconstructed initial pressure distribution is also
produced.

% reconstruct the initial pressure

p_xy = kspaceLineRecon(sensor_data.', dy, kgrid.dt, medium.sound_speed, 'Plot', true);

[14]
CHAPTER 3
THEORETICAL STUDY

Our project's primary goal is to create and enhance an accurate and reliable image reconstruction algorithm
using the time reversal and Fast Fourier Transform (FFT) algorithms, and compare their efficiency and
performance. The MATLAB programs we are developing will process pre-beam-formed data from
ultrasound systems to reconstruct images of planned seeds in phantoms. These algorithms aim to deliver
images with satisfactory resolution for both homogeneous and inhomogeneous materials. Although the
principles of the photoacoustic effect and ultrasound wave production were discovered over a century ago,
the practical application of photoacoustic imaging in the medical field gained momentum with the
widespread use of ultrasound imaging and advanced transducers. Our algorithms seek to reconstruct images
with satisfactory resolution, considering the potential for real-time imaging integration into future systems.
Simulated and experimental data, generated using kwave toolbox in MATLAB, were employed to analyse
algorithm performance.

Figure 5

[15]
CHAPTER 4
SAMPLE RESULTS

A few seeds are placed inside a solution, as shown in figure 2:

Figure 6
After collecting the data from the ultrasound sensors, well obtain a raw sensor data as given below:

Figure 7
[16]
After the raw image is processed by the two image reconstruction algorithms, we will obtain the
reconstructed image as follows:

Figure 8
Now, by observing the results obtained by the time reversal method and FFT method, we can compare
between the two algorithms.

[17]
REFERENCES

• Kevin Zhou, Zongyi Zhang, Sean Yang, “Photoacoustic Image Reconstruction”, The University of British
Columbia, Jan 7, 2013.

• Bradley E Treeby, “Effect of Sensor Directionality on Photoacoustic Imaging: A Study Using the k-Wave
Toolbox”, Journal of Biomedical Optics, Mar, 2010

• Kornel P. Köstli, Paul C. Beard, “Two-dimensional photoacoustic imaging by use of Fourier-transform image
construction and a detector with an anisotropic response”, Optical Society of America, April 1, 2003

• Yun Zeng, “Functional Probes for Cardiovascular Molecular Imaging”, September 2018

[18]

You might also like