% setup MRI-education-resources path and requirements
cd ../
startup
loading image
loading signal
Artifacts#
This notebook includes a simulation of various MRI artifacts, as well as a high-level Artifact Comparison below. The wikipedia entry https://en.wikipedia.org/wiki/MRI_artifact is also very comprehensive.
Learning Goals#
Identify artifacts and how to mitigate them
Introduction#
Many of the artifacts that occur in MRI can be understood and analyzed using the k-space perspective. In particular, they can be understood as the k-space data being modified by some function. This is described mathematically in MRI Signal Equation and K-space in the K-space Data Weighting section.
Artifact Comparison#
MRI artifacts can generally be categorized as originating from the sample, the sequence, or the system (Source in table below). The table below provides a high-level comparison of these artifacts.
Artifact Name |
Source |
Appearance |
What to do? |
Frequency or Phase encoding |
---|---|---|---|---|
Aliasing |
Sequence - FOV too small |
Signal folds across image |
Increase FOV, swap PE/FE |
Phase encoding |
Gibbs Ringing/Truncation |
Sequence - due to Fourier encoding of edges |
Ripples/ringing at sharp edges |
Filtering of data |
N/A |
Boundary Artifacts/Partial Volume |
Sequence and Sample - opposite \(M_{XY}\) phases with a voxel due to inversion or chemical shift |
Artificial dark lines at tissue boundaries |
fat suppresion, fat/water imaging |
N/A |
Motion/Flow |
Sample - signal modulated during spatial encoding |
Copies or “Ghosts” of image regions that are changing due to motion or flow |
Breath-hold, gating, triggering, flow compensation, swap PE/FE |
Phase encoding |
Image Displacement/Distortion |
Sample - chemical shift (fat) and off-resonance (e.g. magnetic susceptibility differences) |
Shifts in image |
Increase bandwidths, shimming, fat suppression, fat/water imaging, swap PE/FE |
Frequency encoding (2DFT), Phase encoding (EPI) |
Slice Displacement |
Sample chemical shift (fat) and off-resonance (e.g. magnetic susceptibility differences) |
Slice location shifts |
Increase RF bandwidth, shimming, 3D |
N/A |
T2* |
Sample - magnetic suscpetibility differences (e.g. implants, air) |
Signal loss |
Spin-echo, shimming |
N/A |
Dielectric Shading |
System - RF propogates unevenly, creating B1 inhomogeneity |
Shading across entire image, particularly large FOV, higher B0 |
B1-insensitive pulse sequences (e.g. adiabatic pulses), image bias correction |
N/A |
RF interference/Zipper |
System - unwanted RF signal in data |
Line of noisy signal on top of image |
RF shielding (close door), check RF hardware, check room lights |
At a specific frequency encoding location |
Gradient non-linearity |
System - magnetic field gradients are not linear, especially away from isocenter |
Distortion of subject, particularly near edges of large FOV |
Gradient warping correction |
N/A |
Spike Noise |
System - intermittent unwanted signal |
Specific spatial frequency on top of entire image |
check RF hardware (loose connections, broken components) |
N/A |
Displacement Artifacts#
Since MRI relies on frequency to encode spatial information, unknown frequency shifts can lead to disortions of the image. These frequency shifts are due to chemical shift (e.g. fat) and/or off-resonance (e.g. main field inhomogeneities, susceptibility differences).
There will be a shift during frequency encoding of
where \(\Delta f\) is the frequency shift, \(RBW\) is the receiver bandwidth, and \(FOV_{FE}\) is the field of view in the frequency encoding direction.
During EPI, there is typically a much larger shift in the phase encoding direction that depends on the echo spacing, \(t_{esp}\). For simplicity, I convert the echo spacing into a “phase encoding bandwidth”, \(BW_{PE} = 1/t_{esp}\):
where \(N_{interleaves}\) is the number of interleaves that can be used to reduce the displacement.
Finally, there will also be a displacement of the slice selection, and this will be
where \(BW_{rf}\) is the slice select pulse bandwidth.
Motion and Flow Artifacts#
Motion, including flow, can result in artifacts in MRI if it leads to inconsistency in the data.
Periodic motion such as breathing, heart beating, and pulsatile flow will lead to distinct ghosting artifacts in the phase encoding direction. The location of ghosting artifacts in sequential phase encoding, will be at predictable intervals in the phase encoding direction:
where \(T_{motion}\) is the period of the motion (e.g. \(T_{motion} = 1 s\) for a heart rate of 60 beats per minute ).
Incoherent or more random motion such as irregular breathing, arrhytthmias, coughing, bulk motion will lead to more diffuse ghosting artifacts.
Simulations of Artifacts#
% load k-space data
dataname = 'Data/se_t1_sag_data';
load(dataname)
kdata = data;
S = size(kdata);
im_original = ifft2c(kdata);
subplot(121)
imagesc(log(abs(kdata)), [0 max(log(abs(kdata(:))))])
colormap(gray), axis equal tight off
subplot(122)
imagesc(abs(im_original), [0 max(abs(im_original(:)))])
colormap(gray), axis equal tight off
warning: load: 'C:\Users\PLarson\Documents\GitHub\MRI-education-resources\Data\se_t1_sag_data.mat' found by searching load path
%% aliasing
N_undersamp = 2; % >= 1
data_undersamp = zeros(size(kdata));
Iundersamp = 1:N_undersamp:S(1);
data_undersamp(round(Iundersamp),:) = kdata(round(Iundersamp),:);
im_undersamp = ifft2c(data_undersamp);
subplot(121)
imagesc(log(abs(data_undersamp)), [0 max(log(abs(kdata(:))))])
colormap(gray), axis equal tight off
subplot(122)
imagesc(abs(im_undersamp), [0 max(abs(im_original(:)))])
colormap(gray), axis equal tight off
%% spike noise
spike_location = [.6 .53];
data_spike = zeros(size(kdata));
data_spike(round(S(1)*spike_location(1)), round(S(2)*spike_location(2))) = max(kdata(:))/1.5;
im_spike = ifft2c(kdata + data_spike);
subplot(121)
imagesc(log(abs(kdata + data_spike)), [0 max(log(abs(kdata(:))))])
colormap(gray), axis equal tight off
subplot(122)
imagesc(abs(im_spike), [0 max(abs(im_original(:)))])
colormap(gray), axis equal tight off
%% Ringing (with rect object)
N = 32;
kx = [-N/2:N/2-1]/N;
N_rect = N/2+2;
kdata = sinc(kx *N_rect).' * sinc(kx *N_rect);
rect_ringing = ifft2c(kdata);
subplot(221)
imagesc((abs(kdata)), [0 (1)])
colormap(gray), axis equal tight off
subplot(222)
imagesc(abs(rect_ringing), [0 max(abs(rect_ringing(:)))])
colormap(gray), axis equal tight off
ylabel('Ringing')
kdata_windowed = kdata .* (hamming(N) * hamming(N).');
rect_windowed = ifft2c(kdata_windowed);
subplot(223)
imagesc((abs(kdata_windowed)), [0 (1)])
colormap(gray), axis equal tight off
subplot(224)
imagesc(abs(rect_windowed), [0 max(abs(rect_windowed(:)))])
colormap(gray), axis equal tight off
ylabel('Windowed')
%% RF interference
relative_RF_frequency = 0.6;
%single frequency, phase modulated
ph_int = pi*rand(S(1),1);
rfint = exp(i*2*pi* [1:S(1)] *relative_RF_frequency/2 ) * max(abs(kdata(:)))/S(1)/1.5;
data_rfint = repmat(rfint, [S(1), 1]) .* repmat(exp(i*ph_int), [1, S(2)]);
im_rfint = ifft2c(kdata + data_rfint);
figure
subplot(121)
imagesc(log(abs(kdata + data_rfint)), [0 max(log(abs(kdata(:))))])
colormap(gray), axis equal tight off
subplot(122)
imagesc(abs(im_rfint), [0 max(abs(im_original(:)))])
colormap(gray), axis equal tight off
% RF interference -simulate amplitude modulated interference
relative_RF_frequency = 0.2;
rfint = exp(i*2*pi* [1:S(1)]/S(1) * S(1)*relative_RF_frequency/2) * max(abs(kdata(:)))/S(1)/3;
data_rfint = randn(S(1),1) * rfint;
im_rfint = ifft2c(kdata + data_rfint);
figure
subplot(121)
imagesc(log(abs(kdata + data_rfint)), [0 max(log(abs(kdata(:))))])
colormap(gray), axis equal tight off
subplot(122)
imagesc(abs(im_rfint), [0 max(abs(im_original(:)))])
colormap(gray), axis equal tight off
% RF interference - simulate frequency modulated interference
relative_RF_frequency = 1;
f = randn(S(1),1)*relative_RF_frequency/2;
data_rfint = exp(i*2*pi* f*[1:S(1)]/S(1) ) * max(abs(kdata(:)))/S(1)/1.5;
im_rfint = ifft2c(kdata + data_rfint);
figure
subplot(121)
imagesc(log(abs(kdata + data_rfint)), [0 max(log(abs(kdata(:))))])
colormap(gray), axis equal tight off
subplot(122)
imagesc(abs(im_rfint), [0 max(abs(im_original(:)))])
colormap(gray), axis equal tight off