RTK/Scripts/FDK: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
(2D FDK reconstruction) |
||
Line 1: | Line 1: | ||
== 3D == | |||
<div class="floatcenter">[[File:sinogram.png|200px]] [[File:overlay.png|200px]]</div> | <div class="floatcenter">[[File:sinogram.png|200px]] [[File:overlay.png|200px]]</div> | ||
Line 16: | Line 18: | ||
# Create a reference volume for comparison | # Create a reference volume for comparison | ||
rtkdrawgeometricphantom --spacing 2 --dimension 256 --phantomfile SheppLogan.txt -o ref.mha | rtkdrawgeometricphantom --spacing 2 --dimension 256 --phantomfile SheppLogan.txt -o ref.mha | ||
</source> | |||
== 2D == | |||
The same reconstruction can be performed using the original 2D Shepp-Logan phantom. RTK can perform 2D reconstructions through images wide of 1 pixel in the y direction. | |||
The following script performs the same reconstruction as above in a 2D environment and uses [[:File:SheppLogan-2d.txt|the 2D Shepp-Logan phantom]] as input. | |||
<source lang="bash" enclose="div"> | |||
# Create a simulated geometry | |||
rtksimulatedgeometry -n 180 -o geometry.xml | |||
# Create projections of the phantom file | |||
# Note the sinogram being 3 pixels wide in the y direction to allow back-projection interpolation in a 2D image | |||
rtkprojectgeometricphantom -g geometry.xml -o projections.mha --spacing 2 --dimension=512,3,512 --phantomfile SheppLogan-2d.txt --phantomscale=256,1,256 | |||
# Reconstruct | |||
rtkfdk -p . -r projections.mha -o fdk.mha -g geometry.xml --spacing 2 --dimension 256,1,256 | |||
# Create a reference volume for comparison | |||
rtkdrawgeometricphantom --spacing 2 --dimension=256,1,256 --phantomfile SheppLogan-2d.txt -o ref.mha --phantomscale=256,1,256 | |||
</source> | </source> |
Revision as of 06:58, 20 May 2019
3D
Error creating thumbnail: File missing
Error creating thumbnail: File missing
This script uses the file SheppLogan.txt as input.
# Create a simulated geometry
rtksimulatedgeometry -n 180 -o geometry.xml
# You may add "--arc 200" to make the scan short or "--proj_iso_x 200" to offset the detector
# Create projections of the phantom file
rtkprojectgeometricphantom -g geometry.xml -o projections.mha --spacing 2 --dimension 256 --phantomfile SheppLogan.txt
# Reconstruct
rtkfdk -p . -r projections.mha -o fdk.mha -g geometry.xml --spacing 2 --dimension 256
# Create a reference volume for comparison
rtkdrawgeometricphantom --spacing 2 --dimension 256 --phantomfile SheppLogan.txt -o ref.mha
2D
The same reconstruction can be performed using the original 2D Shepp-Logan phantom. RTK can perform 2D reconstructions through images wide of 1 pixel in the y direction. The following script performs the same reconstruction as above in a 2D environment and uses the 2D Shepp-Logan phantom as input.
# Create a simulated geometry
rtksimulatedgeometry -n 180 -o geometry.xml
# Create projections of the phantom file
# Note the sinogram being 3 pixels wide in the y direction to allow back-projection interpolation in a 2D image
rtkprojectgeometricphantom -g geometry.xml -o projections.mha --spacing 2 --dimension=512,3,512 --phantomfile SheppLogan-2d.txt --phantomscale=256,1,256
# Reconstruct
rtkfdk -p . -r projections.mha -o fdk.mha -g geometry.xml --spacing 2 --dimension 256,1,256
# Create a reference volume for comparison
rtkdrawgeometricphantom --spacing 2 --dimension=256,1,256 --phantomfile SheppLogan-2d.txt -o ref.mha --phantomscale=256,1,256