direct.algorithms package#
Submodules#
direct.algorithms.mri_algorithms module#
This module contains mathematical optimization techniques specific to MRI.
- class direct.algorithms.mri_algorithms.EspiritCalibration(backward_operator, threshold=0.05, kernel_size=6, crop=0.95, max_iter=100, kspace_key=KspaceKey.MASKED_KSPACE)[source]#
Bases:
DirectModuleEstimates sensitivity maps estimated with the ESPIRIT calibration method as described in [1].
We adapted code for ESPIRIT method adapted from [2].
References:
- __init__(backward_operator, threshold=0.05, kernel_size=6, crop=0.95, max_iter=100, kspace_key=KspaceKey.MASKED_KSPACE)[source]#
Inits
EspiritCalibration.- Parameters:
backward_operator (
Callable) – The backward operator, e.g. some form of inverse FFT (centered or uncentered).threshold (
float) – Threshold for the calibration matrix. Default:0.05.kernel_size (
int) – Kernel size for the calibration matrix. Default:6.crop (
float) – Output eigenvalue cropping threshold. Default:0.95.max_iter (
int) – Power method iterations. Default:100.kspace_key (
KspaceKey) – K-space key. Default:KspaceKey.MASKED_KSPACE.
- calculate_sensitivity_map(acs_mask, kspace)[source]#
Calculates sensitivity map given as input the
acs_maskand thekspace.- Parameters:
acs_mask (
Tensor) – Autocalibration mask.kspace (
Tensor) – K-space.
- Return type:
Tensor- Returns:
Sensitivity map.
- forward(sample)[source]#
Forward method of
EspiritCalibration.- Parameters:
sample (
Dict[str,Any]) – Contains keykspace_key.- Return type:
Tensor- Returns:
Sensitivity map tensor.
direct.algorithms.optimization module#
General mathematical optimization techniques.
- class direct.algorithms.optimization.Algorithm(max_iter=30)[source]#
Bases:
ABCBase class for implementing mathematical optimization algorithms.
- update()[source]#
Update the algorithm’s parameters and increment the iteration count.
- Return type:
None
- class direct.algorithms.optimization.MaximumEigenvaluePowerMethod(forward_operator, norm_func=None, max_iter=30)[source]#
Bases:
AlgorithmA class for solving the maximum eigenvalue problem using the Power Method.
- __init__(forward_operator, norm_func=None, max_iter=30)[source]#
Inits
MaximumEigenvaluePowerMethod.- Parameters:
forward_operator (
Callable) – The forward operator for the problem.norm_func (
Optional[Callable]) – An optional function for normalizing the eigenvector. Default:None.max_iter (
int) – Maximum number of iterations to run the algorithm. Default:30.
Module contents#
Direct module for traditional mathematical optimization techniques, general or mri-specific.