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.self_calibrating.SelfCalibrationReconstructor(fourier_op, linear_op=None, gradient_formulation='synthesis', kspace_portion=0.1, Smaps=None, smaps_extraction_mode='gridding', smaps_gridding_method='linear', n_jobs=1, verbose=0, **kwargs)[source]¶ Self Calibrating reconstruction for multi-channel acquisition. The coil sensitivity is estimated from a small portion of the k-space center and used to reconstruct the complex image.
- Parameters
fourier_op : object of class FFT, NonCartesianFFT or Stacked3DNFFT in
mri.operators
Defines the fourier operator F in the above equation.
linear_op : object, (optional, default None)
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 . If None, sym8 wavelet with nb_scale=3 is chosen.
gradient_formulation : str between ‘analysis’ or ‘synthesis’,
default ‘synthesis’ defines the formulation of the image model which defines the gradient.
kspace_portion : int or tuple (default is 0.1 in all dimension)
int or tuple indicating the k-space portion used to estimate the coil sensitivity information. if int, will be evaluated to (0.1,)*nb_dim of the image
Smaps : np.ndarray (optional, default None)
- for gradient initialization:
Please refer to mri.operators.gradient.base for information.
Sensivity maps used to initialize the gradient operator. If set to None, the maps will have to be recomputed once when calling the reconstruct method. The shape should correspond to the shape of the expected volume.
smaps_extraction_mode : string ‘FFT’ | ‘NFFT’ | ‘Stack’ | ‘gridding’ default
Defines the mode in which we would want to interpolate to extract the sensitivity information when recomputing the sensitivity maps. NOTE: FFT should be considered only if the input has been sampled on the grid
smaps_gridding_method : string ‘linear’ (default) | ‘cubic’ | ‘nearest’
For gridding mode, it defines the way interpolation must be done used by the sensitivity extraction method when recomputing the sensitivity maps.
n_jobs : int, default 1
The number of CPUs used to accelerate the 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.
**kwargs : Extra keyword arguments
- for gradient initialization:
Please refer to mri.operators.gradient.base for information.
- 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.
Notes
For the Analysis case, finds the solution for x of: ..math:: (1/2) * sum(||F Sl x - yl||^2_2, n_coils) + mu * H( W x )
For the Synthesis case, finds the solution of: ..math:: (1/2) * sum(||F Sl Wt alpha - yl||^2_2, n_coils) + mu * H (alpha)
The sensitivity information is taken to be the low-resolution of the image extracts from the k-space portion given in the parameter
-
get_smaps()[source]¶ This method returns the sensitivity maps.
- Returns
np.ndarray, None
The sensitivity maps when given or already computed, or None.
-
reconstruct(kspace_data, optimization_alg='pogm', x_init=None, num_iterations=100, recompute_smaps=True, **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
recompute_smaps : bool (optional, default False)
A boolean value to check if the Smaps must be recalculated. Note that this would recompute the lipchitz constant. This must be set to True if you want the Smaps to be updated in this reconstruction. The first reconstruction would need this to be True.
Examples¶
Follow us