nifreeze.model.gqi module¶
Classes and functions for generalized q-sampling
- class nifreeze.model.gqi.GeneralizedQSamplingFit(self, model, data)[source]¶
Bases:
ReconstFit
Calculates PDF and ODF for a single voxel
- Parameters:
model (object,) – DiffusionSpectrumModel
data (1d ndarray,) – signal values
- class nifreeze.model.gqi.GeneralizedQSamplingModel(self, gtab, *, method='standard', sampling_length=1.2, normalize_peaks=False, sphere=None)[source]¶
Bases:
ReconstModel
Generalized Q-Sampling Imaging.
- nifreeze.model.gqi.equatorial_zone_vertices(vertices, pole, *, width=5)[source]¶
finds the ‘vertices’ in the equatorial zone conjugate to ‘pole’ with width half ‘width’ degrees
- nifreeze.model.gqi.normalize_qa(qa, *, max_qa=None)[source]¶
Normalize quantitative anisotropy.
Used mostly with GQI rather than GQI2.
- Parameters:
qa (array, shape (X, Y, Z, N)) – where N is the maximum number of peaks stored
max_qa (float,) – maximum qa value. Usually found in the CSF (corticospinal fluid).
- Returns:
nqa – normalized quantitative anisotropy
- Return type:
array, shape (x, Y, Z, N)
Notes
Normalized quantitative anisotropy has the very useful property to be very small near gray matter and background areas. Therefore, it can be used to mask out white matter areas.
- nifreeze.model.gqi.npa(self, odf, *, width=5)[source]¶
non-parametric anisotropy
Nimmo-Smith et al. ISMRM 2011
- nifreeze.model.gqi.patch_vertices(vertices, pole, width)[source]¶
find ‘vertices’ within the cone of ‘width’ degrees around ‘pole’
- nifreeze.model.gqi.polar_zone_vertices(vertices, pole, *, width=5)[source]¶
finds the ‘vertices’ in the equatorial band around the ‘pole’ of radius ‘width’ degrees
- nifreeze.model.gqi.prediction_kernel(gtab, param_lambda, sphere, method='standard')[source]¶
Predict a signal given the ODF.
- Parameters:
odf (ndarray) – ODF parameters.
gtab (GradientTable) – The gradient table for this prediction
Notes
The predicted signal is given by:
\[S(\theta, b) = K_{ii}^{-1} \cdot ODF\]where $K_{ii}^{-1}$, is the inverse of the GQI kernels for the direction(s) $ii$ given by
gtab
.