src.wrappers package
Submodules
src.wrappers.OsipiBase module
- class src.wrappers.OsipiBase.OsipiBase(bvalues=None, thresholds=None, bounds=None, initial_guess=None, algorithm=None, **kwargs)[source]
Bases:
object
The base class for OSIPI IVIM fitting
- osipi_accepted_dimensions()[source]
The array of accepted dimensions e.g. (1D, 2D, 3D, 4D, 5D, 6D) (True, True, False, False, False, False)
- osipi_check_required_initial_guess()[source]
Checks if input initial guess fulfil the algorithm requirements
- osipi_check_required_thresholds()[source]
Checks if the number of input thresholds fulfil the algorithm requirements
- osipi_fit(data, bvalues=None, **kwargs)[source]
Fits the data with the bvalues Returns [S0, f, Dstar, D]
- osipi_initiate_algorithm(algorithm, **kwargs)[source]
Turns the class into a specified one by the input. This method can be used instead of specifically importing that class and initiating it.
WIP: Add args and kwargs!
- Args:
algorithm (string): The name of the algorithm, should be the same as the file in the src/standardized folder without the .py extension.
- osipi_print_requirements()[source]
Prints the requirements of the algorithm. Attributes that are currently checked for are: required_bvalues (int):
The lowest number of b-values required.
- required_thresholds (array-like)
1D array-like of two ints [least number of b-value thresholds, most number of b-value_thresholds].
- required_bounds (bool):
Whether bounds are required or not.
- required_bounds_optional (bool):
Whether bounds are optional or not
- required_initial_guess (bool):
Whether an initial guess is required or not.
- required_initial_guess_optional (bool):
Whether an initial guess is optional or not.
src.wrappers.ivim_fit module
- src.wrappers.ivim_fit.ivim_fit(authors=None, signals=None, bvalues=None, data=None, initial_guess=None, bounds=None)[source]
wrapper function to use OSIPI code contributions for IVIM fit :param author: str, can be one of [] :param signals: numpy array containing signal intensities :param bvalues: numpy array containing corresponding b-values :param data: object containing signals and bvalues :param initial_guess: list of initial parameter estimates :param bounds: list containing list of lower parameter bounds and list of upper parameter bounds :return: numpy array of shape (signals.size, 4) with the D, Dp, f, S0 per voxel.