How to use the clinica.pipelines.engine function in clinica

To help you get started, we’ve selected a few clinica examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github aramis-lab / clinica / clinica / pipelines / t1_volume_tissue_segmentation / t1_volume_tissue_segmentation_pipeline.py View on Github external
__credits__ = ["Jorge Samper-Gonzalez", "Alexandre Routier"]
__license__ = "See LICENSE.txt file"
__version__ = "0.1.0"
__maintainer__ = "Jorge Samper-Gonzalez"
__email__ = "jorge.samper-gonzalez@inria.fr"
__status__ = "Development"


# Use hash instead of parameters for iterables folder names
# Otherwise path will be too long and generate OSError
from nipype import config
cfg = dict(execution={'parameterize_dirs': False})
config.update_config(cfg)


class T1VolumeTissueSegmentation(cpe.Pipeline):
    """T1VolumeTissueSegmentation - Tissue segmentation, bias correction and
    spatial normalization to MNI space.

    Args:
        bids_directory: A BIDS directory.
        caps_directory: An empty output directory where CAPS structured data will be written.
        subjects_sessions_list: The Subjects-Sessions list file (in .tsv format).

    Returns:
        A clinica pipeline object containing the T1VolumeTissueSegmentation pipeline.
    """
    def __init__(self,
                 bids_directory=None,
                 caps_directory=None,
                 tsv_file=None,
                 base_dir=None,
github aramis-lab / clinica / clinica / pipelines / t1_freesurfer / t1_freesurfer_pipeline.py View on Github external
# coding: utf8

# Use hash instead of parameters for iterables folder names
# Otherwise path will be too long and generate OSError
from nipype import config

import clinica.pipelines.engine as cpe

cfg = dict(execution={'parameterize_dirs': False})
config.update_config(cfg)


class T1FreeSurfer(cpe.Pipeline):
    """FreeSurfer-based processing of T1-weighted MR images.

    Returns:
        A clinica pipeline object containing the T1FreeSurfer pipeline.
    """

    @staticmethod
    def get_processed_images(caps_directory, subjects, sessions):
        import os
        from clinica.utils.inputs import clinica_file_reader
        from clinica.utils.input_files import T1_FS_DESTRIEUX
        from clinica.utils.filemanip import extract_image_ids
        image_ids = []
        if os.path.isdir(caps_directory):
            t1_freesurfer_files = clinica_file_reader(
                subjects, sessions,
github aramis-lab / clinica / clinica / pipelines / dwi_processing_noddi / dwi_processing_noddi_pipeline.py View on Github external
"""dwi_processing_noddi - Clinica Pipeline.
This file has been generated automatically by the `clinica generate template`
command line tool. See here for more details: https://gitlab.icm-institute.org/aramislab/clinica/wikis/docs/InteractingWithClinica.
"""

# WARNING: Don't put any import statement here except if it's absolutly
# necessary. Put it *inside* the different methods.
# Otherwise it will slow down the dynamic loading of the pipelines list by the
# command line tool.
import clinica.pipelines.engine as cpe


class DwiProcessingNoddi(cpe.Pipeline):
    """dwi_processing_noddi SHORT DESCRIPTION.

    Warnings:
        - A WARNING.

    Todos:
        - [x] A FILLED TODO ITEM.
        - [ ] AN ON-GOING TODO ITEM.

    Args:
        input_dir: A BIDS directory.
        output_dir: An empty output directory where CAPS structured data will be written.
        subjects_sessions_list: The Subjects-Sessions list file (in .tsv format).

    Returns:
        A clinica pipeline object containing the dwi_processing_noddi pipeline.
github aramis-lab / clinica / clinica / pipelines / fmri_preprocessing / fmri_preprocessing_pipeline.py View on Github external
# necessary. Put it *inside* the different methods.
# Otherwise it will slow down the dynamic loading of the pipelines list by the
# command line tool.
import clinica.pipelines.engine as cpe

__author__ = "Jeremy Guillon"
__copyright__ = "Copyright 2016-2019 The Aramis Lab Team"
__credits__ = ["Jeremy Guillon", "Romain Valabregue"]
__license__ = "See LICENSE.txt file"
__version__ = "0.1.0"
__maintainer__ = "Jeremy Guillon"
__email__ = "jeremy.guillon@inria.fr"
__status__ = "Development"


class fMRIPreprocessing(cpe.Pipeline):
    """Create fMRI preprocessing pipelines object.

    Warnings:
        - The Fieldmap node is still under revision as a pull request
        - The RealingUnwarp node is still under revision as a pull request

    Todos:
        - [x] Don't read inputs if not needed (i.e. --unwarp or no)
        - [x] Read parameters from sidecar `*.json` files.
        - [x] Add support of gzipped nifti inputs.
        - [x] Replace reg_node target image by the brain only using c1 + c2 +
        c3 dilated-eroded-filled.
        - [x] Develop SPM Realign and Unwarp wrapper and integrate it.
        - [x] Develop SPM Fieldmap Calculation Tool wrapper and integrate it.
        - [x] Replace standard DataGrabber by a BIDS tree finder.
        - [x] Export only gzipped nifti files.
github aramis-lab / clinica / clinica / pipelines / dwi_preprocessing_phase_difference_fieldmap3 / dwi_preprocessing_phase_difference_fieldmap3_pipeline.py View on Github external
"""Dwi Preprocessing Phase Difference Fieldmap3 - Clinica Pipeline.
This file has been generated automatically by the `clinica generate template`
command line tool. See here for more details: https://gitlab.icm-institute.org/aramis/clinica/wikis/docs/InteractingWithClinica.
"""

# WARNING: Don't put any import statement here except if it's absolutly
# necessary. Put it *inside* the different methods.
# Otherwise it will slow down the dynamic loading of the pipelines list by the
# command line tool.
import clinica.pipelines.engine as cpe


class DwiPreprocessingPhaseDifferenceFieldmap3(cpe.Pipeline):
    """Dwi Preprocessing Phase Difference Fieldmap3 SHORT DESCRIPTION.

    Warnings:
        - A WARNING.

    Todos:
        - [x] A FILLED TODO ITEM.
        - [ ] AN ON-GOING TODO ITEM.

    Args:
        input_dir: A BIDS directory.
        output_dir: An empty output directory where CAPS structured data will be written.
        subjects_sessions_list: The Subjects-Sessions list file (in .tsv format).

    Returns:
        A clinica pipelines object containing the Dwi Preprocessing Phase Difference Fieldmap3 pipelines.
github aramis-lab / clinica / clinica / pipelines / pet_volume / pet_volume_pipeline.py View on Github external
__copyright__ = "Copyright 2016-2019 The Aramis Lab Team"
__credits__ = ["Jorge Samper-Gonzalez"]
__license__ = "See LICENSE.txt file"
__version__ = "0.1.0"
__maintainer__ = "Jorge Samper-Gonzalez"
__email__ = "jorge.samper-gonzalez@inria.fr"
__status__ = "Development"


# Use hash instead of parameters for iterables folder names
# Otherwise path will be too long and generate OSError
cfg = dict(execution={'parameterize_dirs': False})
config.update_config(cfg)


class PETVolume(cpe.Pipeline):
    """PETVolume - Pre-processing of PET images using SPM.

    Args:
        input_dir: A BIDS directory.
        output_dir: An empty output directory where CAPS structured data will be written.
        subjects_sessions_list: The Subjects-Sessions list file (in .tsv format).

    Returns:
        A clinica pipeline object containing the PETVolume pipeline.

    Raises:


    """

    def __init__(self,