Menu

Python Sparse data Analysis Package external MRI plugin.

Note

This page is a reference documentation. It only explains the class signature, and not how to use it. Please refer to the gallery for the big picture.

class mri.reconstructors.base.ReconstructorBase(fourier_op, linear_op, regularizer_op, gradient_formulation, grad_class, init_gradient_op=True, verbose=0, **extra_grad_args)[source]

This is the base reconstructor class for reconstruction. This class holds some parameters that are common for all MR Image reconstructors.

Parameters

fourier_op : object of class FFT, NonCartesianFFT or Stacked3DNFFT in

mri.operators

Defines the fourier operator F.

linear_op : object

Defines the linear sparsifying operator W. This must operate on x and have 2 functions, op(x) and adj_op(coeff) which implements the operator and adjoint operator. For wavelets, this can be object of class WaveletN or WaveletUD2 from mri.operators

regularizer_op : operator, (optional default None)

Defines the regularization operator for the regularization function H. If None, the regularization chosen is Identity and the optimization turns to gradient descent.

gradient_formulation : str between ‘analysis’ or ‘synthesis’,

default ‘synthesis’ defines the formulation of the image model which defines the gradient.

grad_class : Gradient class from mri.operators.

Points to the gradient class based on the MR Image model and gradient_formulation.

init_gradient_op : bool, default True

This parameter controls whether the gradient operator must be initialized right now. If set to false, the user needs to call initialize_gradient_op to initialize the gradient at right time before reconstruction

verbose : int, optional default 0

Verbosity levels

1 => Print basic debug information 5 => Print all initialization information 20 => Calculate cost at the end of each iteration. 30 => Print the debug information of operators if defined by class NOTE - High verbosity (>20) levels are computationally intensive.

extra_grad_args : Extra Keyword arguments for gradient initialization

This holds the initialization parameters used for gradient initialization which is obtained from ‘grad_class’. Please refer to mri.operators.gradient.base for reference. In case of sythesis formulation, the ‘linear_op’ is also passed as an extra arg

Notes

For the Analysis case, finds the solution for x of: ..math:: (1/2) * ||F x - y||^2_2 + mu * H (W x)

For the Synthesis case, finds the solution of: ..math:: (1/2) * ||F Wt alpha - y||^2_2 + mu * H(alpha)

initialize_gradient_op(**extra_args)[source]
reconstruct(kspace_data, optimization_alg='pogm', x_init=None, num_iterations=100, cost_op_kwargs=None, **kwargs)[source]

This method calculates operator transform.

Parameters

kspace_data : np.ndarray

the acquired value in the Fourier domain. this is y in above equation.

optimization_alg : str (optional, default ‘pogm’)

Type of optimization algorithm to use, ‘pogm’ | ‘fista’ | ‘condatvu’

x_init : np.ndarray (optional, default None)

input initial guess image for reconstruction. If None, the initialization will be zero

num_iterations : int (optional, default 100)

number of iterations of algorithm

cost_op_kwargs : dict (optional, default None)

specifies the extra keyword arguments for cost operations. please refer to modopt.opt.cost.costObj for details.

kwargs : extra keyword arguments for modopt algorithm

Please refer to corresponding ModOpt algorithm class for details. https://github.com/CEA-COSMIC/ModOpt/blob/master/ modopt/opt/algorithms.py

Follow us

© 2019, Antoine Grigis Samuel Farrens Jean-Luc Starck Philippe Ciuciu