RTK/Scripts/FDK: Difference between revisions
Jump to navigation
Jump to search
(Created page with "<div class="floatcenter">File:sinogram.pngFile:overlay.png</div> <source lang="bash"> # Create a simulated geometry rtksimulatedgeometry.exe -n 180 -o geometry.xml ...") |
(Pictures for the 2D case) |
||
(12 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
== 3D == | |||
<source lang="bash"> | <div class="floatcenter">[[File:sinogram.png|200px]] [[File:overlay.png|200px]]</div> | ||
This script uses the file [https://data.kitware.com/api/v1/item/5b179c938d777f15ebe2020b/download SheppLogan.txt] as input. | |||
<source lang="bash" enclose="div"> | |||
# Create a simulated geometry | # Create a simulated geometry | ||
rtksimulatedgeometry | 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 | # Create projections of the phantom file | ||
rtkprojectgeometricphantom -g geometry.xml -o projections.mha --spacing 2 --dimension | rtkprojectgeometricphantom -g geometry.xml -o projections.mha --spacing 2 --dimension 256 --phantomfile SheppLogan.txt | ||
# Reconstruct | # Reconstruct | ||
rtkfdk -p . -r projections.mha -o fdk.mha -g geometry.xml --spacing 2 --dimension | rtkfdk -p . -r projections.mha -o fdk.mha -g geometry.xml --spacing 2 --dimension 256 | ||
# Create a reference volume for comparison | # Create a reference volume for comparison | ||
rtkdrawgeometricphantom --spacing 2 --dimension | rtkdrawgeometricphantom --spacing 2 --dimension 256 --phantomfile SheppLogan.txt -o ref.mha | ||
</source> | |||
== 2D == | |||
<div class="floatcenter">[[File:SheppLogan-2d-sinogram.png|200px]] [[File:SheppLogan-2d.png|200px]]</div> | |||
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> |
Latest revision as of 07:55, 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
Error creating thumbnail: File missing
Error creating thumbnail: File missing
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