danjgale / nii-masker

Convenient command-line wrapper for nilearn's Masker objects
BSD 3-Clause "New" or "Revised" License
7 stars 3 forks source link

Implementation of quality control metrics #13

Closed danjgale closed 3 years ago

danjgale commented 5 years ago

This related to creating visual reports for quality control inspection (#2).

xcpEngine provides a way to implement functional connectivity quality control metrics. This is trivial from the output of atlas-based (not single ROI-based) outputs of niimasker. All that would need to be done is compute a basic FC matrix (via nilearn) from the run's output file, and relate the pairwise correlations to the run's motion estimates (which would be need to be present in the regressor_files).

You could imagine two parameters to add: --qcfc ("qcfc": false) and --qcfc-motion-label ("qcfc-motion-label": "framewise_displacement"). Default options are shown in the parentheses. If true, niimasker would detect if this is possible based on the a) mask image (has to be an atlas of multiple regions) and b) the regressor files. QCFC would be skipped otherwise. The output of the QCFC would be reported in the visual report.

danjgale commented 5 years ago

Another quality control metric that is implemented by xcpEngine is Kendall's W, AKA Regional Homogeneity. Although this can be implemented via AFNI (https://afni.nimh.nih.gov/pub/dist/doc/program_help/3dReHo.html), I'm sure it's pretty easy to assemble an in-house version to avoid adding a dependency in. This of course would only be possible on single ROIs when "as_voxels": true. Proposed parameters would just be --reho or "reho": true.

Edit: I should note that xcpEngine seems great and is an excellent alternative to niimasker if you want more a whole lot more bells and whistles. Niimasker is much more minimalistic, and therefore maybe more flexible, tool to accomplish roughly the same goal. So, for people stumbling upon this project and wondering what the difference between the two are, there you go. I highly recommend xcpEngine if you aren't satisfied with niimasker or are wanting more features!

danjgale commented 3 years ago

Not urgent but a fun feature to include eventually