Ejemplo n.º 1
0
class FeatureSpatialOutputSpec(TraitedSpec):
    edge_fraction = traits.Array(
        desc=
        "Array of the edge fraction feature scores for the components of the melIC file"
    )
    csf_fraction = traits.Array(
        desc=
        "Array of the CSF fraction feature scores for the components of the melIC file"
    )
Ejemplo n.º 2
0
class TFRmorletInputSpec(BaseInterfaceInputSpec):
    """Input specification."""

    epo_file = traits.File(exists=True,
                           desc='epochs file in .fif format',
                           mandatory=True)

    freqs = traits.Array(exists=True, desc='frequencies in Hz', mandatory=True)

    n_cycles = traits.Array(
        desc='the number of cycles globally or for each frequency')  # noqa
Ejemplo n.º 3
0
class ClassificationInputSpec(BaseInterfaceInputSpec):
    maxRPcorr = traits.Array(
        desc=
        "Array of the 'maximum RP correlation' feature scores of the components"
    )
    edge_fraction = traits.Array(
        desc="Array of the 'edge fraction' feature scores of the components")
    HFC = traits.Array(
        desc=
        "Array of the 'high-frequency content' feature scores of the components"
    )
    csf_fraction = traits.Array(
        desc="Array of the 'CSF fraction' feature scores of the components")
Ejemplo n.º 4
0
class CoherenceAnalyzerOutputSpec(TraitedSpec):
    coherence_array = traits.Array(desc=('The pairwise coherence values'
                                         'between the ROIs'))

    timedelay_array = traits.Array(desc=('The pairwise time delays between the'
                                         'ROIs (in seconds)'))

    coherence_csv = File(desc=('A csv file containing the pairwise '
                               'coherence values'))

    timedelay_csv = File(desc=('A csv file containing the pairwise '
                               'time delay values'))

    coherence_fig = File(desc=('Figure representing coherence values'))
    timedelay_fig = File(desc=('Figure representing coherence values'))
Ejemplo n.º 5
0
class LungSegmentationInferenceInputSpec(BaseInterfaceInputSpec):

    tensor = traits.Array(desc='Tensor to be fed to the network.')
    image_info = traits.Dict(
        desc='Dictionary with information about the image.')
    weights = traits.List(desc='List of network weights.')
    outdir = Directory('segmented',
                       usedefault=True,
                       desc='Folder to store the preprocessing results.')
Ejemplo n.º 6
0
class ClassificationOutputSpec(TraitedSpec):
    motionICs = traits.Array(
        desc=
        "Array containing the indices of the components identified as motion components"
    )
    classified_motion_ics = traits.File(
        desc=
        "A text file containing the indices of the components identified as motion components"
    )
Ejemplo n.º 7
0
class PreprocessingOutputSpec(TraitedSpec):

    preprocessed_array = traits.Array(
        desc='preprocessed images (FLAIR only or T1 and FLAIR) as Numpy array')
    slice_shape = traits.Tuple((traits.Int(), traits.Int(), traits.Int()),
                               desc='slice shape')

    # ToDo: implement save npz
    flair_array_npy = File(desc='preprocessed FLAIR as Numpy .npz')
Ejemplo n.º 8
0
class TrainSVMInputSpec(BaseInterfaceInputSpec):
    inputs = File(exists=True,
                  desc='input values for training',
                  mandatory=True)
    targets = File(exists=True,
                   desc='target values for training',
                   mandatory=True)
    indices = traits.Array(desc='indices for inputs and targets',
                           mandatory=False)
Ejemplo n.º 9
0
class SignalPredictionInputSpec(BaseInterfaceInputSpec):
    aligned_dwis = InputMultiObject(File(exists=True))
    aligned_bvecs = traits.Either(InputMultiObject(File(exists=True)), traits.Array)
    bvals = traits.Either(InputMultiObject(File(exists=True)), traits.Array)
    aligned_mask = File(exists=True, mandatory=True)
    aligned_b0_mean = File(exists=True, mandatory=True)
    bvec_to_predict = traits.Array()
    bval_to_predict = traits.Float()
    minimal_q_distance = traits.Float(2.0, usedefault=True)
    model = traits.Str('3dSHORE', usedefault=True)
Ejemplo n.º 10
0
class PredictInputSpec(BaseInterfaceInputSpec):

    slice_shape = traits.Tuple((traits.Int(), traits.Int(), traits.Int()),
                               desc='slice shape')

    preprocessed_array = traits.Array(
        mandatory=True, desc='Array from preprocessed FLAIR and T1w')

    weights = traits.List(File(exists=True, ),
                          mandatory=True,
                          desc='Weights as list of H5 files')
Ejemplo n.º 11
0
class _PlotFuncInputSpec(BaseInterfaceInputSpec):
    """Input interface wrapper for PlotFunc"""
    conn_matrix = traits.Array(mandatory=True)
    conn_model = traits.Str(mandatory=True)
    atlas = traits.Any()
    dir_path = Directory(exists=True, mandatory=True)
    ID = traits.Any(mandatory=True)
    network = traits.Any()
    labels = traits.Array(mandatory=True)
    roi = traits.Any()
    coords = traits.Array(mandatory=True)
    thr = traits.Any()
    node_size = traits.Any()
    edge_threshold = traits.Any()
    smooth = traits.Any()
    prune = traits.Any()
    uatlas = traits.Any()
    c_boot = traits.Any()
    norm = traits.Any()
    binary = traits.Bool()
    hpass = traits.Any()
Ejemplo n.º 12
0
class PostprocessingInputSpec(BaseInterfaceInputSpec):

    flair = File(exists=True,
                 mandatory=True,
                 desc='Input FLAIR in an ITK readable format')

    prediction = traits.Array(mandatory=True, desc='prediction to reshape')

    rows_standard = traits.Int(mandatory=True, desc='input size for rows')

    cols_standard = traits.Int(mandatory=True, desc='input size for columns')

    per = traits.Float(mandatory=True, desc='ratio')
Ejemplo n.º 13
0
class _PlotStructInputSpec(BaseInterfaceInputSpec):
    """Input interface wrapper for PlotStruct"""
    conn_matrix = traits.Array(mandatory=True)
    conn_model = traits.Str(mandatory=True)
    atlas = traits.Any()
    dir_path = Directory(exists=True, mandatory=True)
    ID = traits.Any(mandatory=True)
    network = traits.Any()
    labels = traits.Array(mandatory=True)
    roi = traits.Any()
    coords = traits.Array(mandatory=True)
    thr = traits.Any()
    node_size = traits.Any()
    edge_threshold = traits.Any()
    prune = traits.Any()
    uatlas = traits.Any()
    target_samples = traits.Any()
    norm = traits.Any()
    binary = traits.Bool()
    track_type = traits.Any()
    directget = traits.Any()
    min_length = traits.Any()
Ejemplo n.º 14
0
class _PlotStructInputSpec(BaseInterfaceInputSpec):
    """Input interface wrapper for PlotStruct"""

    conn_matrix = traits.Any()
    conn_model = traits.Str(mandatory=True)
    atlas = traits.Any(mandatory=False)
    dir_path = Directory(exists=True, mandatory=True)
    ID = traits.Any(mandatory=True)
    subnet = traits.Any(mandatory=True)
    labels = traits.Array(mandatory=True)
    roi = traits.Any(mandatory=True)
    coords = traits.Array(mandatory=True)
    thr = traits.Any(mandatory=True)
    node_radius = traits.Any(mandatory=True)
    edge_threshold = traits.Any(mandatory=True)
    prune = traits.Any(mandatory=True)
    parcellation = traits.Any(mandatory=False)
    norm = traits.Any(mandatory=True)
    binary = traits.Bool(mandatory=True)
    track_type = traits.Any(mandatory=True)
    traversal = traits.Any(mandatory=True)
    min_length = traits.Any(mandatory=True)
    error_margin = traits.Any(mandatory=True)
Ejemplo n.º 15
0
class _PlotFuncInputSpec(BaseInterfaceInputSpec):
    """Input interface wrapper for PlotFunc"""

    conn_matrix = traits.Any()
    conn_model = traits.Str(mandatory=True)
    atlas = traits.Any(mandatory=False)
    dir_path = Directory(exists=True, mandatory=True)
    ID = traits.Any(mandatory=True)
    subnet = traits.Any(mandatory=True)
    labels = traits.Array(mandatory=True)
    roi = traits.Any(mandatory=True)
    coords = traits.Array(mandatory=True)
    thr = traits.Any(mandatory=True)
    node_radius = traits.Any(mandatory=True)
    edge_threshold = traits.Any(mandatory=True)
    smooth = traits.Any(mandatory=True)
    prune = traits.Any(mandatory=True)
    parcellation = traits.Any(mandatory=False)
    norm = traits.Any(mandatory=True)
    binary = traits.Bool(mandatory=True)
    hpass = traits.Any(mandatory=True)
    signal = traits.Any(mandatory=True)
    edge_color_override = traits.Bool(mandatory=True)
Ejemplo n.º 16
0
class TrainInputSpec(BaseInterfaceInputSpec):

    images = traits.Array(mandatory=True,
                          desc='Images for the training as NumPy array')

    masks = traits.Array(mandatory=True,
                         desc='Masks for training as NumPy array')

    model_path = traits.Directory(mandatory=True,
                                  desc='directory where to save the models')

    ensemble_parameter = traits.Int(3,
                                    usedefault=True,
                                    desc='ensemble parameter')

    verbose = traits.Bool(True, usedefault=True, desc='Verbose')

    batch_size = traits.Int(30, usedefault=True, desc='batch size, default 30')

    epochs = traits.Int(5, usedefault=True, desc='epochs, default 5')
    image_shape = traits.Tuple((traits.Int(), traits.Int(), traits.Int()),
                               desc='slice shape')

    shuffle = traits.Bool(True, desc='shuffle')
Ejemplo n.º 17
0
class LungSegmentationPreprocOutputSpec(TraitedSpec):

    preproc_image = traits.File(exists=True, desc='Preprocessed image')
    tensor = traits.Array(desc='Tensor to be fed to the network.')
    image_info = traits.Dict(
        desc='Dictionary with information about the image.')
Ejemplo n.º 18
0
class PostprocessingOutputSpec(TraitedSpec):

    postprocessed_prediction = traits.Array(
        desc='get prediction in original shape')
Ejemplo n.º 19
0
class TestSVMInputSpec(BaseInterfaceInputSpec):
    svm = File(exists=True, desc='SVM to be tested', mandatory=True)
    inputs = traits.Array(desc='input values to be tested', mandatory=True)
    targets = traits.Array(desc='target values to be tested', mandatory=True)
    indices = traits.Array(desc='indices for inputs and targets',
                           mandatory=False)
Ejemplo n.º 20
0
class PredictOutputSpec(TraitedSpec):

    prediction = traits.Array(desc='Prediction as array')

    prediction_npy = traits.File(desc='Prediction as Numpy .npy')
Ejemplo n.º 21
0
class FeatureFrequencyOutputSpec(TraitedSpec):
    HFC = traits.Array(
        desc=
        "Array of the HFC ('High-frequency content') feature scores for the components of the melodic_FTmix file"
    )
Ejemplo n.º 22
0
class SavePredictionInputSpec(BaseInterfaceInputSpec):

    prediction_array = traits.Array(mandatory=True, desc='prediction as array')
    output_filename = traits.Str('prediction',
                                 usedefault=True,
                                 desc='output filename')
Ejemplo n.º 23
0
class EnsembleInputSpec(BaseInterfaceInputSpec):

    in_arrays = traits.List(traits.Array(),
                            mandatory=True,
                            desc='Arrays list to esemble')
Ejemplo n.º 24
0
class FeatureTimeSeriesOutputSpec(TraitedSpec):
    maxRPcorr = traits.Array(
        desc=
        "Array of the maximum RP correlation feature scores for the components of the melodic_mix file"
    )
Ejemplo n.º 25
0
class EnsembleOutputSpec(TraitedSpec):

    out_array = traits.Array(desc='averaged array')
Ejemplo n.º 26
0
class SplitB0DWIsFromFileOutputSpec(TraitedSpec):
    out_B0s = OutputMultiPath(File(exists=True))
    out_DWIs = OutputMultiPath(File(exists=True))
    out_all = OutputMultiPath(File(exists=True))
    out_indices = traits.Array(desc="B0 Indices in the table")
Ejemplo n.º 27
0
class ThresholdingInputSpec(BaseInterfaceInputSpec):
    in_array = traits.Array(mandatory=True, desc='input array')
    thres = traits.Float(default_value=0.5, usedefault=True, desc='threshold')
Ejemplo n.º 28
0
class WriteArrayToCsvInputSpec(BaseInterfaceInputSpec):
    in_array = traits.Array(exists=True, mandatory=True, desc="array")
    in_name = traits.String(mandatory=True, desc="Name of the output file")
Ejemplo n.º 29
0
class ExtractAffineOutputSpec(TraitedSpec):

    out_matrix = traits.Array(desc='The affine matrix as NumPy array')

    out_file = File(desc='A text file containing the affine matrix')
Ejemplo n.º 30
0
class ThresholdingOutputSpec(TraitedSpec):
    out_array = traits.Array(desc='thresholded array')