Scan Geometry
The following types and functions describe the creation of scan geometries for the simulation.
ComputedTomography.BeamComputedTomography.FanBeamComputedTomography.ParallelBeamComputedTomography.ScanGeometryComputedTomography.generateComputedTomography.generate_from_baseline
ComputedTomography.Beam — TypeBeamA data structure representing a single X-ray beam direction.
Fields
source::Tuple{Float64, Float64}, the source position of an X-ray beam in 2D space specified by a pair (x, y) that assumes an (absolute) underlying Cartesian coordinate system.direction::Tuple{Float64, Float64}, the direction of the beam in 2D space specified by a pair (x, y) that assuming an (absolute) underlying Cartesian coordinate system.
ComputedTomography.FanBeam — TypeFanBeam <: ScanGeometryA data structure specifying a 2-dimensional fan beam scan geometry. The scan geometry is assumed to generate a fan shape that is then rotated around the object being scanned.
Fields
angle::Float64, a value in[0, π]that specifies the angle (radians) of the fan beam.num_sources::Int64`, the number of beams emanating from the source.rotation_step::Float64, a value in(0, π)that specifies the amount the source is rotated in a single increment around the object being scanned in radians.
ComputedTomography.ParallelBeam — TypeParallelBeam <: ScanGeometryA data structure specifying a 2-dimensional parallel beam scan geometry. The scan geometry is a parallel set of beams. These are then rotated around the object being scanned.
Fields
width_ratio::Float64, a value in[0, 1]that specifies the width of the distance between the two furtherest sources (along the secant) as a fraction of the width of the diameter of rotation.num_sources::Int64, the number of sources spread out along the indicated width ratio.rotation_step::Float64, a value in(0, π)that specifies the amount the source is rotated in a single increment around the object being scanned in radians.
ComputedTomography.ScanGeometry — TypeScanGeometryAn abstract type representing a scan geometry used in the CT simulation.
ComputedTomography.generate — Methodgenerate(geometry::G, radius::Float64) where G<:ScanGeometryDetermines the source positions and beam directions of the scan geometry specified by geometry and the radius of rotation specified by radius.
Arguments
geometry<:ScanGeometry, the scan geometry for which to generate the beams.radius::Float64, the radius of rotation around the object being scanned. This value must be positive and cannot be zero.
Returns
::Vector{Beam}, a vector ofBeamobjects representing the source positions and beam directions of the scan geometry.
Throws
DomainError, if the radius of rotation is not positive.
ComputedTomography.generate_from_baseline — Methodgenerate_from_baseline(
baseline_x_positions::Vector{Float64},
baseline_y_positions::Vector{Float64},
baseline_x_directions::Vector{Float64},
baseline_y_directions::Vector{Float64},
rotation_angles::Vector{Float64},
)Generates a vector of Beam objects from the baseline positions and directions by rotating the baselines through the angles specified in rotation_angles.