Пример #1
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'
Пример #2
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 = InputMultiPath(traits.Either(File(exists=True),
                                        traits.List(File(exists=True))),
                          desc='BOLD functional series')
    output_spaces = traits.List(desc='Target spaces')
    template = traits.Enum('MNI152NLin2009cAsym', desc='Template space')
Пример #3
0
class MaskEPIInputSpec(BaseInterfaceInputSpec):
    in_files = InputMultiPath(File(exists=True),
                              mandatory=True,
                              desc='input EPI or list of files')
    lower_cutoff = traits.Float(0.2, usedefault=True)
    upper_cutoff = traits.Float(0.85, usedefault=True)
    connected = traits.Bool(True, usedefault=True)
    opening = traits.Int(2, usedefault=True)
    exclude_zeros = traits.Bool(False, usedefault=True)
    ensure_finite = traits.Bool(True, usedefault=True)
    target_affine = traits.Either(None,
                                  traits.File(exists=True),
                                  default=None,
                                  usedefault=True)
    target_shape = traits.Either(None,
                                 traits.File(exists=True),
                                 default=None,
                                 usedefault=True)
    no_sanitize = traits.Bool(False, usedefault=True)
Пример #4
0
class UploadIQMsOutputSpec(TraitedSpec):
    api_id = traits.Either(None,
                           traits.Str,
                           desc="Id for report returned by the web api")