Parallel Beam Model#
The ParallelBeamModel class implements a geometry and reconstruction model for parallel-beam computed tomography.
This class inherits all behaviors and attributes of the Tomography Model.
It also implements some parallel-beam specific functions such as FBP (Filtered Back Projection) reconstruction.
Note that for parallel-beam geometry the default value of delta_voxel = delta_det_channel = 1 ALU,
which results in pixel spacing that is the same as detector channel spacing.
However, these parameters can be changed by the user with the TomographyModel.set_params() method.
The spacing between slices of the reconstruction are fixed to be the same as the spacing between detector rows.
See the API docs for the TomographyModel class for details on a wide range
of functions that can be implemented using the ParallelBeamModel.
Constructor#
- class mbirjax.ParallelBeamModel(sinogram_shape, angles)[source]#
Bases:
TomographyModelA class designed for handling forward and backward projections in a parallel beam geometry, extending the Tomography Model. This class offers specialized methods and parameters tailored for parallel beam setups.
This class inherits all methods and properties from the Tomography Model and may override some to suit parallel beam geometrical requirements. See the documentation of the parent class for standard methods like setting parameters and performing projections and reconstructions.
Parameters not included in the constructor can be set using the set_params method of Tomography Model. Refer to Tomography Model documentation for a detailed list of possible parameters.
- Parameters:
sinogram_shape (tuple) – Shape of the sinogram as a tuple in the form (views, rows, channels), where ‘views’ is the number of different projection angles, ‘rows’ correspond to the number of detector rows, and ‘channels’ index columns of the detector that are assumed to be aligned with the rotation axis.
angles (jnp.ndarray) – A 1D array of projection angles, in radians, specifying the angle of each projection relative to the origin.
Examples
Initialize a parallel beam model with specific angles and sinogram shape:
>>> import mbirjax >>> angles = jnp.array([0, jnp.pi/4, jnp.pi/2]) >>> model = mj.ParallelBeamModel((180, 256, 10), angles)
See also
TomographyModelThe base class from which this class inherits.
Alternative Reconstruction#
- ParallelBeamModel.fbp_recon(sinogram, filter_name='ramp', view_batch_size=100)[source]#
Perform filtered back-projection (FBP) reconstruction on the given sinogram.
Our implementation uses standard filtering of the sinogram, then uses the adjoint of the forward projector to perform the backprojection. This is different from many implementations, in which the backprojection is not exactly the adjoint of the forward projection. For a detailed theoretical derivation of this implementation, see the zip file linked at this page: https://mbirjax.readthedocs.io/en/latest/theory.html
- Parameters:
sinogram (jax array) – The input sinogram with shape (num_views, num_rows, num_channels).
filter_name (string, optional) – Name of the filter to be used. Defaults to “ramp”
view_batch_size (int, optional) – Size of view batches (used to limit memory use)
- Returns:
recon (jax array) – The reconstructed volume after FBP reconstruction.