Ejemplo n.º 1
0
class _BIDSFreeSurferDirInputSpec(BaseInterfaceInputSpec):
    derivatives = Directory(exists=True,
                            mandatory=True,
                            desc='BIDS derivatives directory')
    freesurfer_home = Directory(exists=True,
                                mandatory=True,
                                desc='FreeSurfer installation directory')
    subjects_dir = traits.Either(traits.Str(),
                                 Directory(),
                                 default='freesurfer',
                                 usedefault=True,
                                 desc='Name of FreeSurfer subjects directory')
    spaces = traits.List(traits.Str, desc='Set of output spaces to prepare')
    overwrite_fsaverage = traits.Bool(
        False,
        usedefault=True,
        desc='Overwrite fsaverage directories, if present')
Ejemplo n.º 2
0
class HammerAttributeCreatorInputSpec(CommandLineInputSpec):
    Scale = traits.Int(desc="Determine Scale of Ball", argstr="--Scale %d")
    Strength = traits.Float(desc="Determine Strength of Edges",
                            argstr="--Strength %f")
    inputGMVolume = File(desc="Required: input grey matter posterior image",
                         exists=True,
                         argstr="--inputGMVolume %s")
    inputWMVolume = File(desc="Required: input white matter posterior image",
                         exists=True,
                         argstr="--inputWMVolume %s")
    inputCSFVolume = File(desc="Required: input CSF posterior image",
                          exists=True,
                          argstr="--inputCSFVolume %s")
    outputVolumeBase = traits.Str(
        desc=
        "Required: output image base name to be appended for each feature vector.",
        argstr="--outputVolumeBase %s")
Ejemplo n.º 3
0
Archivo: fsl.py Proyecto: em-blue/QUIT
class ApplyXfm4DInputSpec(FSLCommandInputSpec):
    in_file = File(exists=True, position=0, argstr='%s',
                   mandatory=True, desc="timeseries to motion-correct")
    ref_vol = File(exists=True, position=1, argstr='%s',
                   mandatory=True, desc="volume with final FOV and resolution")
    out_file = File(exists=True, position=2, argstr='%s',
                    genfile=True, desc="file to write", hash_files=False)
    trans_file = File(argstr='%s', position=3, desc="single tranformation matrix", xor=[
        "trans_dir"], requires=["single_matrix"])
    trans_dir = File(argstr='%s', position=3,
                     desc="folder of transformation matrices", xor=["trans_file"])
    single_matrix = traits.Bool(
        argstr='-singlematrix', desc="true if applying one volume to all timepoints")
    four_digit = traits.Bool(
        argstr='-fourdigit', desc="true mat names have four digits not five")
    user_prefix = traits.Str(
        argstr='-userprefix %s', desc="supplied prefix if mats don't start with 'MAT_'")
Ejemplo n.º 4
0
class resultsInput(TraitedSpec):   
    in_file = traits.File(desc="Input file ")
    mask = traits.File(desc="ROI PET mask ")
    surf_left = traits.File(desc="Left Surface mesh (.obj) ")
    mask_left = traits.File(desc="Left Surface mask (.txt) ")
    surf_right = traits.File(desc="Right Surface mesh (.obj) ")
    mask_right = traits.File(desc="Right Surface mask (.txt) ")

    header = traits.File(desc="PET Header")
    out_file_3d = traits.File(desc="3d Output file ")
    out_file_4d = traits.File(desc="4d Output file ")
    dim = traits.Str("Number of dimensions")
    sub = traits.Str("Subject ID")
    task = traits.Str(default_value='NA',usedefault=True)
    ses = traits.Str(desc="Ses",usedefault=True,default_value="NA")
    run = traits.Str(desc="Run",usedefault=True,default_value="NA")
    acq = traits.Str(desc="Acquisition",usedefault=True,default_value="NA")
    rec = traits.Str(desc="Reconstruction",usedefault=True,default_value="NA")
    node  = traits.Str(mandatory=True, desc="Node name")
Ejemplo n.º 5
0
class coreg_qc_metricsInput(BaseInterfaceInputSpec):
    pet = traits.File(exists=True, mandatory=True, desc="Input PET image")
    t1 = traits.File(exists=True, mandatory=True, desc="Input T1 MRI")
    t1_brain_mask = traits.File(exists=True,
                                mandatory=True,
                                desc="Input T1 MRI")
    #pet_brain_mask = traits.File(exists=True, mandatory=True, desc="Input T1 MRI")
    sid = traits.Str(desc="Subject")
    ses = traits.Str(desc="Session")
    task = traits.Str(desc="Task")
    run = traits.Str(desc="Run")
    rec = traits.Str(desc="Reconstruction")
    acq = traits.Str(desc="Acquisition")
    study_prefix = traits.Str(desc="Study Prefix")
    out_file = traits.File(desc="Output file")
    clobber = traits.Bool(desc="Overwrite output file", default=False)
Ejemplo n.º 6
0
class ResampleInput(CommandLineInputSpec):
    in_file = File(position=0,
                   argstr="%s",
                   mandatory=True,
                   desc="image to resample")
    out_file = File(position=1, argstr="%s", desc="resampled image")
    model_file = File(position=2,
                      argstr="-like %s",
                      mandatory=False,
                      desc="model image")

    transformation = File(argstr="-transformation %s",
                          desc="image to resample")
    interpolation = traits.Enum('trilinear',
                                'tricubic',
                                'nearest_neighbour',
                                'sinc',
                                argstr="-%s",
                                desc="interpolation type",
                                default='trilinear')
    invert = traits.Enum('invert_transformation',
                         'noinvert_transformation',
                         argstr="-%s",
                         desc="invert transfomation matrix",
                         default='noinvert_transformation')
    keep_real_range = traits.Bool(argstr="-keep_real_range",
                                  default_value=True,
                                  use_default=True,
                                  desc="Use sampling of input image")
    use_input_sampling = traits.Bool(argstr="-use_input_sampling",
                                     default_value=False,
                                     desc="Use sampling of input image")
    tfm_input_sampling = traits.Bool(argstr="-tfm_input_sampling",
                                     default_value=False,
                                     desc="Use sampling of transformation")
    step = traits.Str(argstr="-step %s", desc="Step size in (X, Y, Z) dims.")

    clobber = traits.Bool(argstr="-clobber",
                          usedefault=True,
                          default_value=True,
                          desc="Overwrite output file")
    verbose = traits.Bool(argstr="-verbose",
                          usedefault=True,
                          default_value=True,
                          desc="Write messages indicating progress")
Ejemplo n.º 7
0
class TestMathInputSpec(TraitedSpec):

    x = traits.Either(traits.Float(),
                      traits.File(exists=True),
                      traits.List(traits.Float),
                      traits.List(traits.File(exists=True)),
                      desc='first arg')
    y = traits.Either(traits.Float(),
                      traits.File(exists=True),
                      mandatory=False,
                      desc='second arg')
    op = traits.Str(mandatory=True, desc='operation')

    z = traits.File(genfile=True, mandatory=False, desc="Name for output file")

    as_file = traits.Bool(False,
                          desc="Whether to write as a file",
                          usedefault=True)
Ejemplo n.º 8
0
class SaveParamsAsNIfTIInputSpec(BaseInterfaceInputSpec):

    params_file = File(exists=True,
                       mandatory=True,
                       desc="The parameters fitted by BatchNODDIFitting")

    roi_file = File(exists=True,
                    mandatory=True,
                    desc="The ROI file created by CreateROI")

    brain_mask_file = File(exists=True,
                           mandatory=True,
                           desc="A whole brain mask")

    output_prefix = traits.Str(  # @UndefinedVariable
        "processed_noddi",
        mandatory=False,
        desc="Prefix of the generated output files")
Ejemplo n.º 9
0
class BRAINSCutInputSpec(CommandLineInputSpec):
    netConfiguration = File(desc="XML File defining BRAINSCut parameters. OLD NAME. PLEASE USE modelConfigurationFilename instead.", exists=True, argstr="--netConfiguration %s")
    modelConfigurationFilename = File(desc="XML File defining BRAINSCut parameters", exists=True, argstr="--modelConfigurationFilename %s")
    trainModelStartIndex = traits.Int(desc="Starting iteration for training", argstr="--trainModelStartIndex %d")
    verbose = traits.Int(desc="print out some debugging information", argstr="--verbose %d")
    multiStructureThreshold = traits.Bool(desc="multiStructureThreshold module to deal with overlaping area", argstr="--multiStructureThreshold ")
    histogramEqualization = traits.Bool(desc="A Histogram Equalization process could be added to the creating/applying process from Subject To Atlas. Default is false, which genreate input vectors without Histogram Equalization. ", argstr="--histogramEqualization ")
    computeSSEOn = traits.Bool(desc="compute Sum of Square Error (SSE) along the trained model until the number of iteration given in the modelConfigurationFilename file", argstr="--computeSSEOn ")
    generateProbability = traits.Bool(desc="Generate probability map", argstr="--generateProbability ")
    createVectors = traits.Bool(desc="create vectors for training neural net", argstr="--createVectors ")
    trainModel = traits.Bool(desc="train the neural net", argstr="--trainModel ")
    NoTrainingVectorShuffling = traits.Bool(desc="If this flag is on, there will be no shuffling.", argstr="--NoTrainingVectorShuffling ")
    applyModel = traits.Bool(desc="apply the neural net", argstr="--applyModel ")
    validate = traits.Bool(desc="validate data set.Just need for the first time run ( This is for validation of xml file and not working yet )", argstr="--validate ")
    method = traits.Enum("RandomForest", "ANN", argstr="--method %s")
    numberOfTrees = traits.Int(desc=" Random tree: number of trees. This is to be used when only one model with specified depth wish to be created. ", argstr="--numberOfTrees %d")
    randomTreeDepth = traits.Int(desc=" Random tree depth. This is to be used when only one model with specified depth wish to be created. ", argstr="--randomTreeDepth %d")
    modelFilename = traits.Str(desc=" model file name given from user (not by xml  configuration file) ", argstr="--modelFilename %s")
Ejemplo n.º 10
0
class ConfoundRegressionInputSpec(BaseInterfaceInputSpec):
    bold = File(exists=True,
                mandatory=True,
                desc="Preprocessed bold file to clean")
    movpar_file = File(exists=True,
                       mandatory=True,
                       desc="CSV file with the 6 rigid body parameters")
    brain_mask = File(exists=True,
                      mandatory=True,
                      desc="EPI-formated whole brain mask")
    WM_mask = File(exists=True,
                   mandatory=True,
                   desc="EPI-formated white matter mask")
    CSF_mask = File(exists=True, mandatory=True, desc="EPI-formated CSF mask")
    aCompCor_method = traits.Str(
        desc=
        "The type of evaluation for the number of aCompCor components: either '50%' or 'first_5'."
    )
Ejemplo n.º 11
0
class OrientOutputSpec(TraitedSpec):
    out_file = File(exists=True, desc="image with modified orientation")

    orient = traits.Str(desc="FSL left-right orientation")

    sform = traits.List(traits.Float(),
                        minlen=16,
                        maxlen=16,
                        desc="the 16 elements of the sform matrix")

    qform = traits.List(traits.Float(),
                        minlen=16,
                        maxlen=16,
                        desc="the 16 elements of the qform matrix")

    sformcode = traits.Int(desc="sform integer code")

    qformcode = traits.Int(desc="qform integer code")
Ejemplo n.º 12
0
class RegSegInputSpec(RegSegInputGroupSpec):
    in_fixed = InputMultiPath(
        File(exists=True), argstr='-F %s', mandatory=True,
        desc=('target volume/image(s) contrast to register contours to'))

    in_prior = InputMultiPath(
        File(exists=True), argstr='-P %s', mandatory=True,
        desc=('vtk contours that will be registered to in_fixed. Should be '
              'given in hierarchical order (from top to bottom, last is bg)'))
    in_mask = File(exists=True, argstr='-M %s', desc='fixed mask file')

    levels = traits.Int(
        1, argstr='-L %d', desc='number of levels in multi-resolution schemes')
    out_prefix = traits.Str(
        'regseg', argstr='-o %s', usedefault=True, desc='output files prefix')
    log_filename = File(desc='filepath for log file', argstr='-l %s')
    images_verbosity = traits.Int(
        1, argstr='-v %d', desc=('verbosity of intermediate results output'))
Ejemplo n.º 13
0
class ProbMapInputSpec(ImageGridReportletInputSpec):
    name = traits.Str(mandatory=True, desc='Name of image')
    image = traits.Either(File(exists=True, mandatory=True, desc='Image file'),
                          None)
    probmapimage = traits.Either(
        File(exists=True, mandatory=True, desc='Probability map'), None)
    slice_to_probmap = traits.Bool(False,
                                   usedefault=True,
                                   desc='If true, calculated slices based on '
                                   'non zero extent of labelimage')
    max_intensity_fraction = traits.Float(
        0.99,
        usedefault=True,
        desc="""The intensity display range is 0, max where max is calculated as:
        ``vals = np.sort(niimg.get_fdata()).ravel()``
        ``vals = vals[vals > 0]``
        ``max = vals[int(len(vals) * max_intensity_fraction)]``
        """)
Ejemplo n.º 14
0
class BrainSuiteShoreReconstructionInputSpec(DipyReconInputSpec):
    radial_order = traits.Int(6, usedefault=True)
    zeta = traits.Float(700, usedefault=True)
    tau = traits.Float(TAU_DEFAULT, usedefault=True)
    regularization = traits.Enum("L2", "L1", usedefault=True)
    # For L2
    lambdaN = traits.Float(1e-8, usedefault=True)
    lambdaL = traits.Float(1e-8, usedefault=True)
    # For L1
    regularization_weighting = traits.Str("CV", usedefault=True)
    l1_positive_constraint = traits.Bool(False, usedefault=True)
    l1_cv = traits.Either(traits.Int(3), None, usedefault=True)
    l1_maxiter = traits.Int(1000, usedefault=True)
    l1_verbose = traits.Bool(False, usedefault=True)
    l1_alpha = traits.Float(1.0, usedefault=True)
    # For EAP
    pos_grid = traits.Int(11, usedefault=True)
    pos_radius = traits.Float(20e-03, usedefault=True)
Ejemplo n.º 15
0
class DegreeCentralityInputSpec(CentralityInputSpec):
    """DegreeCentrality inputspec
    """

    in_file = File(desc='input file to 3dDegreeCentrality',
                   argstr='%s',
                   position=-1,
                   mandatory=True,
                   exists=True,
                   copyfile=False)

    sparsity = traits.Float(desc='only take the top percent of connections',
                            argstr='-sparsity %f')

    oned_file = traits.Str(
        desc='output filepath to text dump of correlation matrix',
        argstr='-out1D %s',
        mandatory=False)
Ejemplo n.º 16
0
class SQLiteGrabberInputSpec(DynamicTraitedSpec, BaseInterfaceInputSpec):
    """
    This class represents a...
    :param DynamicTraitedSpec:
    :param BaseInterfaceInputSpec:
    """
    database_file = File(exists=True, mandatory=True)
    table_name = traits.Str(mandatory=True)
    columns = traits.List(traits.Str, mandatory=True)
    constraints = traits.List(
        traits.Tuple(traits.Str,
                     traits.Either(traits.Str, traits.List(traits.Str))),
        minlen=1,
        desc="The list of column/value pairs for WHERE creation")
    distinct = traits.Bool(default=False, usedefault=True)
    orderby = traits.List(
        traits.Tuple(traits.Str, traits.Enum(('ASC', 'DESC'))),
        desc='List of tuples with column and order direction')
Ejemplo n.º 17
0
class NiiWranglerInputSpec(BaseInterfaceInputSpec):
    nii_files = InputMultiPath(
            traits.Either(traits.List(File(exists=True)),File(exists=True)),
            mandatory=True,
            desc="a list of nifti files to be categorized, matched up, etc.",
            copyfile=False)
    series_map = traits.Dict(
            key_trait=traits.Str(),
            value_trait=traits.List(),
            value = {},
            mandatory=False,
            usedefault=True,
            desc="keys are any member of SCAN_TYPES, values are lists of series\
                  descriptions as recorded in DICOM headers.")
    dicom_info = traits.List(
            mandatory=True,
            desc="one dict for each series in the session, in the order they were\
                  run. each dict should contain at least the series_num (int) and\
                  the series_desc (str).")
    ep_echo_spacing = traits.Either(traits.Enum("NONE"), traits.Float(),
            desc="""
            The effective echo spacing of your BOLD images. Already accounts
            for whether or not iPAT (acceleration in the phase direction) was
            used. If you're using acceleration, then the EES is not going to
            match the 'Echo Spacing' that Siemen's reports in the console.

            Setting this value will prevent any attempt to derive it.""")
    ep_unwarp_dir = traits.Enum("x", "x-", "-x", "y", "y-", "-y", "z", "z-", "-z",
            desc="Setting this value will prevent any attempt to derive it.")
    block_struct_averaging = traits.Bool(False,
            mandatory=False, usedefault=True,
            desc="""
            Causes us to only use the first t1 and t2 images. A kludge for
            some data that fails during structural averaging.""")
    ep_fieldmap_selection = traits.Enum("first","most_recent",
            mandatory=False, usedefault=True,
            desc="""
            If you have more than one set of ep fieldmaps, then you can either
            use the first set during preprocessing of all bold images
            ('first'), or you can select the se fieldmap set that was taken
            most recently prior to acquisition of a given bold image, or -
            failing that - the first available se fieldmap thereafter
            ('most_recent')."""
            )
Ejemplo n.º 18
0
class deployDashInput(BaseInterfaceInputSpec):
    targetDir = traits.File(mandatory=True, desc="Target directory")
    sourceDir = traits.File(mandatory=True, desc="Source directory")
    pvc_method = traits.Str(desc="PVC method")
    quant_method = traits.Str(desc="TKA method")
    analysis_space = traits.Str(desc="Analysis Space")
    pet = traits.File(exists=True, mandatory=True, desc="PET image")
    pet_space_mri = traits.File(exists=True, mandatory=True, desc="Output PETMRI image")
    mri_space_nat = traits.File(exists=True, mandatory=True, desc="Output T1 native space image")
    t1_analysis_space = traits.File(exists=True, mandatory=True, desc="Output T1 in analysis space image")
    pvc = traits.File(exists=True, desc="Output PVC image")
    quant = traits.File(exists=True, desc="Output TKA image")
    sid =traits.Str()
    cid=traits.Str()
    ses=traits.Str()
    task=traits.Str()
    run=traits.Str()

    out_file = traits.File(desc="Output file")
    clobber = traits.Bool(desc="Overwrite output file", default=False)
Ejemplo n.º 19
0
class XNATSinkInputSpec(DynamicTraitedSpec, BaseInterfaceInputSpec):

    _outputs = traits.Dict(traits.Str, value={}, usedefault=True)

    server = traits.Str(mandatory=True,
                        requires=['user', 'pwd'],
                        xor=['config'])

    user = traits.Str()
    pwd = traits.Password()
    config = File(mandatory=True, xor=['server'])
    cache_dir = Directory(desc='')

    project_id = traits.Str(desc='Project in which to store the outputs',
                            mandatory=True)

    subject_id = traits.Str(desc='Set to subject id', mandatory=True)

    experiment_id = traits.Str(desc='Set to workflow name', mandatory=True)

    assessor_id = traits.Str(
        desc=('Option to customize ouputs representation in XNAT - '
              'assessor level will be used with specified id'),
        mandatory=False,
        xor=['reconstruction_id'])

    reconstruction_id = traits.Str(
        desc=('Option to customize ouputs representation in XNAT - '
              'reconstruction level will be used with specified id'),
        mandatory=False,
        xor=['assessor_id'])

    share = traits.Bool(
        desc=('Option to share the subjects from the original project'
              'instead of creating new ones when possible - the created '
              'experiments are then shared backk to the original project'),
        value=False,
        usedefault=True,
        mandatory=False,
    )

    def __setattr__(self, key, value):
        if key not in self.copyable_trait_names():
            self._outputs[key] = value
        else:
            super(XNATSinkInputSpec, self).__setattr__(key, value)
Ejemplo n.º 20
0
class slice_applyTransformsInputSpec(BaseInterfaceInputSpec):
    in_file = File(exists=True, mandatory=True, desc="Input 4D EPI")
    ref_file = File(
        exists=True,
        mandatory=True,
        desc="The reference 3D space to which the EPI will be warped.")
    transforms = traits.List(desc="List of transforms to apply to every slice")
    inverses = traits.List(
        desc=
        "Define whether some transforms must be inverse, with a boolean list where true defines inverse e.g.[0,1,0]"
    )
    apply_motcorr = traits.Bool(default=True,
                                desc="Whether to apply motion realignment.")
    motcorr_params = File(exists=True,
                          desc="xforms from head motion estimation .csv file")
    resampling_dim = traits.Str(
        desc="Specification for the dimension of resampling.")
    rabies_data_type = traits.Int(
        mandatory=True, desc="Integer specifying SimpleITK data type.")
Ejemplo n.º 21
0
class FieldBasedWarpInputSpec(ANTSCommandInputSpec):
    in_file = InputMultiPath(File(exists=True),
                             mandatory=True,
                             argstr="-i %s",
                             desc='image(s) to be deformed')
    in_mask = File(exists=True, argstr='-m %s', desc='set a mask')
    in_surf = InputMultiPath(File(exists=True),
                             argstr="-s %s",
                             desc='surface(s) to be deformed')
    out_prefix = traits.Str("fbased",
                            argstr="-o %s",
                            usedefault=True,
                            mandatory=True,
                            desc='output files prefix')
    grid_size_item_trait = traits.Int(10, usedefault=True)
    grid_size = traits.Either(grid_size_item_trait,
                              traits.List(grid_size_item_trait),
                              default=10,
                              argstr="-g %s",
                              xor=['in_coeff'],
                              usedefault=True,
                              desc='size of control points grid')

    in_field = File(exists=True,
                    mandatory=False,
                    argstr="-F %s",
                    desc='forward field',
                    xor='in_inv_field')
    in_inv_field = File(exists=True,
                        mandatory=False,
                        argstr="-R %s",
                        desc='backward field',
                        xor='in_field')
    in_coeff = File(exists=True,
                    mandatory=False,
                    argstr="-C %s",
                    desc='forward field',
                    xor='in_inv_field')
    in_inv_coeff = File(exists=True,
                        mandatory=False,
                        argstr="-I %s",
                        desc='backward field',
                        xor='in_field')
Ejemplo n.º 22
0
class ThreedFourierInputSpec(AFNITraitedSpec):
    in_file = File(desc='input file to 3dFourier',
                   argstr='%s',
                   position=-1,
                   mandatory=True,
                   exists=True)
    out_file = File(desc='output file from 3dFourier',
                    argstr='-prefix %s',
                    position=-2,
                    genfile=True)
    lowpass = traits.Float(desc='lowpass',
                           argstr='-lowpass %f',
                           position=0,
                           mandatory=True)
    highpass = traits.Float(desc='highpass',
                            argstr='-highpass %f',
                            position=1,
                            mandatory=True)
    other = traits.Str(desc='other options', argstr='%s')
Ejemplo n.º 23
0
class HDGlioPredictInputSpec(CommandLineInputSpec):

    t1 = traits.File(mandatory=True,
                     exists=True,
                     argstr='-t1 %s',
                     desc='T1 weighted image')
    ct1 = traits.File(mandatory=True,
                      exists=True,
                      argstr='-t1c %s',
                      desc='T1 weighted image')
    t2 = traits.File(mandatory=True,
                     exists=True,
                     argstr='-t2 %s',
                     desc='T1 weighted image')
    flair = traits.File(mandatory=True,
                        exists=True,
                        argstr='-flair %s',
                        desc='T1 weighted image')
    out_file = traits.Str(argstr='-o %s', desc='output file (or folder) name.')
Ejemplo n.º 24
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",
    )
    registration_dof = traits.Enum(6,
                                   9,
                                   12,
                                   desc="Registration degrees of freedom",
                                   mandatory=True)
    registration_init = traits.Enum(
        "register",
        "header",
        mandatory=True,
        desc='Whether to initialize registration with the "header"'
        ' or by centering the volumes ("register")',
    )
    confounds_file = File(exists=True, desc="Confounds file")
    tr = traits.Float(desc="Repetition time", mandatory=True)
    dummy_scans = traits.Either(traits.Int(),
                                None,
                                desc="number of dummy scans specified by user")
    algo_dummy_scans = traits.Int(
        desc="number of dummy scans determined by algorithm")
    echo_idx = traits.List([], usedefault=True, desc="BIDS echo identifiers")
Ejemplo n.º 25
0
Archivo: fsl.py Proyecto: amrka/banana
class MelodicL1FSFInputSpec(BaseInterfaceInputSpec):

    output_dir = traits.String(desc="Output directory", mandatory=True)

    tr = traits.Float(desc="TR", mandatory=True)
    brain_thresh = traits.Float(
        desc="Brain/Background threshold %", mandatory=True)
    dwell_time = traits.Float(desc="EPI dwell time", mandatory=True)
    te = traits.Float(desc="TE", mandatory=True)
    unwarp_dir = traits.Str(desc="Unwrap direction", mandatory=True)
    sfwhm = traits.Float(desc="Smoothing FWHM", mandatory=True)
    fmri = File(exists=True, desc="4D functional data", mandatory=True)
    fmri_ref = File(
        exists=True, desc="reference functional data", mandatory=True)
    fmap = File(exists=True, desc="fieldmap file", mandatory=True)
    fmap_mag = File(
        exists=True, desc="fieldmap magnitude file", mandatory=True)
    structural = File(exist=True, desc="Structural image", mandatory=True)
    high_pass = traits.Float(desc="high pass cutoff (s)", mandatory=True)
Ejemplo n.º 26
0
class DataGrabberInputSpec(DynamicTraitedSpec,
                           BaseInterfaceInputSpec):  # InterfaceInputSpec):
    base_directory = Directory(
        exists=True,
        desc='Path to the base directory consisting of subject data.')
    raise_on_empty = traits.Bool(
        True,
        usedefault=True,
        desc='Generate exception if list is empty for a given field')
    sort_filelist = traits.Bool(
        False,
        usedefault=True,
        desc='Sort the filelist that matches the template')
    template = traits.Str(
        mandatory=True,
        desc='Layout used to get files. relative to base directory if defined')
    template_args = traits.Dict(key_trait=traits.Str,
                                value_trait=traits.List(traits.List),
                                desc='Information to plug into template')
Ejemplo n.º 27
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')
    keep_dtype = traits.Bool(False,
                             usedefault=True,
                             desc='keep datatype suffix')
    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)")
Ejemplo n.º 28
0
class JistLaminarVolumetricLayeringInputSpec(CommandLineInputSpec):
    inInner = File(desc="Inner Distance Image (GM/WM boundary)", exists=True, argstr="--inInner %s")
    inOuter = File(desc="Outer Distance Image (CSF/GM boundary)", exists=True, argstr="--inOuter %s")
    inNumber = traits.Int(desc="Number of layers", argstr="--inNumber %d")
    inMax = traits.Int(desc="Max iterations for narrow band evolution", argstr="--inMax %d")
    inMin = traits.Float(desc="Min change ratio for narrow band evolution", argstr="--inMin %f")
    inLayering = traits.Enum("distance-preserving", "volume-preserving", desc="Layering method", argstr="--inLayering %s")
    inLayering2 = traits.Enum("outward", "inward", desc="Layering direction", argstr="--inLayering2 %s")
    incurvature = traits.Int(desc="curvature approximation scale (voxels)", argstr="--incurvature %d")
    inratio = traits.Float(desc="ratio smoothing kernel size (voxels)", argstr="--inratio %f")
    inpresmooth = traits.Enum("true", "false", desc="pre-smooth cortical surfaces", argstr="--inpresmooth %s")
    inTopology = traits.Enum("26/6", "6/26", "18/6", "6/18", "6/6", "wcs", "wco", "no", desc="Topology", argstr="--inTopology %s")
    xPrefExt = traits.Enum("nrrd", desc="Output File Type", argstr="--xPrefExt %s")
    outContinuous = traits.Either(traits.Bool, File(), hash_files=False, desc="Continuous depth measurement", argstr="--outContinuous %s")
    outDiscrete = traits.Either(traits.Bool, File(), hash_files=False, desc="Discrete sampled layers", argstr="--outDiscrete %s")
    outLayer = traits.Either(traits.Bool, File(), hash_files=False, desc="Layer boundary surfaces", argstr="--outLayer %s")
    null = traits.Str(desc="Execution Time", argstr="--null %s")
    xDefaultMem = traits.Int(desc="Set default maximum heap size", argstr="-xDefaultMem %d")
    xMaxProcess = traits.Int(1, desc="Set default maximum number of processes.", argstr="-xMaxProcess %d", usedefault=True)
Ejemplo n.º 29
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)
    registration_init = traits.Enum('register', 'header', mandatory=True,
                                    desc='Whether to initialize registration with the "header"'
                                         ' or by centering the volumes ("register")')
    confounds_file = File(exists=True, desc='Confounds file')
    tr = traits.Float(desc='Repetition time', mandatory=True)
    dummy_scans = traits.Either(traits.Int(), None, desc='number of dummy scans specified by user')
    algo_dummy_scans = traits.Int(desc='number of dummy scans determined by algorithm')
Ejemplo n.º 30
0
class CalcInput(CommandLineInputSpec):
    in_file = InputMultiPath(File(exits=True, mandatory=True),
                             position=0,
                             desc='list of inputs',
                             argstr='%s')
    out_file = File(position=1, argstr="%s", desc="output image")

    expression = traits.Str(position=2,
                            argstr="-expression '%s'",
                            desc="algorithm")

    clobber = traits.Bool(argstr="-clobber",
                          usedefault=True,
                          default_value=True,
                          desc="Overwrite output file")
    verbose = traits.Bool(argstr="-verbose",
                          usedefault=True,
                          default_value=True,
                          desc="Write messages indicating progress")