AFQ.tasks.data#
Attributes#
Functions#
|
|
|
DWI data as an ndarray for selected b values, |
|
full path to a nifti file containing the mean b0 |
|
full path to a nifti file containing the T1w over mean b0 |
|
full path to a nifti file containing the |
|
DTI TensorFit object |
|
full path to a nifti file containing parameters |
|
Free-water DTI TensorFit object |
|
Full path to a nifti file containing parameters |
|
DKI DiffusionKurtosisFit object |
|
full path to a nifti file containing |
|
Mean Signal DKI DiffusionKurtosisFit object |
|
full path to a nifti file containing |
|
full path to a nifti file containing |
|
full path to a nifti file containing |
|
full path to a nifti file containing |
|
full path to a nifti file containing |
|
full path to a nifti file containing |
|
full path to a nifti file containing |
|
full path to a nifti file containing |
|
full path to a nifti file containing |
|
full path to a nifti file containing |
|
ODF for the RUMBA-SD model, |
|
full path to a nifti file containing |
|
full path to a nifti file containing |
|
full path to a nifti file containing |
|
full path to a nifti file containing |
|
full path to a nifti file containing |
|
full path to a nifti file containing |
|
full path to a nifti file containing the Free-water DTI fractional |
|
full path to a nifti file containing the Free-water DTI mean diffusivity |
|
full path to a nifti file containing the Free-water DTI free water fraction |
|
full path to a nifti file containing |
|
Image of first element in the DTI tensor according to DIPY convention |
|
full path to a nifti file containing |
|
full path to a nifti file containing |
|
full path to a nifti file containing |
|
full path to a nifti file containing |
|
full path to a nifti file containing |
|
full path to a nifti file containing |
|
Image of first element in the DKI kurtosis model, |
|
Image of first element in the DTI tensor from DKI, |
|
full path to a nifti file containing |
|
full path to a nifti file containing |
|
full path to a nifti file containing |
|
full path to a nifti file containing |
|
full path to a nifti file containing |
|
full path to a nifti file containing |
|
full path to a nifti file containing |
|
full path to a nifti file containing |
|
full path to a nifti file containing |
|
full path to a nifti file containing |
|
full path to a nifti file containing |
|
full path to a nifti file containing |
|
full path to a nifti file containing |
|
full path to a nifti file containing |
|
full path to a nifti file containing the brain mask |
|
Dictionary defining the different bundles to be segmented, |
|
Module Contents#
- AFQ.tasks.data.get_data_gtab(dwi_data_file, bval_file, bvec_file, min_bval=-np.inf, max_bval=np.inf, b0_threshold=50)[source]#
DWI data as an ndarray for selected b values, A DIPY GradientTable with all the gradient information, DWI data in a Nifti1Image, and the affine transformation of the DWI data
- Parameters:
- min_bvalfloat, optional
Minimum b value you want to use from the dataset (other than b0), inclusive. If None, there is no minimum limit. Default: -np.inf
- max_bvalfloat, optional
Maximum b value you want to use from the dataset (other than b0), inclusive. If None, there is no maximum limit. Default: np.inf
- b0_thresholdint, optional
The value of b under which it is considered to be b0. Default: 50
- AFQ.tasks.data.t1w_over_b0(structural_imap, b0, citations, min_b0_for_r1_approximation=0.01)[source]#
full path to a nifti file containing the T1w over mean b0 which is a proxy for R1 [1]
- Parameters:
- min_b0_for_r1_approximationfloat, optional
The minimum value of b0 to consider when doing the division. This is to avoid dividing by small numbers. Default: 1e-2
References
[1]Moskovich, S., Shtangel, O., & Mezer, A. (2024). Approximating R1 and R2: A quantitative approach to clinical weighted MRI. Hum. Brain Mapp., 45(18), e70102.
- AFQ.tasks.data.b0_mask(b0, brain_mask)[source]#
full path to a nifti file containing the mean b0 after applying the brain mask
- AFQ.tasks.data.dti_params(brain_mask, data, gtab, bval_file, bvec_file, citations, b0_threshold=50, robust_tensor_fitting=False)[source]#
full path to a nifti file containing parameters for the DTI fit, s0 values of DTI fit
- Parameters:
- robust_tensor_fittingbool, optional
Whether to use robust_tensor_fitting when doing dti. Only applies to dti. Default: False
- b0_thresholdint, optional
The value of b under which it is considered to be b0. Default: 50.
- AFQ.tasks.data.fwdti_params(brain_mask, data, gtab, citations)[source]#
Full path to a nifti file containing parameters for the free-water DTI fit.
- AFQ.tasks.data.dki_params(brain_mask, gtab, data, citations)[source]#
full path to a nifti file containing parameters for the DKI fit, s0 values of DKI fit
- AFQ.tasks.data.msdki_params(brain_mask, gtab, data, citations)[source]#
full path to a nifti file containing parameters for the Mean Signal DKI fit, s0 values of Mean Signal DKI fit
- AFQ.tasks.data.msdki_msd(msdki_tf)[source]#
full path to a nifti file containing the MSDKI mean signal diffusivity
- AFQ.tasks.data.msdki_msk(msdki_tf)[source]#
full path to a nifti file containing the MSDKI mean signal kurtosis
- AFQ.tasks.data.csd_params(dwi, brain_mask, gtab, data, citations, csd_response=None, csd_sh_order_max=None, csd_lambda_=1, csd_tau=0.1, csd_fa_thr=0.7)[source]#
full path to a nifti file containing parameters for the CSD fit
- Parameters:
- csd_responsetuple or None, optional.
The response function to be used by CSD, as a tuple with two elements. The first is the eigen-values as an (3,) ndarray and the second is the signal value for the response function without diffusion-weighting (i.e. S0). If not provided, auto_response will be used to calculate these values. Default: None
- csd_sh_order_maxint or None, optional.
If None, infer the number of parameters from the number of data volumes, but no larger than 8. Default: None
- csd_lambda_float, optional.
weight given to the constrained-positivity regularization part of the deconvolution equation. Default: 1
- csd_taufloat, optional.
threshold controlling the amplitude below which the corresponding fODF is assumed to be zero. Ideally, tau should be set to zero. However, to improve the stability of the algorithm, tau is set to tau*100 percent of the mean fODF amplitude (here, 10 percent by default) (see [1]). Default: 0.1
- csd_fa_thrfloat, optional.
The threshold on the FA used to calculate the single shell auto response. Can be useful to reduce for baby subjects. Default: 0.7
References
[1]Tournier, J.D., et al. NeuroImage 2007. Robust determination of the fibre orientation distribution in diffusion MRI: Non-negativity constrained super-resolved spherical deconvolution
- AFQ.tasks.data.csd_aodf(structural_imap, csd_params, tracking_params, citations)[source]#
full path to a nifti file containing SSST CSD ODFs filtered by unified filtering [1]
References
- [1] Poirier and Descoteaux, 2024, “A Unified Filtering Method for
Estimating Asymmetric Orientation Distribution Functions”, Neuroimage, https://doi.org/10.1016/j.neuroimage.2024.120516
- AFQ.tasks.data.csd_aodf_asi(csd_aodf_params, brain_mask)[source]#
full path to a nifti file containing the CSD Asymmetric Index (ASI) [1]
References
- [1] S. Cetin Karayumak, E. Özarslan, and G. Unal,
“Asymmetric Orientation Distribution Functions (AODFs) revealing intravoxel geometry in diffusion MRI” Magnetic Resonance Imaging, vol. 49, pp. 145-158, Jun. 2018, doi: https://doi.org/10.1016/j.mri.2018.03.006.
- AFQ.tasks.data.csd_aodf_opm(csd_aodf_params, brain_mask)[source]#
full path to a nifti file containing the CSD odd-power map [1]
References
- [1] C. Poirier, E. St-Onge, and M. Descoteaux,
“Investigating the Occurrence of Asymmetric Patterns in White Matter Fiber Orientation Distribution Functions” [Abstract], In: Proc. Intl. Soc. Mag. Reson. Med. 29 (2021), 2021 May 15-20, Vancouver, BC, Abstract number 0865.
- AFQ.tasks.data.anisotropic_power_map(csd_params)[source]#
full path to a nifti file containing the anisotropic power map
- AFQ.tasks.data.csd_anisotropic_index(csd_params)[source]#
full path to a nifti file containing the anisotropic index
- AFQ.tasks.data.gq(gtab, data, tracking_params, citations, gq_sampling_length=1.2)[source]#
full path to a nifti file containing ODF for the Generalized Q-Sampling, full path to a nifti file containing isotropic diffusion component
- Parameters:
- gq_sampling_lengthfloat
Diffusion sampling length. Default: 1.2
- AFQ.tasks.data.rumba_params(gtab, data, brain_mask, tracking_params, citations, rumba_wm_response=None, rumba_gm_response=0.0008, rumba_csf_response=0.003, rumba_n_iter=600)[source]#
ODF for the RUMBA-SD model, full path to a nifti file containing the CSF volume fraction for each voxel, full path to a nifti file containing the GM volume fraction for each voxel, full path to a nifti file containing the white matter volume fraction for each voxel
- Parameters:
- rumba_wm_response: 1D or 2D ndarray or AxSymShResponse.
Able to take response[0] from auto_response_ssst. default: array([0.0017, 0.0002, 0.0002])
- rumba_gm_response: float, optional
Mean diffusivity for GM compartment. If None, then grey matter volume fraction is not computed. Default: 0.8e-3
- rumba_csf_response: float, optional
Mean diffusivity for CSF compartment. If None, then CSF volume fraction is not computed. Default: 3.0e-3
- rumba_n_iter: int, optional
Number of iterations for fODF estimation. Must be a positive int. Default: 600
- AFQ.tasks.data.opdt_params(data, gtab, brain_mask, citations, opdt_sh_order_max=8)[source]#
full path to a nifti file containing parameters for the Orientation Probability Density Transform shm_coeff, full path to a nifti file containing GFA
- Parameters:
- opdt_sh_order_maxint
Spherical harmonics order for OPDT model. Must be even. Default: 8
- AFQ.tasks.data.opdt_pmap(opdt_params)[source]#
full path to a nifti file containing the anisotropic power map from OPDT
- AFQ.tasks.data.opdt_ai(opdt_params)[source]#
full path to a nifti file containing the anisotropic index from OPDT
- AFQ.tasks.data.csa_params(data, gtab, brain_mask, citations, csa_sh_order_max=8)[source]#
full path to a nifti file containing parameters for the Constant Solid Angle shm_coeff, full path to a nifti file containing GFA
- Parameters:
- csa_sh_order_maxint
Spherical harmonics order for CSA model. Must be even. Default: 8
- AFQ.tasks.data.csa_pmap(csa_params)[source]#
full path to a nifti file containing the anisotropic power map from CSA
- AFQ.tasks.data.csa_ai(csa_params)[source]#
full path to a nifti file containing the anisotropic index from CSA
- AFQ.tasks.data.fwdti_fa(fwdti_tf)[source]#
full path to a nifti file containing the Free-water DTI fractional anisotropy
- AFQ.tasks.data.fwdti_md(fwdti_tf)[source]#
full path to a nifti file containing the Free-water DTI mean diffusivity
- AFQ.tasks.data.fwdti_fwf(fwdti_tf)[source]#
full path to a nifti file containing the Free-water DTI free water fraction
- AFQ.tasks.data.dti_fa(dti_tf)[source]#
full path to a nifti file containing the DTI fractional anisotropy
- AFQ.tasks.data.dti_lt(dti_tf, dwi_affine)[source]#
Image of first element in the DTI tensor according to DIPY convention i.e. Dxx (rate of diffusion from the left to right side of the brain), Image of second element in the DTI tensor according to DIPY convention i.e. Dyy (rate of diffusion from the posterior to anterior part of the brain), Image of third element in the DTI tensor according to DIPY convention i.e. Dzz (rate of diffusion from the inferior to superior part of the brain), Image of fourth element in the DTI tensor according to DIPY convention i.e. Dxy (rate of diffusion in the xy plane indicating the relationship between the x and y directions), Image of fifth element in the DTI tensor according to DIPY convention i.e. Dxz (rate of diffusion in the xz plane indicating the relationship between the x and z directions), Image of sixth element in the DTI tensor according to DIPY convention i.e. Dyz (rate of diffusion in the yz plane indicating the relationship between the y and z directions)
- AFQ.tasks.data.dti_cfa(dti_tf)[source]#
full path to a nifti file containing the DTI color fractional anisotropy
- AFQ.tasks.data.dti_pdd(dti_tf)[source]#
full path to a nifti file containing the DTI principal diffusion direction
- AFQ.tasks.data.dti_md(dti_tf)[source]#
full path to a nifti file containing the DTI mean diffusivity
- AFQ.tasks.data.dti_ga(dti_tf)[source]#
full path to a nifti file containing the DTI geodesic anisotropy
- AFQ.tasks.data.dti_rd(dti_tf)[source]#
full path to a nifti file containing the DTI radial diffusivity
- AFQ.tasks.data.dti_ad(dti_tf)[source]#
full path to a nifti file containing the DTI axial diffusivity
- AFQ.tasks.data.dki_kt(dki_tf, dwi_affine)[source]#
Image of first element in the DKI kurtosis model, Image of second element in the DKI kurtosis model, Image of third element in the DKI kurtosis model, Image of fourth element in the DKI kurtosis model, Image of fifth element in the DKI kurtosis model, Image of sixth element in the DKI kurtosis model, Image of seventh element in the DKI kurtosis model, Image of eighth element in the DKI kurtosis model, Image of ninth element in the DKI kurtosis model, Image of tenth element in the DKI kurtosis model, Image of eleventh element in the DKI kurtosis model, Image of twelfth element in the DKI kurtosis model, Image of thirteenth element in the DKI kurtosis model, Image of fourteenth element in the DKI kurtosis model, Image of fifteenth element in the DKI kurtosis model
- AFQ.tasks.data.dki_lt(dki_tf, dwi_affine)[source]#
Image of first element in the DTI tensor from DKI, Image of second element in the DTI tensor from DKI, Image of third element in the DTI tensor from DKI, Image of fourth element in the DTI tensor from DKI, Image of fifth element in the DTI tensor from DKI, Image of sixth element in the DTI tensor from DKI
- AFQ.tasks.data.dki_cfa(dki_tf)[source]#
full path to a nifti file containing the DKI color fractional anisotropy
- AFQ.tasks.data.dki_fa(dki_tf)[source]#
full path to a nifti file containing the DKI fractional anisotropy
- AFQ.tasks.data.dki_md(dki_tf)[source]#
full path to a nifti file containing the DKI mean diffusivity
- AFQ.tasks.data.dki_awf(dki_params, tracking_params, gtol=0.01)[source]#
full path to a nifti file containing the DKI axonal water fraction
- Parameters:
- gtolfloat, optional
This input is to refine kurtosis maxima under the precision of the directions sampled on the sphere class instance. The gradient of the convergence procedure must be less than gtol before successful termination. If gtol is None, fiber direction is directly taken from the initial sampled directions of the given sphere object. Default: 1e-2
- AFQ.tasks.data.dki_mk(dki_tf)[source]#
full path to a nifti file containing the DKI mean kurtosis file
- AFQ.tasks.data.dki_kfa(dki_tf)[source]#
full path to a nifti file containing the DKI kurtosis FA file
References
[Hansen2019]Hansen B. An Introduction to Kurtosis Fractional
Anisotropy. AJNR Am J Neuroradiol. 2019 Oct;40(10):1638-1641. doi: 10.3174/ajnr.A6235. Epub 2019 Sep 26. PMID: 31558496; PMCID: PMC7028548.
- AFQ.tasks.data.dki_ga(dki_tf)[source]#
full path to a nifti file containing the DKI geodesic anisotropy
- AFQ.tasks.data.dki_rd(dki_tf)[source]#
full path to a nifti file containing the DKI radial diffusivity
- AFQ.tasks.data.dki_ad(dki_tf)[source]#
full path to a nifti file containing the DKI axial diffusivity
- AFQ.tasks.data.dki_ak(dki_tf)[source]#
full path to a nifti file containing the DKI axial kurtosis file
- AFQ.tasks.data.brain_mask(structural_imap, b0)[source]#
full path to a nifti file containing the brain mask
- AFQ.tasks.data.get_bundle_dict(b0, citations, bundle_info=None, reg_template_spec='mni_T1', reg_template_space_name='mni')[source]#
Dictionary defining the different bundles to be segmented, and a Nifti1Image containing the template for registration, and the name of the template space for file outputs
- Parameters:
- bundle_infodict or BundleDict, optional
A dictionary or BundleDict for use in segmentation. See Defining Custom Bundle Dictionaries in the usage section of pyAFQ’s documentation for details. If None, will get all appropriate bundles for the chosen segmentation algorithm. Default: None
- reg_template_specstr, or Nifti1Image, optional
The target image data for registration. Can either be a Nifti1Image, a path to a Nifti1Image, or if “mni_T2”, “dti_fa_template”, “hcp_atlas”, or “mni_T1”, image data will be loaded automatically. If “hcp_atlas” is used, slr registration will be used and reg_subject should be “subject_sls”. Default: “mni_T1”
- reg_template_space_namestr, optional
Name to use in file names for the template space. Default: “mni”