Exemplo n.º 1
0
class RefineBrainMaskInputSpec(BaseInterfaceInputSpec):
    in_anat = File(exists=True, mandatory=True,
                   desc='input anatomical reference (INU corrected)')
    in_aseg = File(exists=True, mandatory=True,
                   desc='input ``aseg`` file, in NifTi format.')
    in_ants = File(exists=True, mandatory=True,
                   desc='brain tissue segmentation generated with antsBrainExtraction.sh')
Exemplo n.º 2
0
class ArtifactMaskInputSpec(BaseInterfaceInputSpec):
    in_file = File(exists=True, mandatory=True, desc='File to be plotted')
    head_mask = File(exists=True, mandatory=True, desc='head mask')
    rot_mask = File(exists=True, desc='a rotation mask')
    nasion_post_mask = File(exists=True,
                            mandatory=True,
                            desc='nasion to posterior of cerebellum mask')
Exemplo n.º 3
0
class ConcatROIsInputSpec(BaseInterfaceInputSpec):
    in_file = File(exists=True, mandatory=True, desc='input file')
    in_mask = File(exists=True, mandatory=True, desc='input mask')
    ref_header = File(
        exists=True,
        mandatory=True,
        desc='reference NIfTI file with desired output header/affine')
Exemplo n.º 4
0
class ComputeQI2InputSpec(BaseInterfaceInputSpec):
    in_file = File(exists=True, mandatory=True, desc='File to be plotted')
    air_msk = File(exists=True,
                   mandatory=True,
                   desc='air (without artifacts) mask')
    erodemsk = traits.Bool(True, usedefault=True, desc='erode mask')
    ncoils = traits.Int(12, usedefault=True, desc='number of coils')
Exemplo n.º 5
0
class DemeanImageInputSpec(BaseInterfaceInputSpec):
    in_file = File(exists=True, mandatory=True,
                   desc='image to be demeaned')
    in_mask = File(exists=True, mandatory=True,
                   desc='mask where median will be calculated')
    only_mask = traits.Bool(False, usedefault=True,
                            desc='demean only within mask')
Exemplo n.º 6
0
class PlotContoursInputSpec(BaseInterfaceInputSpec):
    in_file = File(exists=True, mandatory=True, desc='File to be plotted')
    in_contours = File(exists=True,
                       mandatory=True,
                       desc='file to pick the contours from')
    cut_coords = traits.Int(8, usedefault=True, desc='number of slices')
    levels = traits.List([.5],
                         traits.Float,
                         usedefault=True,
                         desc='add a contour per level')
    colors = traits.List(['r'],
                         traits.Str,
                         usedefault=True,
                         desc='colors to be used for contours')
    display_mode = traits.Enum('ortho',
                               'x',
                               'y',
                               'z',
                               'yx',
                               'xz',
                               'yz',
                               usedefault=True,
                               desc='visualization mode')
    saturate = traits.Bool(False, usedefault=True, desc='saturate background')
    out_file = traits.File(exists=False, desc='output file name')
    vmin = traits.Float(desc='minimum intensity')
    vmax = traits.Float(desc='maximum intensity')
Exemplo n.º 7
0
class InvertT1wInputSpec(BaseInterfaceInputSpec):
    in_file = File(exists=True,
                   mandatory=True,
                   desc='Skull-stripped T1w structural image')
    ref_file = File(exists=True,
                    mandatory=True,
                    desc='Skull-stripped reference image')
Exemplo n.º 8
0
class FSDetectInputsOutputSpec(TraitedSpec):
    t2w = File(desc='reference T2w image')
    use_t2w = traits.Bool(desc='enable use of T2w downstream computation')
    flair = File(desc='reference FLAIR image')
    use_flair = traits.Bool(desc='enable use of FLAIR downstream computation')
    hires = traits.Bool(desc='enable hi-res processing')
    mris_inflate = traits.Str(desc='mris_inflate argument')
Exemplo n.º 9
0
class SubjectSummaryInputSpec(BaseInterfaceInputSpec):
    t1w = InputMultiPath(File(exists=True), desc='T1w structural images')
    t2w = InputMultiPath(File(exists=True), desc='T2w structural images')
    subjects_dir = Directory(desc='FreeSurfer subjects directory')
    subject_id = Str(desc='Subject ID')
    bold = traits.List(desc='BOLD functional series')
    output_spaces = traits.List(desc='Target spaces')
    template = traits.Enum('MNI152NLin2009cAsym', desc='Template space')
Exemplo n.º 10
0
class CombineROIsInputSpec(BaseInterfaceInputSpec):
    in_files = InputMultiPath(File(exists=True),
                              mandatory=True,
                              desc='input list of ROIs')
    ref_header = File(
        exists=True,
        mandatory=True,
        desc='reference NIfTI file with desired output header/affine')
Exemplo n.º 11
0
class MaskT2SMapInputSpec(BaseInterfaceInputSpec):
    image = File(mandatory=True, exists=True, desc='T2* volume to mask')
    mask = File(mandatory=True,
                exists=True,
                desc='skull-stripped mean optimal combination volume')
    compress = traits.Bool(True,
                           usedefault=True,
                           desc='use gzip compression on .nii output')
Exemplo n.º 12
0
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)
Exemplo n.º 13
0
class FSDetectInputsInputSpec(BaseInterfaceInputSpec):
    t1w_list = InputMultiPath(File(exists=True),
                              mandatory=True,
                              desc='input file, part of a BIDS tree')
    t2w_list = InputMultiPath(File(exists=True),
                              desc='input file, part of a BIDS tree')
    hires_enabled = traits.Bool(True,
                                usedefault=True,
                                desc='enable hi-resolution processing')
Exemplo n.º 14
0
class MCFLIRT2ITKInputSpec(BaseInterfaceInputSpec):
    in_files = InputMultiPath(File(exists=True), mandatory=True,
                              desc='list of MAT files from MCFLIRT')
    in_reference = File(exists=True, mandatory=True,
                        desc='input image for spatial reference')
    in_source = File(exists=True, mandatory=True,
                     desc='input image for spatial source')
    num_threads = traits.Int(1, usedefault=True, nohash=True,
                             desc='number of parallel processes')
Exemplo n.º 15
0
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')
    njobs = traits.Int(1, usedefault=True, nohash=True, desc='number of jobs')
Exemplo n.º 16
0
class FirstEchoInputSpec(BaseInterfaceInputSpec):
    in_files = InputMultiPath(File(exists=True),
                              mandatory=True,
                              minlen=2,
                              desc='multi-echo BOLD EPIs')
    ref_imgs = InputMultiPath(File(exists=True),
                              mandatory=True,
                              minlen=2,
                              desc='generated reference image for each '
                              'multi-echo BOLD EPI')
    te_list = traits.List(traits.Float, mandatory=True, desc='echo times')
Exemplo n.º 17
0
class PlotBaseInputSpec(BaseInterfaceInputSpec):
    in_file = File(exists=True, mandatory=True, desc='File to be plotted')
    title = traits.Str(desc='a title string for the plot')
    annotate = traits.Bool(True, usedefault=True, desc='annotate left/right')
    figsize = traits.Tuple((11.69, 8.27),
                           traits.Float,
                           traits.Float,
                           usedefault=True,
                           desc='Figure size')
    dpi = traits.Int(300, usedefault=True, desc='Desired DPI of figure')
    out_file = File('mosaic.svg', usedefault=True, desc='output file name')
    cmap = traits.Str('Greys_r', usedefault=True)
Exemplo n.º 18
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')
Exemplo n.º 19
0
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')
Exemplo n.º 20
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')
Exemplo n.º 21
0
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'
Exemplo n.º 22
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')
Exemplo n.º 23
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')
Exemplo n.º 24
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)
Exemplo n.º 25
0
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')
Exemplo n.º 26
0
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)")
Exemplo n.º 27
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')
Exemplo n.º 28
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')
Exemplo n.º 29
0
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')
Exemplo n.º 30
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)