mbircone.laminography
Functions:
|
Compute MBIR reconstruction for parallel-beam laminography geometry. |
|
Compute forward projection for parallel-beam laminography geometry. |
- mbircone.laminography.project_lamino(image, angles, theta, num_det_rows, num_det_channels, delta_det_channel=1.0, delta_det_row=1.0, delta_pixel_image=None, det_channel_offset=0.0, image_slice_offset=0.0, num_threads=None, verbose=1, lib_path='/home/docs/.cache/mbircone')[source]
Compute forward projection for parallel-beam laminography geometry.
- Parameters:
image (float, ndarray) – 3D image to be projected, with shape (num_img_slices, num_img_rows, num_img_cols).
angles (float, ndarray) – 1D array of view angles in radians.
theta (float) – Angle in radians that source-detector line makes with the object vertical axis.
num_det_rows (int) – Number of rows in laminography sinogram data.
num_det_channels (int) – Number of channels in laminography sinogram data.
delta_det_channel (float, optional) – [Default=1.0] Detector channel spacing in \(ALU\).
delta_det_row (float, optional) – [Default=1.0] Detector row spacing in \(ALU\).
delta_pixel_image (float, optional) – [Default=None] Image pixel spacing in \(ALU\). If None, automatically set to
delta_det_channel
.det_channel_offset (float, optional) – [Default=0.0] Distance in \(ALU\) from center of detector to the detector z-axis along a row. (Note: There is no
det_row_offset
parameter; due to the parallel beam geometry such a parameter would be redundant with image_slice_offset.)image_slice_offset (float, optional) – [Default=0.0] Vertical offset of the image in units of \(ALU\).
num_threads (int, optional) – [Default=None] Number of compute threads requested when executed. If None,
num_threads
is set to the number of cores in the system.verbose (int, optional) – [Default=1] Possible values are {0,1,2}, where 0 is quiet, 1 prints minimal reconstruction progress information, and 2 prints the full information.
lib_path (str, optional) – [Default=~/.cache/mbircone] Path to directory containing library of forward projection matrices.
- Returns:
(float, ndarray) – 3D laminography sinogram with shape (num_views, num_det_rows, num_det_channels).
- mbircone.laminography.recon_lamino(sino, angles, theta, weights=None, weight_type='unweighted', init_image=0.0, prox_image=None, num_image_rows=None, num_image_cols=None, num_image_slices=None, delta_det_channel=1.0, delta_det_row=1.0, delta_pixel_image=None, det_channel_offset=0.0, image_slice_offset=0.0, sigma_y=None, snr_db=40.0, sigma_x=None, sigma_p=None, p=1.2, q=2.0, T=1.0, num_neighbors=6, sharpness=0.0, positivity=True, max_resolutions=None, stop_threshold=0.2, max_iterations=100, NHICD=False, num_threads=None, verbose=1, lib_path='/home/docs/.cache/mbircone')[source]
Compute MBIR reconstruction for parallel-beam laminography geometry.
- Parameters:
sino (float, ndarray) – 3D laminography sinogram data with shape (num_views, num_det_rows, num_det_channels).
angles (float, ndarray) – 1D array of view angles in radians.
theta (float) – Angle in radians that source-detector line makes with the object vertical axis.
weights (float, ndarray, optional) – [Default=None] 3D weights array with same shape as
sino
. Ifweights
is not supplied, thencone3D.calc_weights
is used to set weights usingweight_type
. weights=0.0 indicates an invalid sinogram entry insino
.weight_type (string, optional) – [Default=’unweighted’] Type of noise model used for data.
'unweighted'
corresponds to unweighted reconstruction;'transmission'
is the correct weighting for transmission CT with constant dosage;'transmission_root'
is commonly used with transmission CT data to improve image homogeneity;'emission'
is appropriate for emission CT data.
init_image (float, ndarray, optional) – [Default=0.0] Initial value of reconstruction image, specified by either a scalar value or a 3D numpy array with shape (num_img_slices, num_img_rows, num_img_cols).
prox_image (float, ndarray, optional) – [Default=None] 3D proximal map input image with shape (num_img_slices, num_img_rows, num_img_cols).
num_image_rows (int, optional) – [Default=None] Number of rows in reconstructed image. If None, automatically set by
laminography.auto_image_rows_cols
.num_image_cols (int, optional) – [Default=None] Number of columns in reconstructed image. If None, automatically set by
laminography.auto_image_rows_cols
.num_image_slices (int, optional) – [Default=None] Number of slices in reconstructed image. If None, automatically set by
laminography.auto_image_slices
.delta_det_channel (float, optional) – [Default=1.0] Detector channel spacing in \(ALU\).
delta_det_row (float, optional) – [Default=1.0] Detector row spacing in \(ALU\).
delta_pixel_image (float, optional) – [Default=None] Image pixel spacing in \(ALU\). If None, automatically set to
delta_det_channel
.det_channel_offset (float, optional) – [Default=0.0] Distance in \(ALU\) from center of detector to the detector z-axis along a row. (Note: There is no
det_row_offset
parameter; due to the parallel beam geometry such a parameter would be redundant with image_slice_offset.)image_slice_offset (float, optional) – [Default=0.0] Vertical offset of the image in units of \(ALU\).
sigma_y (float, optional) – [Default=None] Forward model regularization parameter. If None, automatically set with
cone3D.auto_sigma_y
.snr_db (float, optional) – [Default=40.0] Assumed signal-to-noise ratio of the data in \(dB\). Ignored if
sigma_y
is not None.sigma_x (float, optional) – [Default=None] qGGMRF prior model regularization parameter. If None, automatically set with
cone3D.auto_sigma_x
as a function ofsharpness
. Ifprox_image
is given,sigma_p
is used instead ofsigma_x
in the reconstruction.sigma_p (float, optional) – [Default=None] Proximal map regularization parameter. If None, automatically set with
cone3D.auto_sigma_p
as a function ofsharpness
. Ignored ifprox_image
is None.p (float, optional) – [Default=1.2] Scalar value in range \([1,2]\) that specifies qGGMRF shape parameter.
q (float, optional) – [Default=2.0] Scalar value in range \([p,1]\) that specifies qGGMRF shape parameter.
T (float, optional) – [Default=1.0] Scalar value \(>0\) that specifies the qGGMRF threshold parameter.
num_neighbors (int, optional) – [Default=6] Possible values are \({26,18,6}\). Number of neighbors in the qGGMRF neighborhood. More neighbors results in a better regularization but a slower reconstruction.
sharpness (float, optional) – [Default=0.0] Sharpness of reconstruction.
sharpness=0.0
is neutral;sharpness>0
increases sharpness;sharpness<0
reduces sharpness. Used to calculatesigma_x
andsigma_p
. Ignored ifsigma_x
is not None in qGGMRF mode, or ifsigma_p
is not None in proximal map mode.positivity (bool, optional) – [Default=True] Determines if positivity constraint will be enforced.
max_resolutions (int, optional) – [Default=None] Integer \(\geq 0\) that specifies the maximum number of grid resolutions used to solve MBIR reconstruction problem. If None, automatically set by
cone3D.auto_max_resolutions
.stop_threshold (float, optional) – [Default=0.2] Relative update stopping threshold, in percent, where relative update is given by (average value change) / (average voxel value).
max_iterations (int, optional) – [Default=100] Maximum number of iterations before stopping.
NHICD (bool, optional) – [Default=False] If True, uses non-homogeneous ICD updates.
num_threads (int, optional) – [Default=None] Number of compute threads requested when executed. If None, this is set to the number of cores in the system.
verbose (int, optional) – [Default=1] Possible values are {0,1,2}, where 0 is quiet, 1 prints minimal reconstruction progress information, and 2 prints the full information.
lib_path (str, optional) – [Default=~/.cache/mbircone] Path to directory containing library of forward projection matrices.
- Returns:
(float, ndarray) – 3D laminography reconstruction image with shape (num_img_slices, num_img_rows, num_img_cols) in units of \(ALU^{-1}\).