|
| 1 | +# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT |
| 2 | +from __future__ import unicode_literals |
| 3 | +from ..preprocess import RealignUnwarp |
| 4 | + |
| 5 | + |
| 6 | +def test_RealignUnwarp_inputs(): |
| 7 | + input_map = dict( |
| 8 | + est_basis_func=dict(field='uweoptions.basfcn', ), |
| 9 | + est_first_order_effects=dict(field='uweoptions.fot', ), |
| 10 | + est_jacobian_deformations=dict(field='uweoptions.jm', ), |
| 11 | + est_num_of_iterations=dict( |
| 12 | + field='uweoptions.noi', |
| 13 | + maxlen=1, |
| 14 | + minlen=1, |
| 15 | + usedefault=True, |
| 16 | + ), |
| 17 | + est_re_est_mov_par=dict(field='uweoptions.rem', ), |
| 18 | + est_reg_factor=dict( |
| 19 | + field='uweoptions.lambda', |
| 20 | + maxlen=1, |
| 21 | + minlen=1, |
| 22 | + usedefault=True, |
| 23 | + ), |
| 24 | + est_reg_order=dict(field='uweoptions.regorder', ), |
| 25 | + est_second_order_effects=dict(field='uweoptions.sot', ), |
| 26 | + est_taylor_expansion_point=dict( |
| 27 | + field='uweoptions.expround', |
| 28 | + usedefault=True, |
| 29 | + ), |
| 30 | + est_unwarp_fwhm=dict(field='uweoptions.uwfwhm', ), |
| 31 | + fwhm=dict(field='eoptions.fwhm', ), |
| 32 | + in_files=dict( |
| 33 | + copyfile=True, |
| 34 | + field='data.scans', |
| 35 | + mandatory=True, |
| 36 | + ), |
| 37 | + interp=dict(field='eoptions.einterp', ), |
| 38 | + matlab_cmd=dict(), |
| 39 | + mfile=dict(usedefault=True, ), |
| 40 | + out_prefix=dict( |
| 41 | + field='uwroptions.prefix', |
| 42 | + usedefault=True, |
| 43 | + ), |
| 44 | + paths=dict(), |
| 45 | + phase_map=dict( |
| 46 | + copyfile=False, |
| 47 | + field='data.pmscan', |
| 48 | + ), |
| 49 | + quality=dict(field='eoptions.quality', ), |
| 50 | + register_to_mean=dict(field='eoptions.rtm', ), |
| 51 | + reslice_interp=dict(field='uwroptions.rinterp', ), |
| 52 | + reslice_mask=dict(field='uwroptions.mask', ), |
| 53 | + reslice_which=dict( |
| 54 | + field='uwroptions.uwwhich', |
| 55 | + maxlen=2, |
| 56 | + minlen=2, |
| 57 | + usedefault=True, |
| 58 | + ), |
| 59 | + reslice_wrap=dict(field='uwroptions.wrap', ), |
| 60 | + separation=dict(field='eoptions.sep', ), |
| 61 | + use_mcr=dict(), |
| 62 | + use_v8struct=dict( |
| 63 | + min_ver='8', |
| 64 | + usedefault=True, |
| 65 | + ), |
| 66 | + weight_img=dict(field='eoptions.weight', ), |
| 67 | + wrap=dict(field='eoptions.ewrap', ), |
| 68 | + ) |
| 69 | + inputs = RealignUnwarp.input_spec() |
| 70 | + |
| 71 | + for key, metadata in list(input_map.items()): |
| 72 | + for metakey, value in list(metadata.items()): |
| 73 | + assert getattr(inputs.traits()[key], metakey) == value |
| 74 | +def test_RealignUnwarp_outputs(): |
| 75 | + output_map = dict( |
| 76 | + mean_image=dict(), |
| 77 | + modified_in_files=dict(), |
| 78 | + realigned_unwarped_files=dict(), |
| 79 | + realignment_parameters=dict(), |
| 80 | + ) |
| 81 | + outputs = RealignUnwarp.output_spec() |
| 82 | + |
| 83 | + for key, metadata in list(output_map.items()): |
| 84 | + for metakey, value in list(metadata.items()): |
| 85 | + assert getattr(outputs.traits()[key], metakey) == value |
0 commit comments