aslprep.utils.qc module

Functions for evaluating quality of ASL derivatives.

cbf_qei(gm, wm, csf, img, thresh=0.8)[source]

Compute quality evaluation index (QEI) of CBF.

The QEI is based on Dolui et al.[1].

References

coverage(input1, input2)[source]

Estimate the coverage between two binary images.

crosscorr(input1, input2)[source]

Compute cross correlation between two binary images.

dice(input1, input2)[source]

Compute Dice coefficient between the binary objects in two images.

Parameters:
  • input1 (str) – Input data containing objects. Can be any type but will be converted into binary: background where 0, object everywhere else.

  • input2 (str) – Input data containing objects. Can be any type but will be converted into binary: background where 0, object everywhere else.

Returns:

coef – The Dice coefficient between the object(s) in `input1` and the object(s) in `input2`. It ranges from 0 (no overlap) to 1 (perfect overlap).

Return type:

float

globalcbf(cbf, gm, wm, csf, thresh=0.7)[source]

Compute mean GM, WM, and CSF CBF values.

Parameters:
  • cbf (str) – Path to CBF file.

  • gm, wm, csf (str) – Paths to GM, WM, and CSF tissue probability maps, in same space and resolution as cbf.

  • thresh (float) – Threshold to apply to the TPMs. Default is 0.7.

Returns:

mean_tissue_cbfs – Mean CBF values from binarized versions of the tissue maps.

Return type:

list of float

jaccard(input1, input2)[source]

Compute Jaccard coefficient between the binary objects in two images.

Parameters:
  • input1 (str) – Input data containing objects. Can be any type but will be converted into binary: background where 0, object everywhere else.

  • input2 (str) – Input data containing objects. Can be any type but will be converted into binary: background where 0, object everywhere else.

Returns:

coef – The Jaccard coefficient between the object(s) in input1 and the object(s) in input2. It ranges from 0 (no overlap) to 1 (perfect overlap).

Return type:

float

negativevoxel(cbf, gm, thresh=0.7)[source]

Compute percentage of negative voxels within grey matter mask.