示例#1
0
 def __init__(self, in_file=['path'], **options):
     from nipype.interfaces.nipy.preprocess import SpaceTimeRealigner
     realigner = SpaceTimeRealigner()
     realigner.inputs.in_file = in_file
     for ef in options:
         setattr(realigner.inputs, ef, options[ef])
     self.res = realigner.run()
示例#2
0
def test_SpaceTimeRealigner_outputs():
    output_map = dict(out_file=dict(),
    par_file=dict(),
    )
    outputs = SpaceTimeRealigner.output_spec()

    for key, metadata in output_map.items():
        for metakey, value in metadata.items():
            yield assert_equal, getattr(outputs.traits()[key], metakey), value
示例#3
0
def test_SpaceTimeRealigner_inputs():
    input_map = dict(ignore_exception=dict(nohash=True,
    usedefault=True,
    ),
    in_file=dict(mandatory=True,
    min_ver='0.4.0.dev',
    ),
    slice_info=dict(requires=['slice_times'],
    ),
    slice_times=dict(),
    tr=dict(requires=['slice_times'],
    ),
    )
    inputs = SpaceTimeRealigner.input_spec()

    for key, metadata in input_map.items():
        for metakey, value in metadata.items():
            yield assert_equal, getattr(inputs.traits()[key], metakey), value