User API#
Most functions can be accessed by importing mbirjax and creating a model or through mbirjax directly. Most commonly used functions are described below. See Demos and FAQs for examples.
Geometry Models#
The first step is to create an instance with a specific geometry. This is done by initializing one of the following geometry classes:
|
A class designed for handling forward and backward projections in a parallel beam geometry, extending the TomographyModel. |
|
A class designed for handling forward and backward projections in a cone beam geometry, extending the TomographyModel. |
Reconstruction and Projection#
Each geometry class is derived from TomographyModel, which includes a number of powerful methods listed below for manipulating sinograms and reconstructions. Detailed documentation for each geometry class is provided in ParallelBeamModel and ConeBeamModel.
Note that ParallelBeamModel also includes fbp_recon
and ConeBeamModel includes fdk_recon
for direct (non-iterative) reconstruction in the case of many views and low-noise data.
|
Perform MBIR reconstruction using the Multi-Granular Vector Coordinate Descent algorithm. |
Scale the recon shape by the given factors. |
|
|
Proximal Map function for use in Plug-and-Play applications. |
Perform a full forward projection at all voxels in the field-of-view. |
|
|
Perform a full back projection at all voxels in the field-of-view. |
Compute the optional weights used in MBIR reconstruction. |
|
|
Generates the weights used for reducing metal artifacts in MBIR reconstruction. |
Generates a simplified, low-dynamic range version of the 3D Shepp-Logan phantom. |
Saving and Loading#
Saving and loading are implemented in TomographyModel, with methods overridden in geometry-specific models as needed.
|
Save parameters to yaml file. |
|
Construct a TomographyModel (or a subclass) from parameters saved using to_file() |
Parameter Handling#
See the Primary Parameters page for a description of the primary parameters. Parameter handling uses the following primary methods.
|
Updates parameters using keyword arguments. |
Get the values of the listed parameter names from the internal parameter dict. |
|
Prints out the parameters of the model. |
Preprocessing#
Preprocessing functions are implemented in Preprocess utilities. This includes various methods to compute and correct the sinogram data as needed. The following are functions specific to NSI scanners. See demo_nsi.py in the mbirjax_applications repo.
Load NSI sinogram data and prepare all needed arrays and parameters for a ConeBeamModel reconstruction. |
|
|
Load the object scan, blank scan, dark scan, view angles, defective pixel information, and geometry parameters from an NSI scan directory. |
The remaining functions can be used for multiple types of scan data.
|
Compute sinogram from object, blank, and dark scans. |
Interpolates defective sinogram entries with the mean of neighboring pixels. |
|
|
Correct sinogram data and weights to account for detector rotation. |
Estimate background offset of a sinogram using JAX for GPU acceleration. |