Geometry viewerΒΆ

rtkshowgeometry is a Python-only command line tool which provides an interactive three-dimensional (3D) visualization of RTK geometry files, projections and volumes using pyvista. It is useful for visually assessing a geometry, i.e., how it relates the CT image with the projection images by displaying the source positions and the projections positions and orientations in a 3D scene.

geom

All geometries described in the documentation are supported: cone-beam and parallel (SDD = 0), flat and cylindrical (RadiusCylindricalDetector > 0) detectors. If no projections are given, the detector size defaults to 40% of the Source-to-Isocenter Distance (SID) and is centered around point (u,v)=(0,0).

# Create a simulated geometry
rtksimulatedgeometry -n 180 -o geometry.xml

# Create projections of the phantom file
rtkprojectshepploganphantom -g geometry.xml -o projections.mha --spacing 2 --dimension 256

# Reconstruct
rtkfdk -p . -r projections.mha -o fdk.mha -g geometry.xml --spacing 2 --dimension 256

# Show geometry
rtkshowgeometry -p . -r projections.mha --geometry geometry.xml  --input fdk.mha --show_trajectory