nipreps / mriqc

Automated Quality Control and visual reports for Quality Assessment of structural (T1w, T2w) and functional MRI of the brain
http://mriqc.readthedocs.io
Apache License 2.0
299 stars 132 forks source link

Identify sub-workflows that are simpler and port them first #1002

Closed oesteban closed 3 months ago

yibeichan commented 2 years ago

Spatial Normalization to MNI (ANTs) requires:

Calculate air mask above the nasial-cerebelum plane – airmsk_wf() requires:

Brain tissue segmentation (FAST) requires:

Extraction of IQMs – compute_iqms() requires

sahahn commented 2 years ago

HeadMaskWorkflow - mriqc.workflows.anatomical.headmsk_wf

Either uses: fsl.BET(surfaces=True) which is already implemented, I think - (https://github.com/nipype/pydra-fsl/blob/master/pydra/tasks/fsl/preprocess/bet.py)

but if dipy is installed, then it uses a different workflow, which seems mostly based on python / nibabel functions, and then needs: nipype.interfaces.dipy import Denoise which would need to be implemented I believe as I do not see an existing interface for dipy, but dipy is a python library so might not be difficult

mckenziephagen commented 2 years ago

Skull stripping requires: nirodents.workflows.brainextraction.init_rodent_brain_extraction_wf and niworkflows.anat.skullstrip.afni_wf which requires mriqc.interfaces.synthstrip.SynthStrip niworkflows.interfaces.nibabel.IntensityClip niworkflows.interfaces.nibabel.ApplyMask nipype.interfaces.ants.N4BiasFieldCorrection

garciaml commented 2 years ago

Conform (reorientations, revise data types) input data and read associated metadata.

mriqc.workflows.anatomical.anat_qc_workflow

_# 1. Reorient anatomical image to_ras = pe.Node(ConformImage(checkdtype=False), name="conform")

Next it is used as a first node in the workflow (still in mriqc.workflows.anatomical.anat_qc_workflow)

_# Connect all nodes

fmt: off

workflow.connect([
    (inputnode, to_ras, [("in_file", "in_file")]), ..._

ConformImage defined in mriqc.interfaces.common.conform_image

It uses os.path, nibabel, mriqc.config, mriqc.messages, mriqc.interfaces.data_types, and from nipype.interfaces.base : BaseInterfaceInputSpec, File, SimpleInterface, TraitedSpec, traits

oesteban commented 3 months ago

Closing in favor of https://github.com/nipreps/mriqc/discussions/1347