3D model based parameter quantification for MRI.
PyQMRI is a Python module to quantify tissue parameters given a set of MRI measurements, specifically desinged to quantify the parameter of interest. Examples include T1 quantification from variable flip angle or inversion-recovery Look-Locker data, T2 quantification using a mono-exponential fit, or Diffusion Tensor quantification. In addition, a Genereal Model exists that can be invoked using a text file containing the analytical signal equation.
See https://pyqmri.readthedocs.io/en/latest/ for a complete documentation.
Module handling the start up of the fitting procedure.
run(reg_type='TGV', slices=-1, trafo=True, streamed=False, par_slices=1, data='', model='GeneralModel', config='default', imagespace=False, sms=False, use_GPU=True, devices=0, dz=-1, weights=-1, useCGguess=True, out='', modelfile='models.ini', modelname='VFA-E1', double_precision=False, coils3D=False, is3Ddata=False, initial_guess=-1)¶
Start a 3D model based reconstruction.
Start a 3D model based reconstruction. If no data path is given, a file dialog can be used to select data at start up. If no other parameters are passed, T1 from a single slice of radially acquired variable flip angle data will be quantified.
If no config file is passed, a default one will be generated in the current folder, the script is run in.
- reg_type (str, TGV) – TGV or TV, defaults to TGV
- slices (int, 1) – The number of slices to reconsturct. Slices are picked symmetrically from the volume center. Pass -1 to select all slices available. Defaults to 1
- trafo (bool, True) – Choos between Radial (1) or Cartesian (0) FFT
- streamed (bool, False) – Toggle between streaming slices to the GPU (1) or computing everything with a single memory transfer (0). Defaults to 0
- par_slices (int, 1) – Number of slices per streamed package. Volume devided by GPU’s and par_slices must be an even number! Defaults to 1
- data (str, '') – The path to the .h5 file containing the data to reconstruct. If left empty, a GUI will open and asks for data file selection. This is also the default behaviour.
- model (str, GeneralModel) – The name of the model which should be used to fit the data. Defaults to ‘VFA’. A path to your own model file can be passed. See the Model Class for further information on how to setup your own model.
- config (str, default) – The path to the confi gfile used for the IRGN reconstruction. If not specified the default config file will be used. If no default config file is present in the current working directory one will be generated.
- imagespace (bool, False) – Select between fitting in imagespace (1) or in k-space (0). Defaults to 0
- sms (bool, False) – use Simultaneous Multi Slice Recon (1) or normal reconstruction (0). Defaults to 0
- devices (list of int, 0) – The device ID of device(s) to use for streaming/reconstruction
- dz (float, -1) – Ratio of physical Z to X/Y dimension. X/Y is assumed to be isotropic. Defaults to isotropic in 3D (dz=1).
- useCGguess (bool, True) – Switch between CG sense and simple FFT as initial guess for the images.
- out (str, '') – Output directory. Defaults to the location of the input file.
- modelpath (str, models.ini) – Path to the .mod file for the generative model.
- modelname (str, VFA-E1) – Name of the model in the .mod file to use.
- weights (list of float, -1) – Optional weights for each unknown. Defaults to -1, i.e. no additional weights are used.
- double_precision (bool, False) – Enable double precission computation.
- initial_guess (list of float, -1) – Optional initial guess for the selected model. Defaults to -1, i.e. default setting is used. Number of elements need to match the unknowns of the selected model.