|
| 1 | +# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT |
| 2 | +from ....testing import assert_equal |
| 3 | +from ..brainsuite import Bfc |
| 4 | + |
| 5 | + |
| 6 | +def test_Bfc_inputs(): |
| 7 | + input_map = dict(args=dict(argstr='%s', |
| 8 | + ), |
| 9 | + biasEstimateConvergenceThreshold=dict(argstr='--beps %f', |
| 10 | + ), |
| 11 | + biasEstimateSpacing=dict(argstr='-s %d', |
| 12 | + ), |
| 13 | + biasFieldEstimatesOutputPrefix=dict(argstr='--biasprefix %s', |
| 14 | + ), |
| 15 | + biasRange=dict(argstr='%s', |
| 16 | + ), |
| 17 | + controlPointSpacing=dict(argstr='-c %d', |
| 18 | + ), |
| 19 | + convergenceThreshold=dict(argstr='--eps %f', |
| 20 | + ), |
| 21 | + correctWholeVolume=dict(argstr='--extrapolate', |
| 22 | + ), |
| 23 | + correctedImagesOutputPrefix=dict(argstr='--prefix %s', |
| 24 | + ), |
| 25 | + correctionScheduleFile=dict(argstr='--schedule %s', |
| 26 | + ), |
| 27 | + environ=dict(nohash=True, |
| 28 | + usedefault=True, |
| 29 | + ), |
| 30 | + histogramRadius=dict(argstr='-r %d', |
| 31 | + ), |
| 32 | + histogramType=dict(argstr='%s', |
| 33 | + ), |
| 34 | + ignore_exception=dict(nohash=True, |
| 35 | + usedefault=True, |
| 36 | + ), |
| 37 | + inputMRIFile=dict(argstr='-i %s', |
| 38 | + mandatory=True, |
| 39 | + ), |
| 40 | + inputMaskFile=dict(argstr='-m %s', |
| 41 | + hash_files=False, |
| 42 | + ), |
| 43 | + intermediate_file_type=dict(argstr='%s', |
| 44 | + ), |
| 45 | + iterativeMode=dict(argstr='--iterate', |
| 46 | + ), |
| 47 | + maxBias=dict(argstr='-U %f', |
| 48 | + usedefault=True, |
| 49 | + ), |
| 50 | + minBias=dict(argstr='-L %f', |
| 51 | + usedefault=True, |
| 52 | + ), |
| 53 | + outputBiasField=dict(argstr='--bias %s', |
| 54 | + hash_files=False, |
| 55 | + ), |
| 56 | + outputMRIVolume=dict(argstr='-o %s', |
| 57 | + genfile=True, |
| 58 | + hash_files=False, |
| 59 | + ), |
| 60 | + outputMaskedBiasField=dict(argstr='--maskedbias %s', |
| 61 | + hash_files=False, |
| 62 | + ), |
| 63 | + splineLambda=dict(argstr='-w %f', |
| 64 | + ), |
| 65 | + terminal_output=dict(nohash=True, |
| 66 | + ), |
| 67 | + timer=dict(argstr='--timer', |
| 68 | + ), |
| 69 | + verbosityLevel=dict(argstr='-v %d', |
| 70 | + ), |
| 71 | + ) |
| 72 | + inputs = Bfc.input_spec() |
| 73 | + |
| 74 | + for key, metadata in list(input_map.items()): |
| 75 | + for metakey, value in list(metadata.items()): |
| 76 | + yield assert_equal, getattr(inputs.traits()[key], metakey), value |
| 77 | + |
| 78 | + |
| 79 | +def test_Bfc_outputs(): |
| 80 | + output_map = dict(correctionScheduleFile=dict(), |
| 81 | + outputBiasField=dict(), |
| 82 | + outputMRIVolume=dict(), |
| 83 | + outputMaskedBiasField=dict(), |
| 84 | + ) |
| 85 | + outputs = Bfc.output_spec() |
| 86 | + |
| 87 | + for key, metadata in list(output_map.items()): |
| 88 | + for metakey, value in list(metadata.items()): |
| 89 | + yield assert_equal, getattr(outputs.traits()[key], metakey), value |
0 commit comments