Imaging Summary
Imaging Summary
Imaging Summary
Electromagnetic waves
C=f λ Energy of 1 photon
C – 3x108 m/s2 hc
E=hv=
λ – wavelength λ
f – frequency h – 6.626x10-34 J.s or 4.135x10-15 eV.s
1D point impulse
2D point impulse
Integral of function is 1
∫ δ( x )dx = 1 ∫ ∫ δ ( x , y )dxdy = 1
−∞ −∞ −∞
Sifting property
Time shift the impulse function to get a point of interest of the function
1D 2D
Similarly for 2D
∞ ∞
f ( p , q )=∫ ∫ f ( x , y ) δ ( x−p , y −q ) dx dy
−∞ −∞
Scaling property
1
δ ( ax , by )= δ( x , y )
|ab|
Line impulse
δ ( x , y )=δ (xcosθ+ ysinθ−l)
If the system S is understood well, the output can be determined for any input
f(x,y)
A system is called linear shift-invariant (LSI) is system is both linear and shift-
invariant
Impulse response
Impulse response is the system output when the input is an impulse function
Defined using h
h ( x , y ) =S [δ (x , y)]
System output
Can find out system output of LSI system if impulse response and input are given
Linearity
Linearity
Impulse response
Convolution
∞ ∞
g ( x , y )= ∫ ∫ f ( p , q ) h ( x−p , y −q ) dpdq=h ( x , y )∗f ( x , y)
−∞ −∞
Contrast
Difference between object and background or between adjacent objects (local
contrast)
f t −f b
C=
fb
f t – target intensity
f b – background intensity
Resolution
Ability of a system to resolve distinct sources
1
1. Let the function = and let x=xo
2
2. Solve the equation to find xo
3. FWHM = 2xo
Chapter 3
X-ray beam attenuation
−μo L
I =I o e
I o – Input intensity of X-ray
I – Output intensity of X-ray
μ( x ) – Linear X-ray attenuation coefficient
As different material have different attenuation coefficient
D
−∫ μ (x)dx
I =I o e A
−¿ ¿
¿ Ioe
Assume all lengths are equal
−(μ +μ + μ )∆ x
I =I o e 1 2 3
This is applied to x-rays as body has multiple mediums with different coefficients
Hounsfield units (HU)
μ−μ water
CT number = 1000 ×
μwater
I =I o e ∫
− μ (x , y )dxdy
I
=e ∫
− μ (x , y )dxdy
Io
I
ln ( )=−∫ μ(x , y ) dxdy
Io
∞ ∞
I
ln ( )=−∫ ∫ μ ( x , y ) δ ( xcosθ+ ysinθ−L ) dxdy
Io −∞ −∞
∞ ∞
I
ln ( )=−∫ ∫ f ( x , y ) δ ( xcosθ+ ysinθ −L ) dxdy
Io −∞ −∞
I
Since projection = p ( L, θ ) =−ln ( )
Io
∞ ∞
p ( L, θ ) =∫ ∫ f ( x , y ) δ ( xcosθ + ysinθ−L ) dxdy
−∞ −∞
This is known as Radon Transform
∞ ∞
R [ f ( x , y ) ] = ( L , θ )= ∫ ∫ f ( x , y ) δ ( xcosθ + ysinθ−L ) dxdy
−∞ −∞
Radon transform is used to plot a sinogram
For each projection that detects an object, assume that there is an object
along the entire line
The more backprojections done, the location of object can be found at the
intersection
Fourier reconstruction
Fourier slice theorem
∞ Synthesis eqn from
P ( ρ ,θ )=∫ p ( L ,θ)e
− j 2 πρL
dL signals, let w=2 π
−∞
∞ ∞ ∞
P ( ρ ,θ )=∫ ∫ ∫ f ( x , y )δ ( xcosθ+ ysinθ−L)dxdy e− j2 πρL dL dxdy
−∞ −∞ −∞ Linearity
∞ ∞ ∞
P ( ρ ,θ )=∫ ∫ f (x , y ) ∫ δ (xcosθ+ ysinθ−L)e
− j 2 πρL
dL dxdy
−∞ −∞ −∞
Sub in eqn of
∞ ∞
line
P ( ρ ,θ )=∫ ∫ f (x , y ) e
− j 2 πρ(xcosθ + ysinθ)
dxdy
−∞ −∞
Let u= ρ cosθ , v= ρ sinθ
∞ ∞
P ( ρ ,θ )=∫ ∫ f ( x , y ) e
− j 2 π (xu + yv )
dxdy
−∞ −∞
P ( ρ ,θ )=F (u , v)
Filtered backprojection
Steps
Get projection p ( L, θ )
Do 1D Fourier transform to obtain P ( ρ ,θ )
Multiply with ramp filter |ρ|, high pass filter: |ρ| P ( ρ ,θ )
1D inverse Fourier transform
Backprojection to get image
Point 2 to 4 is equivalent to doing filtering in time domain
Convolution backprojection
Steps
Get projection p ( L, θ )
Convolution of c(L) with p ( L, θ )
Backprojection to get image
Chapter 4
Types of nuclear imaging
Planer scintigraphy: Use anger scintillation camera
=e =0.056
511 KeV
Io
I −μ
d
Therefore, 5.6% transmitted
=e =0.1
140KeV
Io
Therefore, 10% transmitted
Example above shows SPECT and PET have high absorption rate, hence
absorption correction is needed to reconstruct images
For PET, if 2 positron-electron collision occur at the same time, but detector only
detect 1 photon from each event due to high absorption. This will cause false
reconstruction. This is miscalculation in coincidence detection.
PET/CT image
PET is not good for structure; PET scans reveal metabolic change on cellular level
CT scan can be used to identify structure
Use both together
Chapter 5
Ultrasound general information
For good resolution and good penetrating ability, frequency range is 1MHz
to 20MHz
Applied to body externally, non-invasive
Physics of ultrasound
Ultrasound waves need a medium to travel
Acoustic waves travel at speed of sound
1
C=
√ kρ
C – 1500m/s2
K – compressibility
ρ – density
Typical measurements
Frequency – 1 to 20 MHz
C
Wavelength = =1.5 mm ¿ 0.075 mm
f
λ
Resolution = (estimate)
2
Impedance formula
z=ρc
Increase in frequency, decrease in wavelength, decrease in resolution
Above 20MHz, there is high attenuation. Ultrasound wave must bounce back to
generate a signal, attenuation is not good.
Reflection and refraction
Snell’s law
sin θi C1 speed ∈the first medium
= =
sin θt C2 Speed ∈second medium
Ir
R I= =¿
Ii
¿¿
Transducer
Piezoelectric materials convert electric field to mechanical strain
PZT (lead zirconate titanate) – more commonly used for transducer
PVDF; a polymer film
PVDF
D = 15x10-12 m/V
G = 14x10-2 V/(N/m)
PZT is more common is clinical applications due to good D and G. Can be used as
both transmitter and receiver
Ultrasound wave
The pulse of ultrasonic energy travels into tissue. It is reflected from tissue
boundaries, causing echoes
By the time the echoes reach the transducer, the pulse generator has turned off,
and the echoes create an oscillation in the transducer again
The received ultrasound echo is in the radio frequency (RF) in the 1 to 20 MHz
range. It is processed by the signal processing unit for imaging and display
Attenuation
Due to attenuation, the reflected echoes are weaker in magnitude and power
Imaging mode
A-mode (measure amplitude)
Transducer and organ is stationary
B-mode (measure brightness)
Displays 2D image by translating transducer while organ is not moving
Either move transducer up and down or adjust the contact angle, making a
sweeping motion
C
f t= f
C−vcosθ o
ft – received frequency
fo – original frequency
v – velocity
c – 1500m/s2
Chapter 6
Optical Coherence Tomography
Similar to ultrasound, transmit light into tissue
Different layer reflects light
However in ultrasound, echo can be directly recorded as sound wave travel
very fast which makes the delay minimal
Light wave do not travel as fast, hence will have delay
In OCT, echo is detected by interferometry
Maximum depth of OCT is 1-2 mm
Spatial resolution: 1-10 microns
Contrast: Backscattering and polarisation
Eye: Optically transparent window until the retina
In ultrasound imaging sound waves are transmitted into the tissue and some of the
ultrasound energy gets reflected back to the transducer at tissue boundaries. This
reflected sound waves are recorded, and images are formed.
In optical coherence tomography the same principle is applied, but light waves are
used instead. Since the light travels much faster than the sound waves inside the
tissue, it is hard to capture the reflected lights using conventional electronics.
Therefore, instead of directly capturing the reflected light waves and calculating the
time of flight, an indirect method is used to calculate the depth from which they were
reflected. By using the low coherence light and interference the depth is measured.
Light vs sound
OCT can be regarded as an optical analogue of ultrasound imager
Difference between OCT and ultrasound imager comes from the difference in
wave speed
Application of OCT
OCT used to image the retina of the eye
Used to identify fovea and optic disc to observe morphology
Chapter 7
Digital Image processing (DIP)
Purpose of DIP
To improve pictorial information
Process image data for storage, transmission, and representation for
machine perception
Applications
Noise filtering
Content enhancement
o Contract enhancement
o Deblurring
Cancer detection
Key stages in DIP
1. Image acquisition
2. Image enhancement
3. Image restoration
4. Morphological processing
5. Segmentation
6. Representation and description
7. Object recognition
8. Image compression
9. Colour image processing
Image compression
An image contains a lot of redundancy that can be removed to compress the file
Examples
Interpixel redundancy
Coding redundancy
Psychovisual redundancy
Benefits of compression
Reduced storage
Reduced bandwidth
Amplitude of f at any pair of coordinates (x,y) is called the intensity or gray level
An image is called a digital image when x, y and the amplitude values of f are all
finite and discrete
Each element in the matrix is a pixel and the value of the function is the gray level
L=2 K
L – gray level
K – number of bits
Image size
B=M × X × K
Spatial and Gray Level Resolution
Spatial resolution is the smallest number of discernible line pairs per unit
Gray level resolution is the smallest discernible change in gray level
Binary images
Connectivity
3 types of adjacencies
4-adjacency: 2 pixels P and Q with values from V are 4-adjacent if Q is a 4-
neighbour of P
8-adjacency: 2 pixels P and Q with values from V are 8-adjacent if Q is a 8-
neighbour of P
M-adjacency(mixed adjacency): 2 pixels P and Q with values from V are m-
adjacent if
Q is a 4-neighbour of P, or
Q is a diagonal-neighbour of P and the overlapping 4-neighbour of Q and P
have no pixels whose values are from V
Path
A digital path from pixel P with coordinates (x,y) to pixel Q with coordinates (S,T) is
a sequence of distinct pixels with coordinates
N is length of path and pixels are connected based on the different types of
adjacencies
Region
A region of an image is a set of connected pixels
Boundary
Boundary of a region is a set of pixels in the region that have one or more
neighbours that are not in the region
Distance measures
Chapter 8
Image enhancement in the spatial domain
Spatial domain refers to the pixels composing an image
The simplest form of operator T is when the mask is a size of 1x1, output g will
only depend on value of f at (x,y) and T becomes a gray level transformation
function of the form
S=T (r )
r – variable denoting gray level of f(x,y)
s – variable denoting gray level of g(x,y)
Logarithmic transformation
S=c log (1+ r )
c – constant
assume r is positive
This transform is used to expand values of dark pixels and compress values of
bright pixels
For lower amplitudes, gray level is expanded. For higher amplitudes, gray level is
compressed
Power law map narrow range of dark inputs into wider range of output values
depending on γ value. When γ is reduced too much, image begins to reduce
contrast to the point where it looks “washed-out”
Logic operation
Arithmetic operation
Subtraction
Addition
Image subtraction
g ( x , y )=f ( x , y )−h (x , y )
Difference between two images
Obtained by computing the difference between all pairs of corresponding
pixels from f and h
Useful in enhancing differences between image
Used in mask mode radiography
Histogram of an image
Histogram of a digital image with gray levels in the range [0, L-1] is a discrete
function given by
h( r k )=nk
rk is the kth gray level
nk is number of pixels in the image that have that r k gray level
h(rk) is histogram of digital image with gray levels r k
A mask is a 2-D array in which values of the mask coefficients determine the
nature of the process
For linear spatial filtering, response is sum of products of filter coefficient and pixel
value
mn
R=∑ W i Z i
i=1
W – mask coefficient
Z – value of gray level
Median filter provide excellent noise reduction with less blurring than linear
smoothing filters of similar size
Thresholding
Thresholding is means of distinguishing pixels that have higher or lower intensity
that the set value
Detection of discontinuities
Techniques to detect 3 basic types of gray level discontinuities are
1. Points
2. Lines
3. Edges
Common way to look for discontinuities is to use a mask
mn
R=∑ W i Z i
i=1
Point detection
Mask is applied to calculate the value of the pixel and will be compared to the set
threshold value
Line detection
Masks used will have a specific coefficient configuration to detect lines along a
specific plane
The mask detects lines in that specific plane while eliminating the rest
Edge detection
Ideal edge detection
Sign of second order derivative can be used to determine whether an edge pixel
lies on the dark or bright side of an edge. Pixel in dark region will be positive while
pixel in bright region will be negative, with the zero-crossing representing the edge
[]
∂f
G
∇f= x =
[ ]
Gy
∂x
∂f
dy
Magnitude
mag ( ∇ f )=¿
Prewitt operator
Used to detect edges based on applying a horizontal and vertical filter in sequence
∇ f =¿
horizontal edge vertical edge
Sobel Operator
Creates emphasis on edges in image
∇ f =¿
2
∇ f =4 z 5−(Z 2 + Z 4 +Z 6 + Z 8)
2
∇ f =8 z 5−( Z1 + Z 2+ Z 3 +Z 4 + Z 6 + Z7 + Z 8 +Z 9 )
Chapter 9
Magnetisation
Protons, electrons, and neutrons have a spin property
1
Spin comes in multiples of and can be + or –
2
Charged particles that spin creates an electromagnetic field
MRI uses hydrogen nucleus which has a single positively charged proton
Precession
Precession – wobble about the axis of Bo field
Larmor equation describes the rate of proton pression around B o
f =γ B o
RF excitation
Radio frequency (RF) pulse is an electromagnetic wave
Before RF pulse is applied, net magnetisation M o is under external magnetic
field Bo
RF pulse introduces a new magnetic field B1 that is weaker than Bo
New precession frequency in introduced
f 1=γ B1
Energy of the RF pulse will be absorbed by proton which causes the spin
direction to change
Change in spin direction causes a shift in Mo where Mo flips into the x-y plane
The flip angle can be determined by
α =2 πγ B1 τ
τ – duration of RF pulse
If the flip angle is 90°, the RF pulse is known as 90° RF pulse and net
magnetisation vector will be denoted as Mxy
If flip angle is 180°, the RF pulse is known as 180° RF pulse and net
magnetisation vector will be denoted as -Mo
In the case of partial flip (angle less than 90°), magnetisation vector = M osinα
Resonance
If frequency of RF pulse (f1) match precession frequency of the protons (f),
resonance occurs
Resonance causes energy of the RF pulse to be absorbed by protons
Magnetic field strength
Mo is proportional the Bo
Strong magnet gives large Mo which is necessary for strong signal
Relaxation
After RF pulse is removed, magnetisation vector returns to initial alignment
with Bo
Mo exhibits spiralling pression around Bo
System releases back energy absorbed by RF pulse
Energy released as an oscillating and decaying signal, this is known as Free
Induction Decay (FID)
Transverse relaxation
Transverse relaxation acts first to cause signal to decay, this is known as
spin-spin relaxation
Influenced by random microscopic motion which cause spin to speed up or
slow down which changes the phase of other nearby spins
T2 represents time for Mxy to decay to 37% of its maximum value
Longitudinal relaxation
Longitudinal relaxation describes re-growth of M z (Mo)
T1 represents time for Mz to increase to 63% of final value
T1 is magnetic field dependent, strong magnetic field require more time to
regrow
Relaxation – part 2
Relaxation time are characterisation of the rate of spins relaxing back to
equilibrium state
T1 T2
Time constant for Mz to recover Time constant for Mxy to decay
−t −t
T1 T2
M z ( t )=M o (1−e ) M xy ( t )=M o e
∆ B – field inhomogeneities
Creating an image
3 dimensions required
o Z - direction: Use slice selection
o X – direction: Use frequency encoding
o Y – direction: Use phase encoding
Slice selection
To get slice of interest, transmit RF signal at frequency that the slice of
interest is spinning at
Only that slice will absorb energy and image can be obtained
Apply gradient Gz to Bo when the RF pulse is transmitted
Gradient will cause Larmor frequency to change and if it matches with RF
pulse, resonance can occur to get a signal
Center of slice = Bo
To calculate the frequency of the slice, use the following equation
f =γ (Bo +G z X )
γ – 42.6 MHz/T
X – distance from the center (note direction is impt)
Range of frequencies which determines the slice thickness is called
bandwidth
Now that slice has been obtained, protons spin with same phase and
frequency
Perform phase and frequency encoding
Phase encoding (Gy)
Ensure each proton has a unique phase for spatial encoding
Achieved by putting a gradient in y – direction
Before applying gradient, protons have same phase and same frequency
Gy cause protons to change phase depending on the gradient value
Pixel in top row precess faster
Pixel in middle row experience no change
Pixel in bottom row precess slower
Once Gy is off, protons will have same frequency but different phase
Phase variation is used for encoding along y – direction within a slice
Phase variation will be reflected on the spin echo and will be analysed with
Fourier transform
Frequency encoding (Gx)
Ensure each proton has unique frequency for spatial encoding
Frequency encoding is achieved by applying a field gradient in the x –
direction
Before applying gradient, protons have same frequency but different phase
due to Gy
Gx causes frequency of protons to vary depending on the gradient value
Pixel in center is not affected
Pixel in right have higher frequency
Pixel in left have lower frequency
Contrast in MRI
Contrast depends on
o T1 and T2 relaxation rates
o Proton density
o Different pulse sequence used in MRI
3 types of images
o T1 weighted (short TR and short TE)
o T2 weighted (Long TR and long TE)
o Proton density weighted image (Long TR and short TE)
T1 T2
Regrowth of Mz Decay of Mxy
T1 weighted image
Uses short TR and short TE to capture image
Short TR allows for better contrast between the various tissues as the
regrowth of Mz occurs at various speeds
Uses short TE as the decay of Mxy has not occurred as much, hence its does
not contribute to contrast
T2 weighted image
Short TE
Long TE