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][source]#
Bases:
DirectModule
Estimates sensitivity maps estimated with the ESPIRIT calibration method as described in [1].
We adapted code for ESPIRIT method adapted from [2].
References
[1]Uecker M, Lai P, Murphy MJ, Virtue P, Elad M, Pauly JM, Vasanawala SS, Lustig M. ESPIRiT–an eigenvalue approach to autocalibrating parallel MRI: where SENSE meets GRAPPA. Magn Reson Med. 2014 Mar;71(3):990-1001. doi: 10.1002/mrm.24751. PMID: 23649942; PMCID: PMC4142121.
- calculate_sensitivity_map(acs_mask, kspace)[source][source]#
Calculates sensitivity map given as input the acs_mask and the k-space.
- Parameters:
- acs_masktorch.Tensor
Autocalibration mask.
- kspacetorch.Tensor
K-space.
- Returns:
- sensitivity_maptorch.Tensor
- Return type:
Tensor
- forward(sample)[source][source]#
Forward method of
EspiritCalibration
.- Parameters:
- sample: Dict[str, Any]
Contains key kspace_key.
- Returns:
- sample: Dict[str, Any]
Contains key ‘sampling_mask’.
- Return type:
Tensor
-
training:
bool
#
direct.algorithms.optimization module#
General mathematical optimization techniques.
- class direct.algorithms.optimization.Algorithm(max_iter=30)[source][source]#
Bases:
ABC
Base class for implementing mathematical optimization algorithms.
- done()[source][source]#
Check if the algorithm has converged.
- Returns:
- bool
Whether the algorithm has converged or not.
- Return type:
bool
Module contents#
Direct module for traditional mathematical optimization techniques, general or mri-specific.