How to use the clinica.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 / iotools / load_cmdline_converter.py View on Github external
def load_name_converters():
    base_converters = join(split(realpath(__file__))[0], 'converters')
    for file in os.listdir(base_converters):
        if file.endswith(".py"):
            if re.match('__init__',file):
                continue
            if re.match('(.*)\.pyc$',file):
                continue

            f = "clinica.bids.converters.%s" % file.split('.')[0]
            mod = importlib.import_module(f)
            for name, obj in inspect.getmembers(mod):
                if name != 'CmdParser' and name != 'Converter' and inspect.isclass(obj):
                    x = obj()
                    if isinstance(x, clinica.engine.cmdparser.CmdParser) and isinstance(x, clinica.bids.abstract_converter.Converter):
                        del x
                        yield name
github aramis-lab / clinica / clinica / iotools / converters / aibl_to_bids / aibl_to_bids_cli.py View on Github external
# coding: utf8

import clinica.engine as ce


class AiblToBidsCLI(ce.CmdParser):
    """
    todo:add description
    """

    def define_name(self):
        """Define the sub-command name to run this pipelines.
        """
        self._name = 'aibl-to-bids'

    def define_description(self):
        """Define a description of this pipeline.
        """
        self._description = 'Convert AIBL (https://aibl.csiro.au/adni/index.html”) into BIDS.'

    def define_options(self):
        """Define the sub-command arguments
github aramis-lab / clinica / clinica / pipelines / t1_volume_existing_template / t1_volume_existing_template_cli.py View on Github external
# coding: utf8

import clinica.engine as ce


class T1VolumeExistingTemplateCLI(ce.CmdParser):

    def define_name(self):
        """Define the sub-command name to run this pipeline."""
        self._name = 't1-volume-existing-template'

    def define_description(self):
        """Define a description of this pipeline."""
        self._description = ('Volume-based processing of T1-weighted MR images using an existing DARTEL template:\n'
                             'http://clinica.run/doc/Pipelines/T1_Volume/')

    def define_options(self):
        """Define the sub-command arguments."""
        from clinica.engine.cmdparser import PIPELINE_CATEGORIES
        # Clinica compulsory arguments (e.g. BIDS, CAPS, group_id)
        clinica_comp = self._args.add_argument_group(PIPELINE_CATEGORIES['CLINICA_COMPULSORY'])
        clinica_comp.add_argument("bids_directory",
github aramis-lab / clinica / clinica / pipelines / dwi_preprocessing_phase_difference_fieldmap3 / dwi_preprocessing_phase_difference_fieldmap3_cli.py View on Github external
"""Dwi Preprocessing Phase Difference Fieldmap3 - Clinica Command Line Interface.
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.
"""


import clinica.engine as ce


class DwiPreprocessingPhaseDifferenceFieldmap3CLI(ce.CmdParser):


    def define_name(self):
        """Define the sub-command name to run this pipelines.
        """

        self._name = 'dwi-preprocessing-phase-difference-fieldmap3'


    def define_options(self):
        """Define the sub-command arguments
        """


        self._args.add_argument("bids_directory",
                                help='Path to the BIDS directory.')
github aramis-lab / clinica / clinica / pipelines / t1_volume_existing_dartel / t1_volume_existing_dartel_cli.py View on Github external
# coding: utf8

import clinica.engine as ce


class T1VolumeExistingDartelCLI(ce.CmdParser):

    def define_name(self):
        """Define the sub-command name to run this pipeline."""
        self._name = 't1-volume-register-dartel'

    def define_description(self):
        """Define a description of this pipeline."""
        self._description = ('Inter-subject registration using Dartel (using an existing Dartel template):\n'
                             'http://clinica.run/doc/Pipelines/T1_Volume/')

    def define_options(self):
        """Define the sub-command arguments."""
        from clinica.engine.cmdparser import PIPELINE_CATEGORIES
        # Clinica compulsory arguments (e.g. BIDS, CAPS, group_id)
        clinica_comp = self._args.add_argument_group(PIPELINE_CATEGORIES['CLINICA_COMPULSORY'])
        clinica_comp.add_argument("bids_directory",
github aramis-lab / clinica / clinica / pipelines / dwi_preprocessing_using_t1 / dwi_preprocessing_using_t1_cli.py View on Github external
# coding: utf8

import clinica.engine as ce


class DwiPreprocessingUsingT1Cli(ce.CmdParser):

    def define_name(self):
        """Define the sub-command name to run this pipeline."""
        self._name = 'dwi-preprocessing-using-t1'

    def define_description(self):
        """Define a description of this pipeline."""
        self._description = ('Preprocessing of raw DWI datasets using a T1w image:\n'
                             'http://clinica.run/doc/Pipelines/DWI_Preprocessing/')

    def define_options(self):
        """Define the sub-command arguments."""
        from clinica.engine.cmdparser import PIPELINE_CATEGORIES
        # Clinica compulsory arguments (e.g. BIDS, CAPS, group_id)
        clinica_comp = self._args.add_argument_group(PIPELINE_CATEGORIES['CLINICA_COMPULSORY'])
        clinica_comp.add_argument("bids_directory",
github aramis-lab / clinica / clinica / iotools / converters / oasis_to_bids / oasis_to_bids_cli.py View on Github external
# coding: utf8

import clinica.engine as ce

__author__ = "Sabrina Fontanella"
__copyright__ = "Copyright 2016-2019 The Aramis Lab Team"
__license__ = "See LICENSE.txt file"
__version__ = "0.1.0"
__maintainer__ = "Simona Bottani"
__email__ = "simona.bottani@icm-institute.org"
__status__ = "Completed"


class OasisToBidsCLI(ce.CmdParser):
    def define_name(self):
        """Define the sub-command name to run this pipelines.
        """
        self._name = 'oasis-to-bids'

    def define_description(self):
        """Define a description of this pipeline.
        """
        self._description = 'Convert OASIS (http://oasis-brains.org/) into BIDS.'

    def define_options(self):
        """Define the sub-command arguments
        """
        self._args.add_argument("dataset_directory",
                                help='Path to the OASIS images directory.')
        self._args.add_argument("clinical_data_directory",
github aramis-lab / clinica / clinica / pipelines / dwi_processing_noddi / dwi_processing_noddi_cli.py View on Github external
# coding: utf8

__author__ = "Junhao Wen"
__copyright__ = "Copyright 2016-2018, The Aramis Lab Team"
__credits__ = ["Junhao Wen"]
__license__ = "See LICENSE.txt file"
__version__ = "0.1.0"
__maintainer__ = "Junhao Wen"
__email__ = "Junhao.Wen@inria.fr"
__status__ = "Development"

import clinica.engine as ce


class DwiProcessingNoddiCLI(ce.CmdParser):

    def __init__(self):
        super(DwiProcessingNoddiCLI, self).__init__()

    def define_name(self):
        """Define the sub-command name to run this pipeline.
        """

        self._name = 'dwi-processing-noddi'

    def define_description(self):
        """Define a description of this pipeline.
        """
        self._description = 'NODDI-based processing of DWI datasets: http://clinica.run/doc/DWIProcessing'

    def define_options(self):
github aramis-lab / clinica / clinica / pipelines / pet_preprocess_volume / pet_preprocess_volume_cli.py View on Github external
# coding: utf8

import clinica.engine as ce

__author__ = "Jorge Samper Gonzalez"
__copyright__ = "Copyright 2016-2018, 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"


class PETPreprocessVolumeCLI(ce.CmdParser):

    def define_name(self):
        """Define the sub-command name to run this pipelines.
        """
        self._name = 'pet-preprocess-volume'

    def define_description(self):
        """Define a description of this pipeline.
        """
        self._description = 'SPM-based pre-processing of PET images:\nhttp://clinica.run/doc/Pipelines/PET_Preprocessing/'

    def define_options(self):
        """Define the sub-command arguments
        """

        self._args.add_argument("bids_directory",
github aramis-lab / clinica / clinica / pipelines / t1_freesurfer_longitudinal / t1_freesurfer_longitudinal_cli.py View on Github external
# coding: utf8

import clinica.engine as ce

__author__ = "Alexis Guyot"
__copyright__ = "Copyright 2016-2019, The Aramis Lab Team"
__credits__ = ["Alexis Guyot"]
__license__ = "See LICENSE.txt file"
__version__ = "0.1.0"
__maintainer__ = "Alexis Guyot"
__email__ = "alexis.guyot@icm-institute.org"
__status__ = "Development"


class T1FreeSurferLongitudinalCLI(ce.CmdParser):

    def define_name(self):
        """Define the sub-command name to run this pipelines.
        """
        self._name = 't1-freesurfer-longitudinal'

    def define_description(self):
        """Define a description of this pipeline.
        """
        self._description = ('Longitudinal pre-processing of T1w images with FreeSurfer:\n'
                             'http://clinica.run/doc/Pipelines/T1_FreeSurfer_Longitudinal/')

    def define_options(self):
        """Define the sub-command arguments
        """
        from clinica.engine.cmdparser import PIPELINE_CATEGORIES