Upload
others
View
1
Download
0
Embed Size (px)
Citation preview
1
Center for Fast Ultrasound ImagingDepartment of Health Technology
Reconstruction in CT and hints to the assignments
Jørgen Arendt Jensen
October 28, 2021
Center for Fast Ultrasound Imaging, Build 349Department of Health TechnologyTechnical University of Denmark
1
Center for Fast Ultrasound Imaging, Department of Health TechnologyTechnical University of Denmark
CT reconstruction repetition & hints
• Filtered backprojection algorithm–Radon transform–Filtered backprojection–Filters and their impulse
responses
• Advise for the assignments
• Reading material: Prince & Links Chapter 6
From
: W. A
. Kal
ende
r; C
ompu
ted
Tom
ogra
phy,
Pub
licis
, 200
5
2
2
Center for Fast Ultrasound Imaging, Department of Health TechnologyTechnical University of Denmark
Modern CT system generations
From
: W. A
. Kal
ende
r; C
ompu
ted
Tom
ogra
phy,
Pub
licis
, 200
5
3
Center for Fast Ultrasound Imaging, Department of Health TechnologyTechnical University of Denmark
Measurement of attenuation
From
: W. A
. Kal
ende
r; C
ompu
ter T
omog
raph
y, P
ublic
is, 2
005
4
3
Center for Fast Ultrasound Imaging, Department of Health TechnologyTechnical University of Denmark
Parallel beam projection
From
: W. A
. Kal
ende
r; C
ompu
ted
Tom
ogra
phy,
Pub
licis
, 200
5
5
Center for Fast Ultrasound Imaging, Department of Health TechnologyTechnical University of Denmark
Parallel beam projection geometry
x’
y’
x
y
Patient coordinate system
CT coordinate system
Point
fy
q
6/x
6
4
Center for Fast Ultrasound Imaging, Department of Health TechnologyTechnical University of Denmark
Radon transform
7/x
p(x ',φ) = f (x 'cos−∞
+∞
∫ φ − y 'sinφ,x 'sinφ + y 'cosφ)dy '
f(x,y) – Attenuation imagex’, y’ – Gantry coordinate systemx, y – Patient coordinate system
7
Center for Fast Ultrasound Imaging, Department of Health TechnologyTechnical University of Denmark 8/x
8
5
Center for Fast Ultrasound Imaging, Department of Health TechnologyTechnical University of Denmark 9/x
9
Center for Fast Ultrasound Imaging, Department of Health TechnologyTechnical University of Denmark 10/x
10
6
Center for Fast Ultrasound Imaging, Department of Health TechnologyTechnical University of Denmark 11/x
11
Center for Fast Ultrasound Imaging, Department of Health TechnologyTechnical University of Denmark 12/x
12
7
Center for Fast Ultrasound Imaging, Department of Health TechnologyTechnical University of Denmark 13/x
13
Center for Fast Ultrasound Imaging, Department of Health TechnologyTechnical University of Denmark
Shepp-Logan phantom
14/x
Note that the Shepp-Logan phantom isnot in Hounsfield units, but the relativescaling is the same.
14
8
Center for Fast Ultrasound Imaging, Department of Health TechnologyTechnical University of Denmark 15/x
Demo in: for_13/matlab_demo/proj_demo
15
Center for Fast Ultrasound Imaging, Department of Health TechnologyTechnical University of Denmark
Fourier slice theorem
16/x
Demo in: for_13/matlab_demo/ct_demo
16
9
Center for Fast Ultrasound Imaging, Department of Health TechnologyTechnical University of Denmark
Fourier Slice Theorem
17/x
P(ρ,φ) = p(x ',φ)e− j2πρx ' dx '−∞
+∞
∫
= F (ρ cosφ,ρ sinφ)
F(u,v) – 2D Fourier transform of imagef – Gantry rotation
17
Center for Fast Ultrasound Imaging, Department of Health TechnologyTechnical University of Denmark
Filtered Back Projection (FBP)
18/x
!𝑓 x, y – Reconstructed imagef – Gantry rotationx’ – Detector position
!𝑓 x, y = '!
"
'#$
%$
𝜌 𝑃(𝜌, 𝜙)𝑒&'"()!𝑑𝜌𝑑𝜙
18
10
Center for Fast Ultrasound Imaging, Department of Health TechnologyTechnical University of Denmark
Filtered backprojection
• Perform for all projections:• Make Fourier transform of
projected data• Apply filter in Fourier domain• Make invers transform• Back-project and sum with
previous image
19/x
19
Center for Fast Ultrasound Imaging, Department of Health TechnologyTechnical University of Denmark
Influence from number of projections
20/x
20
11
Center for Fast Ultrasound Imaging, Department of Health TechnologyTechnical University of Denmark
Ram-Lak filter
Transfer function:
ℎ 𝜌 = % ρ , ρ ≤ 𝐵0 𝑒𝑙𝑠𝑒
Impulse response
21/x
h(k) =
B2 k = 0
−B2
π2k
"
#$
%
&'2 k odd
0 k even
(
)
****
+
****
21
Center for Fast Ultrasound Imaging, Department of Health TechnologyTechnical University of Denmark
Impulse response for Ram-Lak filter
22/x
ℎ!"#$%& 𝑥 = 𝐴2𝐵sin 2𝜋𝐵 𝑥2𝜋𝐵𝑥
ℎ456758 𝑥 = 2𝐵𝐵 9:; '"<)'"<) - 𝐵' 9:;
. "<)("<)).
• Impulse response of square wave:
• Ram-Lak impulse response: square wave – triangle:
22
12
Center for Fast Ultrasound Imaging, Department of Health TechnologyTechnical University of Denmark
Sampling of impulse response for Ram-Lak filter
23/x
ℎ%$'($) 𝑘 = 2𝐵*+,- *./ !
"#
*./ !"#
- 𝐵*+,-" ./ !
"#
(./ !"#)
"
sin 2𝜋𝐵 )*/ =sin 𝜋𝑘 = 0
sin* 𝜋𝐵𝑘2𝐵 =sin
* 𝜋2 𝑘 = 1 𝑘 𝑜𝑑𝑑 𝑒𝑙𝑠𝑒 0
• Sampling at 234 = 2𝐵, 𝑥 = 𝑘 Δ𝑥 = )*/ :
• Gives:ℎ 0 = 𝐵*
ℎ 𝑘 = −𝐵*+,-" )$"()$")
" =− /"
()$")" (k odd)
ℎ 𝑘 = 0 else
23
Center for Fast Ultrasound Imaging, Department of Health TechnologyTechnical University of Denmark
Ram-Lak filter
Transfer function:
ℎ 𝜌 = % ρ , ρ ≤ 𝐵0 𝑒𝑙𝑠𝑒
Impulse response
24/x
h(k) =
B2 k = 0
−B2
π2k
"
#$
%
&'2 k odd
0 k even
(
)
****
+
****
24
13
Center for Fast Ultrasound Imaging, Department of Health TechnologyTechnical University of Denmark
Transfer function of filters – Ram-Lak
25/x
25
Center for Fast Ultrasound Imaging, Department of Health TechnologyTechnical University of Denmark
Shepp-Logan filter
Transfer function:
ℎ 𝜌 = ρ𝑠𝑖𝑛 2𝜋𝜌4𝐵2𝜋𝜌4𝐵
, ρ ≤ 𝐵
0 𝑒𝑙𝑠𝑒
Impulse response
26/x
h(k) = − 8B2
π (4k2 −1)
26
14
Center for Fast Ultrasound Imaging, Department of Health TechnologyTechnical University of Denmark
Shepp-Logan filter
27/x
27
Center for Fast Ultrasound Imaging, Department of Health TechnologyTechnical University of Denmark
Hanning weighted filter
28/x
28
15
Center for Fast Ultrasound Imaging, Department of Health TechnologyTechnical University of Denmark
Hanning weighted filter
29/x
29
Center for Fast Ultrasound Imaging, Department of Health TechnologyTechnical University of Denmark
Filter transfer functions and impulse responses
30/x
30
16
Center for Fast Ultrasound Imaging, Department of Health TechnologyTechnical University of Denmark
Comparison between filters
31/x
31
Center for Fast Ultrasound Imaging, Department of Health TechnologyTechnical University of Denmark
Circular convolution
32/x
−100 −80 −60 −40 −20 0 20 40 60 800
0.01
0.02
h(n)
Filter
−100 −80 −60 −40 −20 0 20 40 60 800
5
10
15
20
g 1(n)
Periodic time signal
−100 −80 −60 −40 −20 0 20 40 60 800
2
4
g 1(n)
Resulting periodic time signal with overlap
32
17
Center for Fast Ultrasound Imaging, Department of Health TechnologyTechnical University of Denmark
Circular convolution
33/x
−100 −80 −60 −40 −20 0 20 40 60 800
2
4
Sample number (n)
g 2(n)
Periodic time signal without overlap
−100 −80 −60 −40 −20 0 20 40 60 800
0.01
0.02h(
n)
Filter
−100 −80 −60 −40 −20 0 20 40 60 800
5
10
15
20
g 1(n)
Periodic time signal
33
Center for Fast Ultrasound Imaging, Department of Health TechnologyTechnical University of Denmark
Circular convolution – Shepp-Logan
34/x
Ideal Shepp−logan phantom, 512 x 512 pixels, Range: [0.95 1.1]
Relative x−coordinate
Rel
ativ
e y−
coor
dina
te
−3 −2 −1 0 1 2
−3
−2
−1
0
1
2
34
18
Center for Fast Ultrasound Imaging, Department of Health TechnologyTechnical University of Denmark
Backprojection
35/x
Patientgrid
Projec
tion
35
Center for Fast Ultrasound Imaging, Department of Health TechnologyTechnical University of Denmark
Data for testing and validation
• Use data sets on web site
• Circular phantom for geometry test
• Shepp-Logan for orientation and quantitative data
• In-vivo images for Hounsfield units
36/x
36
19
Center for Fast Ultrasound Imaging, Department of Health TechnologyTechnical University of Denmark
Assignment data
• DICOM data from female patient
• All data available on the web• Task is to find which slice it is
37/x
Data and program in: undervisning/k_22485_31545_billeder/ct_data/dicom_data
37
Center for Fast Ultrasound Imaging, Department of Health TechnologyTechnical University of Denmark
Reading DICOM data
38/x
% Set overall parametersdir_name='DICOM/ST00001/SE00001/'; % Directory namestart_image=1; % First image in seriesend_image=747; % Last image in seriesframe_rate=50; % Frame rate for playing back the movie
% Set the dynamic range for the displayoff_set=100; % Offset [Hu]range=400; % Range to display [Hu]map_values=128; % Number of gray level valuesbone_off_set= -250; % Offset for showing the bonesbone_range=100; % Range for showing the bones
% Initialize figurecolormap(gray(map_values));dicom_movie(end_image+1-start_image) = struct('cdata',[],'colormap',[]);
% Read information for the first imagesfile_name='IM00001';info=dicominfo([dir_name, file_name]);dx=info.PixelSpacing(1);dy=info.PixelSpacing(2);Y = dicomread(info);[Nx,Ny]=size(Y);
% Make space for all the imagesY=zeros(Nx,Ny,end_image+1-start_image);z_positions=zeros(end_image+1-start_image,1);
38
20
Center for Fast Ultrasound Imaging, Department of Health TechnologyTechnical University of Denmark 39/x
% Loop through the images and read and display them
for i=start_image:end_imagefile_name=['IM00',num2str(floor(i/100)),num2str(floor(rem(i,100)/10)),num2str(rem(i,10))];info=dicominfo([dir_name, file_name]);Y(:,:,i) = dicomread(info);image(((1:Nx)-Nx/2)*dx,((1:Ny)-Ny/2)*dy,(double(Y(:,:,i))+off_set)/range*map_values)xlabel('Distance [mm]')ylabel('Distance [mm]')pos=sprintf('%5.1f, %5.1f, %5.1f', info.ImagePositionPatient(1), …
info.ImagePositionPatient(2), info.ImagePositionPatient(3));z_positions(i)= info.ImagePositionPatient(3);text(-150, -150, ['Image ', num2str(i),', Pos. (x,y,z) = ', pos,' mm'], 'Color', [1 1 1])axis('image')drawnowdicom_movie(i)=getframe;
end
% Display the movie
movie(dicom_movie, 5, frame_rate);
Full script can be found at:
courses.healthtech.dtu.dk/22485/files/ct_data/dicom_data/display_dicom_images.m
on the page for the CT data: courses.healthtech.dtu.dk/22485/?ct_data/assign_data.html
Script in: ct_data/dicom_data
39