示例#1
0
class LoadBIDSModelInputSpec(BaseInterfaceInputSpec):
    bids_dir = Directory(exists=True,
                         mandatory=True,
                         desc='BIDS dataset root directory')
    derivatives = traits.Either(traits.Bool,
                                InputMultiPath(Directory(exists=True)),
                                desc='Derivative folders')
    model = traits.Dict(desc='Model specification', mandatory=True)
    selectors = traits.Dict(desc='Limit collected sessions', usedefault=True)
    force_index = InputMultiPath(
        traits.Str, desc='Patterns to select sub-directories of BIDS root')
    ignore = InputMultiPath(
        traits.Str, desc='Patterns to ignore sub-directories of BIDS root')
示例#2
0
文件: coils.py 项目: szho42/banana
class HIPCombineChannelsInputSpec(BaseInterfaceInputSpec):

    magnitudes_dir = Directory(exists=True, desc=(
        "Input directory containing coil magnitude images."))
    phases_dir = Directory(exists=True, desc=(
        "Input directory containing coil phase images."))
    in_fname_re = traits.Str(
        'coil_(?P<channel>\d+)_(?P<echo>\d+)\.nii\.gz', usedefault=True,
        desc=("The format string used to generate the save channel filenames. "
              "Must use the 'channel' and 'echo' field names"))
    magnitude = File(genfile=True, desc="Combined magnitude image")
    phase = File(genfile=True, desc="Combined phase image")
    q = File(genfile=True, desc="Q image")
示例#3
0
class Dcm2niixInputSpec(CommandLineInputSpec):
    source_names = InputMultiPath(File(exists=True),
                                  argstr="%s",
                                  position=-1,
                                  copyfile=False,
                                  mandatory=True,
                                  xor=['source_dir'])
    source_dir = Directory(exists=True,
                           argstr="%s",
                           position=-1,
                           mandatory=True,
                           xor=['source_names'])
    out_filename = traits.Str('%t%p',
                              argstr="-f %s",
                              usedefault=True,
                              desc="Output filename")
    output_dir = Directory(exists=True,
                           argstr='-o %s',
                           genfile=True,
                           desc="Output directory")
    bids_format = traits.Bool(True,
                              argstr='-b',
                              usedefault=True,
                              desc="Create a BIDS sidecar file")
    compress = traits.Enum(
        'i', ['y', 'i', 'n'],
        argstr='-z %s',
        usedefault=True,
        desc="Gzip compress images - [y=pigz, i=internal, n=no]")
    merge_imgs = traits.Bool(False,
                             argstr='-m',
                             usedefault=True,
                             desc="merge 2D slices from same series")
    single_file = traits.Bool(
        False,
        argstr='-s',
        usedefault=True,
        desc="Convert only one image (filename as last input")
    verbose = traits.Bool(False,
                          argstr='-v',
                          usedefault=True,
                          desc="Verbose output")
    crop = traits.Bool(False,
                       argstr='-x',
                       usedefault=True,
                       desc="Crop 3D T1 acquisitions")
    has_private = traits.Bool(
        False,
        argstr='-t',
        usedefault=True,
        desc="Flag if text notes includes private patient details")
示例#4
0
class DWIIntensityNormInputSpec(MRTrix3BaseInputSpec):

    in_files = InputMultiPath(File(exists=True),
                              desc="The input DWI images to normalize",
                              mandatory=True)

    masks = InputMultiPath(
        File(exists=True),
        desc=("Input directory containing brain masks, corresponding to "
              "one per input image in the same order"),
        mandatory=True)

    fa_threshold = traits.Float(
        argstr='-fa_threshold %s',
        desc=("The threshold applied to the Fractional Anisotropy group "
              "template used to derive an approximate white matter mask"))

    fa_template = File(
        genfile=True,
        hash_files=False,
        desc=("The output population specific FA template, which is "
              "threshold to estimate a white matter mask"),
        argstr='%s',
        position=-2)

    wm_mask = File(
        genfile=True,
        hash_files=False,
        desc=("Input directory containing brain masks, corresponding to "
              "one per input image (with the same file name prefix"),
        argstr='%s',
        position=-1)

    in_dir = Directory(
        genfile=True,
        desc="The input directory to collate the DWI images within",
        argstr='%s',
        position=-5)

    mask_dir = File(genfile=True,
                    desc=("Input directory to collate the brain masks within"),
                    argstr='%s',
                    position=-4)

    out_dir = Directory(
        genfile=True,
        argstr='%s',
        position=-3,
        hash_files=False,
        desc=("The output directory to containing the normalised DWI images"))
示例#5
0
class LoadLevel1BIDSModelInputSpec(BaseInterfaceInputSpec):
    bids_dir = Directory(exists=True,
                         mandatory=True,
                         desc='BIDS dataset root directory')
    preproc_dir = Directory(exists=True,
                            desc='Optional preprocessed files directory')
    model = traits.Dict(desc='Model specification', mandatory=True)
    selectors = traits.Dict(desc='Limit collected sessions', usedefault=True)
    include_pattern = InputMultiPath(
        traits.Str, xor=['exclude_pattern'],
        desc='Patterns to select sub-directories of BIDS root')
    exclude_pattern = InputMultiPath(
        traits.Str, xor=['include_pattern'],
        desc='Patterns to ignore sub-directories of BIDS root')
示例#6
0
文件: bids.py 项目: j-bourque/qsiprep
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.Str('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')
示例#7
0
class CopyToDirInputSpec(TraitedSpec):
    in_files = traits.List(traits.Either(File(exists=True),
                                         Directory(exists=True)),
                           mandatory=True,
                           desc='input dicom files')
    out_dir = Directory(desc='the output dicom file')
    use_symlinks = traits.Bool(
        default=True,
        desc=("Whether it is okay to symlink the inputs into the directory "
              "instead of copying them"),
        usedefault=True)
    file_names = traits.List(
        traits.Str,
        desc=("The filenames to use to save the files with within "
              "the directory"))
示例#8
0
文件: matlab.py 项目: ihrke/nipype
class MatlabInputSpec(CommandLineInputSpec):
    """ Basic expected inputs to Matlab interface """

    script  = traits.Str(argstr='-r \"%s;exit\"', desc='m-code to run',
                         mandatory=True, position=-1)
    uses_mcr = traits.Bool(desc='use MCR interface',
                           xor=['nodesktop', 'nosplash',
                                'single_comp_thread'],
                           nohash=True)
    nodesktop = traits.Bool(True, argstr='-nodesktop',
                            usedefault=True,
                            desc='Switch off desktop mode on unix platforms',
                            nohash=True)
    nosplash = traits.Bool(True, argstr='-nosplash', usedefault=True,
                           descr='Switch of splash screen',
                           nohash=True)
    logfile = File(argstr='-logfile %s',
                          desc='Save matlab output to log')
    single_comp_thread = traits.Bool(argstr="-singleCompThread",
                                   desc="force single threaded operation",
                                   nohash=True)
    # non-commandline options
    mfile   = traits.Bool(True, desc='Run m-code using m-file',
                          usedefault=True)
    script_file = File('pyscript.m', usedefault=True,
                              desc='Name of file to write m-code to')
    paths   = InputMultiPath(Directory(), desc='Paths to add to matlabpath')
    prescript = traits.List(["ver,","try,"], usedefault=True,
                            desc='prescript to be added before code')
    postscript = traits.List(["\n,catch ME,",
                              "fprintf(2,'MATLAB code threw an exception:\\n');",
                              "fprintf(2,'%s\\n',ME.message);",
                              "if length(ME.stack) ~= 0, fprintf(2,'File:%s\\nName:%s\\nLine:%d\\n',ME.stack.file,ME.stack.name,ME.stack.line);, end;",
                              "end;"], desc='script added after code', usedefault = True)
示例#9
0
class ConsensusInputSpec(BaseInterfaceInputSpec):
    in_Files = traits.Either(InputMultiPath(File(exists=True)),
                             Directory(exists=True),
                             traits.Str(),
                             traits.List(),
                             mandatory=True)
    maskfile = File(exists=True, desc='total target mask', mandatory=True)
示例#10
0
class FSScriptInputSpec(CommandLineInputSpec):
    ## CROSS first cross sectional analysis
    ## BASE  second generate a subject specific base reference (template building)
    ## LONG  third use the BASE, and CROSS to generate a new better informed cross sectional result.
    ## Universal used
    subcommand = traits.Str('autorecon', argstr='%s', position=0, usedefault=True,
                            desc='Define which subcommand to run: options ="autorecon", "template", "longitudinal"')
    subjects_dir = Directory(argstr='--subjects_dir %s', desc='FreeSurfer subjects directory')

    ## auto-recon CROSS flags
    T1_files = File(argstr='--T1_files %s', exists=True, desc='Original T1 image')
    brainmask = File(argstr='--brainmask %s', exists=True,
                     desc='The normalized T1 image with the skull removed. Normalized 0-110 where white matter=110.')

    ## CROSS and LONG flags
    subj_session_id = traits.Str(argstr='--subj_session_id %s',
                                 desc='Subject_Session used for "-subjid <> in cross sectional and used in -long <> for longitudinal')

    ## BASE/Template building flags
    list_all_subj_session_ids = traits.List(traits.Str(), argstr='--list_all_subj_session_ids %s',
                                            desc='List of sessions for a subject template')

    ## LONG and BASE flags
    base_template_id = traits.Str(argstr='--base_template_id %s',
                                  desc='The name of the result subdirectory (not full path) for the base/template processing to occur')
示例#11
0
文件: fsl.py 项目: amrka/banana
class FSLFIXInputSpec(FSLCommandInputSpec):
    _xor_parameters = ('classification', 'regression', 'all')
    _xor_input_files = ('feat_dir', 'labelled_component')
    feat_dir = Directory(
        exists=True, argstr="%s", position=1, xor=_xor_input_files,
        desc="Input melodic preprocessed directory")
    train_data = File(exists=True, argstr="%s", position=2,
                      desc="Training file")
    regression = traits.Bool(desc='Regress previously classified components.',
                             position=0, argstr="-a", xor=_xor_parameters)
    classification = traits.Bool(
        desc='Components classification without regression.', position=0,
        argstr="-c", xor=_xor_parameters)
    all = traits.Bool(
        desc='Components classification and regression.', position=0,
        argstr="-f", xor=_xor_parameters)
    component_threshold = traits.Int(
        argstr="%d", mandatory=True, position=3,
        desc="threshold for the number of components")
    labelled_component = File(
        exists=True, argstr="%s", position=1, xor=_xor_input_files,
        desc=("Text file with classified components. This file is mandatory if"
              "you choose regression only."))
    motion_reg = traits.Bool(argstr='-m', desc="motion parameters regression")
    highpass = traits.Float(
        argstr='-h %f', desc='apply highpass of the motion '
        'confound with <highpass> being full-width (2*sigma) in seconds.')
示例#12
0
class DTIPrepInputSpec(CommandLineInputSpec):
    DWINrrdFile = File(
        desc=
        "DWI file name to convert dicom image series into or to be checked (nrrd/nhdr)",
        exists=True,
        argstr="--DWINrrdFile %s")
    xmlProtocol = File(desc="protocol xml file containing all the parameters",
                       exists=True,
                       argstr="--xmlProtocol %s")
    resultNotesFile = File(desc="result notes",
                           exists=True,
                           argstr="--resultNotesFile %s")
    outputFolder = traits.Either(
        traits.Bool,
        Directory(),
        hash_files=False,
        desc=
        "DTIPrep creates the output folder via using both absolute path (starts with \'/\') and relative path. The realtive path does not start with \'/\'. If the relative path ends with \'/\' means that the output folder will be created in current location, otherwise the output folder will be created in the same folder as dwi image.",
        argstr="--outputFolder %s")
    default = traits.Bool(desc="create default protocol xml file",
                          argstr="--default ")
    check = traits.Bool(desc="check by protocol xml file. Default operation",
                        argstr="--check ")
    numberOfThreads = traits.Int(
        desc="Sets the number of threads used by multithreaded ITK filters",
        argstr="--numberOfThreads %d")
示例#13
0
class XnatSourceInputSpec(ArchiveSourceInputSpec):
    project_id = traits.Str(mandatory=True, desc='The project ID')
    server = traits.Str(mandatory=True, desc="The address of the XNAT server")
    user = traits.Str(
        mandatory=False,
        desc=("The XNAT username to connect with in with if not "
              "supplied it can be read from ~/.netrc (see "
              "https://xnat.readthedocs.io/en/latest/static/tutorial.html"
              "#connecting-to-a-server)"))
    password = traits.Password(
        mandatory=False,
        desc=("The XNAT password corresponding to the supplied username, if "
              "not supplied it can be read from ~/.netrc (see "
              "https://xnat.readthedocs.io/en/latest/static/tutorial.html"
              "#connecting-to-a-server)"))
    cache_dir = Directory(
        exists=True,
        desc=("Path to the base directory where the downloaded"
              "datasets will be cached"))

    race_cond_delay = traits.Int(
        usedefault=True,
        default=30,
        desc=("The amount of time to wait before checking that the required "
              "dataset has been downloaded to cache by another process has "
              "completed if they are attempting to download the same dataset"))

    stagger = traits.Int(
        mandatory=False,
        desc=("Stagger the download of the required datasets by "
              "stagger_delay * subject_id seconds to avoid sending too many "
              "concurrent requests to XNAT"))
示例#14
0
class PETStandardUptakeValueComputationInputSpec(CommandLineInputSpec):
    petDICOMPath = Directory(
        argstr="--petDICOMPath %s",
        desc=
        "Input path to a directory containing a PET volume containing DICOM header information for SUV computation",
        exists=True)
    petVolume = File(
        argstr="--petVolume %s",
        desc=
        "Input PET volume for SUVbw computation (must be the same volume as pointed to by the DICOM path!).",
        exists=True)
    labelMap = File(
        argstr="--labelMap %s",
        desc="Input label volume containing the volumes of interest",
        exists=True)
    color = File(argstr="--color %s",
                 desc="Color table to to map labels to colors and names",
                 exists=True)
    csvFile = traits.Either(
        traits.Bool,
        File(),
        argstr="--csvFile %s",
        desc=
        "A table holding the output SUV values in comma separated lines, one per label. Optional.",
        hash_files=False)
    OutputLabel = traits.Str(
        argstr="--OutputLabel %s",
        desc="List of labels for which SUV values were computed")
    OutputLabelValue = traits.Str(
        argstr="--OutputLabelValue %s",
        desc="List of label values for which SUV values were computed")
    SUVMax = traits.Str(argstr="--SUVMax %s", desc="SUV max for each label")
    SUVMean = traits.Str(argstr="--SUVMean %s", desc="SUV mean for each label")
    SUVMin = traits.Str(argstr="--SUVMin %s",
                        desc="SUV minimum for each label")
示例#15
0
class BRAINSConstellationModelerInputSpec(CommandLineInputSpec):
    verbose = traits.Bool(
        desc=",               Show more verbose output,             ",
        argstr="--verbose ")
    inputTrainingList = File(
        desc=
        ",               Setup file, giving all parameters for training up a template model for each landmark.,             ",
        exists=True,
        argstr="--inputTrainingList %s")
    outputModel = traits.Either(
        traits.Bool,
        File(),
        hash_files=False,
        desc=
        ",               The full filename of the output model file.,             ",
        argstr="--outputModel %s")
    saveOptimizedLandmarks = traits.Bool(
        desc=
        ",               Flag to make a new subject-specific landmark definition file in the same format produced by Slicer3 with the optimized landmark (the detected RP, AC, and PC) in it.  Useful to tighten the variances in the ConstellationModeler.,             ",
        argstr="--saveOptimizedLandmarks ")
    optimizedLandmarksFilenameExtender = traits.Str(
        desc=
        ",                If the trainingList is (indexFullPathName) and contains landmark data filenames [path]/[filename].fcsv ,  make the optimized landmarks filenames out of [path]/[filename](thisExtender) and the optimized version of the input trainingList out of (indexFullPathName)(thisExtender) , when you rewrite all the landmarks according to the saveOptimizedLandmarks flag.,             ",
        argstr="--optimizedLandmarksFilenameExtender %s")
    resultsDir = traits.Either(
        traits.Bool,
        Directory(),
        hash_files=False,
        desc=
        ",               The directory for the results to be written.,             ",
        argstr="--resultsDir %s")
    mspQualityLevel = traits.Int(
        desc=
        ",                 Flag cotrols how agressive the MSP is estimated.  0=quick estimate (9 seconds), 1=normal estimate (11 seconds), 2=great estimate (22 seconds), 3=best estimate (58 seconds).,             ",
        argstr="--mspQualityLevel %d")
    rescaleIntensities = traits.Bool(
        desc=
        ",                 Flag to turn on rescaling image intensities on input.,             ",
        argstr="--rescaleIntensities ")
    trimRescaledIntensities = traits.Float(
        desc=
        ",                 Turn on clipping the rescaled image one-tailed on input.  Units of standard deviations above the mean.  Very large values are very permissive.  Non-positive value turns clipping off.  Defaults to removing 0.00001 of a normal tail above the mean.,             ",
        argstr="--trimRescaledIntensities %f")
    rescaleIntensitiesOutputRange = InputMultiPath(
        traits.Int,
        desc=
        ",                 This pair of integers gives the lower and upper bounds on the signal portion of the output image.  Out-of-field voxels are taken from BackgroundFillValue.,             ",
        sep=",",
        argstr="--rescaleIntensitiesOutputRange %s")
    BackgroundFillValue = traits.Str(
        desc=
        "Fill the background of image with specified short int value. Enter number or use BIGNEG for a large negative number.",
        argstr="--BackgroundFillValue %s")
    writedebuggingImagesLevel = traits.Int(
        desc=
        ",                 This flag controls if debugging images are produced.  By default value of 0 is no images.  Anything greater than zero will be increasing level of debugging images.,             ",
        argstr="--writedebuggingImagesLevel %d")
    numberOfThreads = traits.Int(
        desc="Explicitly specify the maximum number of threads to use.",
        argstr="--numberOfThreads %d")
示例#16
0
class ModelSpecLoaderInputSpec(BaseInterfaceInputSpec):
    bids_dir = Directory(exists=True,
                         mandatory=True,
                         desc='BIDS dataset root directory')
    model = traits.Either('default', InputMultiPath(File(exists=True)),
                          desc='Model filename')
    selectors = traits.Dict(desc='Limit models to those with matching inputs')
class ReconAllStatsOutputSpec(TraitedSpec):

    subjects_dir = Directory(exists=True,
                             desc="Freesurfer subjects directory.")
    subject_id = traits.Str(desc="Subject name")
    #stats_data = traits.Str(desc="Str a CSV line with the aseg.stat data")
    stats_csv = File(desc='path of the CSV containing the data')
示例#18
0
class DWIDenoiseInputSpec(MRTrix3BaseInputSpec):
    in_file = traits.Either(File(exists=True, desc="Input file"),
                            Directory(
                                exists=True,
                                desc="Input directory (assumed to be DICOM)"),
                            mandatory=True,
                            argstr='%s',
                            position=-2)
    out_file = File(
        genfile=True,
        argstr='%s',
        position=-1,
        hash_files=False,
        desc=("Output (converted) file. If no path separators (i.e. '/' on "
              "*nix) are found in the provided output file then the CWD (when "
              "the workflow is run, i.e. the working directory) will be "
              "prepended to the output path."))
    out_file_ext = traits.Str(desc='Extention of the output file.')
    noise = File(genfile=True,
                 argstr="-noise %s",
                 desc=("The estimated spatially-varying noise level"))
    mask = File(argstr="-mask %s",
                desc=("Perform the de-noising in the specified mask"))
    extent = traits.Tuple(traits.Int(),
                          traits.Int(),
                          traits.Int(),
                          argstr="-extent %d,%d,%d",
                          desc="Extent of the kernel")
示例#19
0
class SubjectSummaryInputSpec(BaseInterfaceInputSpec):
    t1w = InputMultiObject(File(exists=True), desc='T1w structural images')
    t2w = InputMultiObject(File(exists=True), desc='T2w structural images')
    subjects_dir = Directory(desc='FreeSurfer subjects directory')
    subject_id = Str(desc='Subject ID')
    fs_spaces = traits.List(desc='Target spaces')
    template = InputMultiObject(Str, desc='Template space')
示例#20
0
class FourShellAnalyticalModelInputSpec(MatlabInputSpec):
    probe_dipole_location = traits.List(traits.Float,
                                        exists=True,
                                        minlen=3,
                                        maxlen=3,
                                        mandatory=True)
    probe_dipole_orientation = traits.List([0, 0, 1],
                                           traits.Float,
                                           exists=True,
                                           minlen=3,
                                           maxlen=3,
                                           usedefault=True,
                                           mandatory=True)
    sphere_radii = traits.List(traits.Float,
                               exists=True,
                               minlen=4,
                               maxlen=4,
                               mandatory=True)
    shell_conductivity = traits.List(traits.Float,
                                     exists=True,
                                     minlen=4,
                                     maxlen=4,
                                     mandatory=True)
    icosahedron_sides = traits.Enum([42, 162, 642], mandatory=True)
    number_of_analytical_terms = traits.Int(60,
                                            usedefault=True,
                                            mandatory=True)
    fieldtrip_path = Directory(exists=True, desc='Fieldtrip directory')
    out_analytical_file = File('analytical.txt', usedefault=True)
    out_openmeeg_file = File('openmeeg.txt', usedefault=True)
示例#21
0
class _TrackingOutputSpec(TraitedSpec):
    """Output interface wrapper for Tracking"""

    streams = traits.Any()
    track_type = traits.Str(mandatory=True)
    conn_model = traits.Str(mandatory=True)
    dir_path = Directory(exists=True, mandatory=True)
    subnet = traits.Any(mandatory=False)
    node_radius = traits.Any()
    dens_thresh = traits.Bool(False, mandatory=False)
    ID = traits.Any(mandatory=True)
    roi = traits.Any(mandatory=False)
    min_span_tree = traits.Bool(False, mandatory=False)
    disp_filt = traits.Bool(False, mandatory=False)
    parc = traits.Bool()
    prune = traits.Any()
    atlas = traits.Any(mandatory=False)
    parcellation = traits.Any(mandatory=False)
    labels = traits.Any(mandatory=True)
    coords = traits.Any(mandatory=True)
    norm = traits.Any()
    binary = traits.Bool(False, usedefault=True)
    atlas_t1w = File(exists=True, mandatory=True)
    curv_thr_list = traits.List(mandatory=True)
    step_list = traits.List(mandatory=True)
    fa_path = File(exists=True, mandatory=True)
    dm_path = traits.Any()
    traversal = traits.Str(mandatory=True)
    labels_im_file = File(exists=True, mandatory=True)
    min_length = traits.Any()
示例#22
0
文件: bids.py 项目: satra/fitlins
class BIDSSelectInputSpec(BaseInterfaceInputSpec):
    database_path = Directory(exists=True,
                              mandatory=True,
                              desc='Path to bids database.')
    entities = InputMultiPath(traits.Dict(), mandatory=True)
    selectors = traits.Dict(desc='Additional selectors to be applied',
                            usedefault=True)
示例#23
0
class DenoiseInputSpec(BaseInterfaceInputSpec):
    fmri_prep = ImageFile(exists=True,
                          desc='Preprocessed fMRI file',
                          mandatory=True)

    fmri_prep_aroma = ImageFile(desc='ICA-Aroma preprocessed fMRI file',
                                mandatory=False)

    # fmri_mask = ImageFile(
    #     exists=True,
    #     desc='Brain mask',
    #     mandatory=True
    # )

    conf_prep = File(exists=True, desc="Confound file", mandatory=True)

    pipeline = traits.Dict(desc="Denoising pipeline", mandatory=True)

    entities = traits.Dict(desc="entities dictionary", mandatory=True)

    tr_dict = traits.Dict(desc="dictionary of tr for all tasks",
                          mandatory=True)

    output_dir = Directory(exists=True, desc="Output path")

    high_pass = traits.Float(desc="High-pass filter", )

    low_pass = traits.Float(desc="Low-pass filter")

    ica_aroma = traits.Bool(mandatory=False, desc='ICA-Aroma files exists')

    smoothing = traits.Bool(mandatory=False, desc='Optional smoothing')
class ParcellateInputSpec(BaseInterfaceInputSpec):
    subjects_dir = Directory(desc='Freesurfer main directory')
    subject_id = traits.String(mandatory=True, desc='Subject ID')
    parcellation_scheme = traits.Enum('Lausanne2008',
                                      ['Lausanne2008', 'NativeFreesurfer'],
                                      usedefault=True)
    erode_masks = traits.Bool(False)
示例#25
0
class _MedialNaNsInputSpec(BaseInterfaceInputSpec):
    in_file = File(exists=True, mandatory=True, desc='input surface file')
    subjects_dir = Directory(mandatory=True, desc='FreeSurfer SUBJECTS_DIR')
    density = traits.Enum('32k',
                          '59k',
                          '164k',
                          desc="Input file density (fsLR only)")
class DistMatrixInputSpec(CommandLineInputSpec):
    roi_file = File(exists=True,
                    argstr='-roi %s',
                    mandatory=True,
                    position=1,
                    desc='seed tracts ID file')
    tract_dir = Directory(argstr='-tracd %s',
                          mandatory=True,
                          position=2,
                          desc='tract directory')
    memory = traits.Int(argstr="-mem %s",
                        mandatory=False,
                        desc="memory to be used (in Gb)")
    threshold = traits.Float(argstr="-thr %s",
                             mandatory=True,
                             desc="threshold for tractogram values")
    parallel = traits.Int(argstr="-nth %s",
                          mandatory=False,
                          desc="number of parallel processors to use")
    verbose = traits.Bool(argstr="-v",
                          mandatory=False,
                          desc="use verbose output")
    out_file = File(name_template="%s_distmat.v",
                    keep_extension=False,
                    argstr='-out %s',
                    hash_files=False,
                    position=-1,
                    desc='output distance matrix file',
                    name_source=["roi_file"])
示例#27
0
class _MedialNaNsInputSpec(BaseInterfaceInputSpec):
    in_file = File(exists=True, mandatory=True, desc="input surface file")
    subjects_dir = Directory(mandatory=True, desc="FreeSurfer SUBJECTS_DIR")
    density = traits.Enum("32k",
                          "59k",
                          "164k",
                          desc="Input file density (fsLR only)")
示例#28
0
class CopyFileInputSpec(CommandLineInputSpec):
    src = File(mandatory=True, desc='source file', argstr='%s',
               position=0)
    base_dir = Directory(mandatory=True, desc='root directory', argstr='%s',
                         position=1)
    dst = File(genfile=True, argstr='%s', position=2,
               desc=("The destination file"))
示例#29
0
class _BIDSBaseInputSpec(BaseInterfaceInputSpec):
    bids_dir = traits.Either((None, Directory(exists=True)),
                             usedefault=True,
                             desc="optional bids directory")
    bids_validate = traits.Bool(True,
                                usedefault=True,
                                desc="enable BIDS validator")
示例#30
0
class _GenerateCiftiInputSpec(BaseInterfaceInputSpec):
    bold_file = File(mandatory=True, exists=True, desc="input BOLD file")
    volume_target = traits.Enum(
        "MNI152NLin6Asym",
        "MNI152NLin2009cAsym",
        usedefault=True,
        desc="CIFTI volumetric output space",
    )
    surface_target = traits.Enum(
        "fsLR",
        "fsaverage5",
        "fsaverage6",
        usedefault=True,
        desc="CIFTI surface target space",
    )
    surface_density = traits.Enum("10k",
                                  "32k",
                                  "41k",
                                  "59k",
                                  desc="Surface vertices density.")
    TR = traits.Float(mandatory=True, desc="Repetition time")
    surface_bolds = traits.List(
        File(exists=True),
        mandatory=True,
        desc="list of surface BOLD GIFTI files"
        " (length 2 with order [L,R])",
    )
    subjects_dir = Directory(mandatory=True, desc="FreeSurfer SUBJECTS_DIR")