コード例 #1
0
class IntraModalMergeInputSpec(BaseInterfaceInputSpec):
    in_files = InputMultiPath(File(exists=True),
                              mandatory=True,
                              desc='input files')
    hmc = traits.Bool(True, usedefault=True)
    zero_based_avg = traits.Bool(True, usedefault=True)
    to_ras = traits.Bool(True, usedefault=True)
コード例 #2
0
class TemplateDimensionsOutputSpec(TraitedSpec):
    t1w_valid_list = OutputMultiPath(exists=True, desc='valid T1w images')
    target_zooms = traits.Tuple(traits.Float, traits.Float, traits.Float,
                                desc='Target zoom information')
    target_shape = traits.Tuple(traits.Int, traits.Int, traits.Int,
                                desc='Target shape information')
    out_report = File(exists=True, desc='conformation report')
コード例 #3
0
class FilledImageLikeInputSpec(BaseInterfaceInputSpec):
    in_file = File(exists=True, mandatory=True,
                   desc='image to be demeaned')
    fill_value = traits.Float(1.0, usedefault=True,
                              desc='value to fill')
    dtype = traits.Enum('float32', 'uint8', usedefault=True,
                        desc='force output data type')
コード例 #4
0
class FunctionalSummaryInputSpec(BaseInterfaceInputSpec):
    slice_timing = traits.Enum(False,
                               True,
                               'TooShort',
                               usedefault=True,
                               desc='Slice timing correction used')
    distortion_correction = traits.Str(
        desc='Susceptibility distortion correction method', mandatory=True)
    pe_direction = traits.Enum(None,
                               'i',
                               'i-',
                               'j',
                               'j-',
                               mandatory=True,
                               desc='Phase-encoding direction detected')
    registration = traits.Enum(
        'FSL',
        'FreeSurfer',
        mandatory=True,
        desc='Functional/anatomical registration method')
    fallback = traits.Bool(desc='Boundary-based registration rejected')
    registration_dof = traits.Enum(6,
                                   9,
                                   12,
                                   desc='Registration degrees of freedom',
                                   mandatory=True)
    output_spaces = traits.List(desc='Target spaces')
    confounds_file = File(exists=True, desc='Confounds file')
コード例 #5
0
ファイル: bids.py プロジェクト: johmathe/fmriprep
class DerivativesDataSinkInputSpec(BaseInterfaceInputSpec):
    base_directory = traits.Directory(
        desc='Path to the base directory for storing data.')
    in_file = InputMultiPath(File(exists=True),
                             mandatory=True,
                             desc='the object to be saved')
    source_file = File(exists=False,
                       mandatory=True,
                       desc='the input func file')
    suffix = traits.Str('',
                        mandatory=True,
                        desc='suffix appended to source_file')
    extra_values = traits.List(traits.Str)
    compress = traits.Bool(
        desc="force compression (True) or uncompression (False)"
        " of the output file (default: same as input)")
コード例 #6
0
class MergeInputSpec(BaseInterfaceInputSpec):
    in_files = InputMultiPath(File(exists=True),
                              mandatory=True,
                              desc='input list of files to merge')
    dtype = traits.Enum('f4',
                        'f8',
                        'u1',
                        'u2',
                        'u4',
                        'i2',
                        'i4',
                        usedefault=True,
                        desc='numpy dtype of output image')
    header_source = File(
        exists=True,
        desc='a Nifti file from which the header should be copied')
コード例 #7
0
ファイル: bids.py プロジェクト: romainVala/mriqc
class IQMFileSinkInputSpec(DynamicTraitedSpec, BaseInterfaceInputSpec):
    subject_id = Str(mandatory=True, desc='the subject id')
    modality = Str(mandatory=True, desc='the qc type')
    session_id = traits.Either(None, Str, usedefault=True)
    task_id = traits.Either(None, Str, usedefault=True)
    acq_id = traits.Either(None, Str, usedefault=True)
    rec_id = traits.Either(None, Str, usedefault=True)
    run_id = traits.Either(None, Str, usedefault=True)
    metadata = traits.Dict()
    provenance = traits.Dict()

    root = traits.Dict(desc='output root dictionary')
    out_dir = File(desc='the output directory')
    _outputs = traits.Dict(value={}, usedefault=True)

    def __setattr__(self, key, value):
        if key not in self.copyable_trait_names():
            if not isdefined(value):
                super(IQMFileSinkInputSpec, self).__setattr__(key, value)
            self._outputs[key] = value
        else:
            if key in self._outputs:
                self._outputs[key] = value
            super(IQMFileSinkInputSpec, self).__setattr__(key, value)

        if key == 'subject_id':
            #I can not find where it is set from bids ... dirty fix
            if str(value) == '<undefined>':
                self.subject_id = 'TODO'
コード例 #8
0
ファイル: images.py プロジェクト: elvandy/fmriprep
class TemplateDimensionsInputSpec(BaseInterfaceInputSpec):
    t1w_list = InputMultiPath(File(exists=True),
                              mandatory=True,
                              desc='input T1w images')
    max_scale = traits.Float(3.0,
                             usedefault=True,
                             desc='Maximum scaling factor in images to accept')
コード例 #9
0
class GatherConfoundsInputSpec(BaseInterfaceInputSpec):
    signals = File(exists=True, desc='input signals')
    dvars = File(exists=True, desc='file containing DVARS')
    fd = File(exists=True, desc='input framewise displacement')
    tcompcor = File(exists=True, desc='input tCompCorr')
    acompcor = File(exists=True, desc='input aCompCorr')
    cos_basis = File(exists=True, desc='input cosine basis')
    motion = File(exists=True, desc='input motion parameters')
    aroma = File(exists=True, desc='input ICA-AROMA')
コード例 #10
0
 def __init__(self, num_affines=0, *args, **kwargs):
     super(ConcatAffines, self).__init__(*args, **kwargs)
     self._num_affines = num_affines
     trait_type = File(exists=True)
     if num_affines == 0:
         add_traits(self.inputs, ['mat_list'], trait_type)
     elif num_affines < 26:
         add_traits(self.inputs, self._get_names(num_affines), trait_type)
コード例 #11
0
ファイル: multiecho.py プロジェクト: waringjd/fmriprep
class T2SMapInputSpec(BaseInterfaceInputSpec):
    in_files = InputMultiPath(File(exists=True),
                              mandatory=True,
                              desc='multi-echo BOLD EPIs')
    te_list = traits.List(traits.Float, mandatory=True, desc='echo times')
    compress = traits.Bool(True,
                           usedefault=True,
                           desc='use gzip compression on .nii output')
コード例 #12
0
ファイル: fmap.py プロジェクト: sitek/fmriprep
class FieldEnhanceInputSpec(BaseInterfaceInputSpec):
    in_file = File(exists=True, mandatory=True, desc='input fieldmap')
    in_mask = File(exists=True, desc='brain mask')
    in_magnitude = File(exists=True, desc='input magnitude')
    unwrap = traits.Bool(False, usedefault=True, desc='run phase unwrap')
    despike = traits.Bool(True, usedefault=True, desc='run despike filter')
    bspline_smooth = traits.Bool(True,
                                 usedefault=True,
                                 desc='run 3D bspline smoother')
    mask_erode = traits.Int(1, usedefault=True, desc='mask erosion iterations')
    despike_threshold = traits.Float(0.2,
                                     usedefault=True,
                                     desc='mask erosion iterations')
    num_threads = traits.Int(1,
                             usedefault=True,
                             nohash=True,
                             desc='number of jobs')
コード例 #13
0
class GenerateCiftiInputSpec(BaseInterfaceInputSpec):
    bold_file = File(mandatory=True, exists=True, desc="input BOLD file")
    volume_target = traits.Enum("MNI152NLin2009cAsym",
                                mandatory=True,
                                usedefault=True,
                                desc="CIFTI volumetric output space")
    surface_target = traits.Enum("fsaverage5",
                                 "fsaverage6",
                                 mandatory=True,
                                 usedefault=True,
                                 desc="CIFTI surface target space")
    subjects_dir = Directory(mandatory=True, desc="FreeSurfer SUBJECTS_DIR")
    TR = traits.Float(mandatory=True, desc="repetition time")
    gifti_files = traits.List(
        File(exists=True),
        mandatory=True,
        desc="list of surface geometry files (length 2 with order [L,R])")
コード例 #14
0
class SpikesInputSpec(BaseInterfaceInputSpec):
    in_file = File(exists=True, mandatory=True, desc='input fMRI dataset')
    in_mask = File(exists=True, desc='brain mask')
    invert_mask = traits.Bool(False, usedefault=True, desc='invert mask')
    no_zscore = traits.Bool(False, usedefault=True, desc='do not zscore')
    detrend = traits.Bool(True, usedefault=True, desc='do detrend')
    spike_thresh = traits.Float(
        6.,
        usedefault=True,
        desc='z-score to call one timepoint of one axial slice a spike')
    skip_frames = traits.Int(
        0,
        usedefault=True,
        desc='number of frames to skip in the beginning of the time series')
    out_tsz = File('spikes_tsz.txt', usedefault=True, desc='output file name')
    out_spikes = File('spikes_idx.txt',
                      usedefault=True,
                      desc='output file name')
コード例 #15
0
ファイル: utils.py プロジェクト: sitek/fmriprep
class TPM2ROIInputSpec(BaseInterfaceInputSpec):
    in_tpm = File(exists=True,
                  mandatory=True,
                  desc='Tissue probability map file in T1 space')
    in_mask = File(exists=True,
                   mandatory=True,
                   desc='Binary mask of skull-stripped T1w image')
    mask_erode_mm = traits.Float(xor=['mask_erode_prop'],
                                 desc='erode input mask (kernel width in mm)')
    erode_mm = traits.Float(xor=['erode_prop'],
                            desc='erode output mask (kernel width in mm)')
    mask_erode_prop = traits.Float(
        xor=['mask_erode_mm'], desc='erode input mask (target volume ratio)')
    erode_prop = traits.Float(xor=['erode_mm'],
                              desc='erode output mask (target volume ratio)')
    prob_thresh = traits.Float(
        0.95,
        usedefault=True,
        desc='threshold for the tissue probability maps')
コード例 #16
0
class ConformInputSpec(BaseInterfaceInputSpec):
    in_file = File(exists=True, mandatory=True, desc='Input image')
    target_zooms = traits.Tuple(traits.Float,
                                traits.Float,
                                traits.Float,
                                desc='Target zoom information')
    target_shape = traits.Tuple(traits.Int,
                                traits.Int,
                                traits.Int,
                                desc='Target shape information')
コード例 #17
0
ファイル: transitional.py プロジェクト: waringjd/mriqc
class GCORInputSpec(CommandLineInputSpec):
    in_file = File(desc='input dataset to compute the GCOR over',
                   argstr='-input %s',
                   position=-1,
                   mandatory=True,
                   exists=True,
                   copyfile=False)

    mask = File(desc='mask dataset, for restricting the computation',
                argstr='-mask %s',
                exists=True,
                copyfile=False)

    nfirst = traits.Int(0,
                        argstr='-nfirst %d',
                        desc='specify number of initial TRs to ignore')
    no_demean = traits.Bool(False,
                            argstr='-no_demean',
                            desc='do not (need to) demean as first step')
コード例 #18
0
class MultiApplyTransformsInputSpec(ApplyTransformsInputSpec):
    input_image = InputMultiPath(File(exists=True), mandatory=True,
                                 desc='input time-series as a list of volumes after splitting'
                                      ' through the fourth dimension')
    num_threads = traits.Int(1, usedefault=True, nohash=True,
                             desc='number of parallel processes')
    save_cmd = traits.Bool(True, usedefault=True,
                           desc='write a log of command lines that were applied')
    copy_dtype = traits.Bool(False, usedefault=True,
                             desc='copy dtype from inputs to outputs')
コード例 #19
0
ファイル: itk.py プロジェクト: luzhengang/fmriprep
class FUGUEvsm2ANTSwarpInputSpec(BaseInterfaceInputSpec):
    in_file = File(exists=True,
                   mandatory=True,
                   desc='input displacements field map')
    pe_dir = traits.Enum('i',
                         'i-',
                         'j',
                         'j-',
                         'k',
                         'k-',
                         desc='phase-encoding axis')
コード例 #20
0
ファイル: utils.py プロジェクト: anibalsolon/fmriprep
class TPM2ROIInputSpec(BaseInterfaceInputSpec):
    t1_tpm = File(exists=True,
                  mandatory=True,
                  desc='Tissue probability map file in T1 space')
    t1_mask = File(exists=True,
                   mandatory=True,
                   desc='Binary mask of skull-stripped T1w image')
    bold_mask = File(exists=True,
                     mandatory=True,
                     desc='Binary mask of skull-stripped BOLD image')
    mask_erode_mm = traits.Float(0.0,
                                 usedefault=True,
                                 desc='erode input mask (kernel width in mm)')
    erode_mm = traits.Float(0.0,
                            usedefault=True,
                            desc='erode output mask (kernel width in mm)')
    prob_thresh = traits.Float(
        0.95,
        usedefault=True,
        desc='threshold for the tissue probability maps')
コード例 #21
0
ファイル: webapi.py プロジェクト: waringjd/mriqc
class UploadIQMsInputSpec(BaseInterfaceInputSpec):
    in_iqms = File(exists=True,
                   mandatory=True,
                   desc='the input IQMs-JSON file')
    url = Str(mandatory=True, desc='URL (protocol and name) listening')
    port = traits.Int(desc='MRIQCWebAPI service port')
    path = Str(desc='MRIQCWebAPI endpoint root path')
    email = Str(desc='set sender email')
    strict = traits.Bool(False,
                         usedefault=True,
                         desc='crash if upload was not succesfull')
コード例 #22
0
ファイル: nilearn.py プロジェクト: anibalsolon/fmriprep
class MaskEPIInputSpec(BaseInterfaceInputSpec):
    in_files = InputMultiPath(File(exists=True),
                              mandatory=True,
                              desc='input EPI or list of files')
    lower_cutoff = traits.Float(0.2, usedefault=True)
    upper_cutoff = traits.Float(0.85, usedefault=True)
    connected = traits.Bool(True, usedefault=True)
    opening = traits.Int(2, usedefault=True)
    exclude_zeros = traits.Bool(False, usedefault=True)
    ensure_finite = traits.Bool(True, usedefault=True)
    target_affine = traits.File()
    target_shape = traits.File()
コード例 #23
0
class FunctionalQCInputSpec(BaseInterfaceInputSpec):
    in_epi = File(exists=True, mandatory=True, desc='input EPI file')
    in_hmc = File(exists=True,
                  mandatory=True,
                  desc='input motion corrected file')
    in_tsnr = File(exists=True, mandatory=True, desc='input tSNR volume')
    in_mask = File(exists=True, mandatory=True, desc='input mask')
    direction = traits.Enum('all',
                            'x',
                            'y',
                            '-x',
                            '-y',
                            usedefault=True,
                            desc='direction for GSR computation')
    in_fd = File(exists=True,
                 mandatory=True,
                 desc='motion parameters for FD computation')
    fd_thres = traits.Float(0.2,
                            usedefault=True,
                            desc='motion threshold for FD computation')
    in_dvars = File(exists=True,
                    mandatory=True,
                    desc='input file containing DVARS')
    in_fwhm = traits.List(traits.Float,
                          mandatory=True,
                          desc='smoothness estimated with AFNI')
コード例 #24
0
class StructuralQCOutputSpec(TraitedSpec):
    summary = traits.Dict(desc='summary statistics per tissue')
    icvs = traits.Dict(desc='intracranial volume (ICV) fractions')
    rpve = traits.Dict(desc='partial volume fractions')
    size = traits.Dict(desc='image sizes')
    spacing = traits.Dict(desc='image sizes')
    fwhm = traits.Dict(desc='full width half-maximum measure')
    inu = traits.Dict(desc='summary statistics of the bias field')
    snr = traits.Dict
    snrd = traits.Dict
    cnr = traits.Float
    fber = traits.Float
    efc = traits.Float
    qi_1 = traits.Float
    wm2max = traits.Float
    cjv = traits.Float
    out_qc = traits.Dict(desc='output flattened dictionary with all measures')
    out_noisefit = File(exists=True,
                        desc='plot of background noise and chi fitting')
    tpm_overlap = traits.Dict
コード例 #25
0
class MaskEPIInputSpec(BaseInterfaceInputSpec):
    in_files = InputMultiPath(File(exists=True),
                              mandatory=True,
                              desc='input EPI or list of files')
    lower_cutoff = traits.Float(0.2, usedefault=True)
    upper_cutoff = traits.Float(0.85, usedefault=True)
    connected = traits.Bool(True, usedefault=True)
    enhance_t2 = traits.Bool(False,
                             usedefault=True,
                             desc='enhance T2 contrast on image')
    opening = traits.Int(2, usedefault=True)
    closing = traits.Bool(True, usedefault=True)
    fill_holes = traits.Bool(True, usedefault=True)
    exclude_zeros = traits.Bool(False, usedefault=True)
    ensure_finite = traits.Bool(True, usedefault=True)
    target_affine = traits.Either(None,
                                  traits.File(exists=True),
                                  default=None,
                                  usedefault=True)
    target_shape = traits.Either(None,
                                 traits.File(exists=True),
                                 default=None,
                                 usedefault=True)
    no_sanitize = traits.Bool(False, usedefault=True)
コード例 #26
0
class SpikesOutputSpec(TraitedSpec):
    out_tsz = File(
        desc='slice-wise z-scored timeseries (Z x N), inside brainmask')
    out_spikes = File(desc='indices of spikes')
    num_spikes = traits.Int(desc='number of spikes found (total)')
コード例 #27
0
ファイル: multiecho.py プロジェクト: waringjd/fmriprep
class MaskT2SMapOutputSpec(TraitedSpec):
    masked_t2s = File(exists=True, desc='masked T2* map')
コード例 #28
0
ファイル: multiecho.py プロジェクト: waringjd/fmriprep
class FirstEchoOutputSpec(TraitedSpec):
    first_image = File(exists=True, desc='BOLD EPI series for the first echo')
    first_ref_image = File(exists=True,
                           desc='generated reference image for '
                           'the first echo')
コード例 #29
0
ファイル: multiecho.py プロジェクト: waringjd/fmriprep
class T2SMapOutputSpec(TraitedSpec):
    t2s_vol = File(exists=True, desc='T2* map')
    opt_comb = File(exists=True, desc='optimal combination of echos')
コード例 #30
0
class RotationMaskOutputSpec(TraitedSpec):
    out_file = File(exists=True, desc='rotation mask (if any)')