Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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
# 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
# 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",
"""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.')
# 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",
# 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",
# 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",
# 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):
# 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",
# 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