|
| 1 | +# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT |
| 2 | +from nipype.testing import assert_equal |
| 3 | +from nipype.interfaces.ants.segmentation import antsCorticalThickness |
| 4 | + |
| 5 | +def test_antsCorticalThickness_inputs(): |
| 6 | + input_map = dict(anatomical_image=dict(argstr='-a %s', |
| 7 | + mandatory=True, |
| 8 | + ), |
| 9 | + args=dict(argstr='%s', |
| 10 | + ), |
| 11 | + b_spline_smoothing=dict(argstr='-v', |
| 12 | + ), |
| 13 | + brain_probability_mask=dict(argstr='-m %s', |
| 14 | + copyfile=False, |
| 15 | + mandatory=True, |
| 16 | + ), |
| 17 | + brain_template=dict(argstr='-e %s', |
| 18 | + mandatory=True, |
| 19 | + ), |
| 20 | + cortical_label_image=dict(), |
| 21 | + debug=dict(argstr='-z 1', |
| 22 | + ), |
| 23 | + dimension=dict(argstr='-d %d', |
| 24 | + usedefault=True, |
| 25 | + ), |
| 26 | + environ=dict(nohash=True, |
| 27 | + usedefault=True, |
| 28 | + ), |
| 29 | + extraction_registration_mask=dict(argstr='-f %s', |
| 30 | + ), |
| 31 | + ignore_exception=dict(nohash=True, |
| 32 | + usedefault=True, |
| 33 | + ), |
| 34 | + image_suffix=dict(argstr='-s %s', |
| 35 | + usedefault=True, |
| 36 | + ), |
| 37 | + keep_temporary_files=dict(argstr='-k %d', |
| 38 | + ), |
| 39 | + label_propagation=dict(argstr='-l %s', |
| 40 | + ), |
| 41 | + max_iterations=dict(argstr='-i %d', |
| 42 | + ), |
| 43 | + num_threads=dict(nohash=True, |
| 44 | + usedefault=True, |
| 45 | + ), |
| 46 | + out_prefix=dict(argstr='-o %s', |
| 47 | + usedefault=True, |
| 48 | + ), |
| 49 | + posterior_formulation=dict(argstr='-b %s', |
| 50 | + ), |
| 51 | + prior_segmentation_weight=dict(argstr='-w %f', |
| 52 | + ), |
| 53 | + quick_registration=dict(argstr='-q 1', |
| 54 | + ), |
| 55 | + segmentation_iterations=dict(argstr='-n %d', |
| 56 | + ), |
| 57 | + segmentation_priors=dict(argstr='-p %s', |
| 58 | + mandatory=True, |
| 59 | + ), |
| 60 | + t1_registration_template=dict(argstr='-t %s', |
| 61 | + mandatory=True, |
| 62 | + ), |
| 63 | + terminal_output=dict(mandatory=True, |
| 64 | + nohash=True, |
| 65 | + ), |
| 66 | + use_floatingpoint_precision=dict(argstr='-j %d', |
| 67 | + ), |
| 68 | + use_random_seeding=dict(argstr='-u %d', |
| 69 | + ), |
| 70 | + ) |
| 71 | + inputs = antsCorticalThickness.input_spec() |
| 72 | + |
| 73 | + for key, metadata in input_map.items(): |
| 74 | + for metakey, value in metadata.items(): |
| 75 | + yield assert_equal, getattr(inputs.traits()[key], metakey), value |
| 76 | + |
| 77 | +def test_antsCorticalThickness_outputs(): |
| 78 | + output_map = dict(BrainExtractionMask=dict(), |
| 79 | + BrainSegmentation=dict(), |
| 80 | + BrainSegmentationN4=dict(), |
| 81 | + BrainSegmentationPosteriorsCSF=dict(), |
| 82 | + BrainSegmentationPosteriorsDGM=dict(), |
| 83 | + BrainSegmentationPosteriorsGM=dict(), |
| 84 | + BrainSegmentationPosteriorsWM=dict(), |
| 85 | + CorticalThickness=dict(), |
| 86 | + SubjectToTemplate0GenericAffine=dict(), |
| 87 | + SubjectToTemplate1Warp=dict(), |
| 88 | + TemplateToSubject0Warp=dict(), |
| 89 | + TemplateToSubject1GenericAffine=dict(), |
| 90 | + TemplateToSubjectLogJacobian=dict(), |
| 91 | + ) |
| 92 | + outputs = antsCorticalThickness.output_spec() |
| 93 | + |
| 94 | + for key, metadata in output_map.items(): |
| 95 | + for metakey, value in metadata.items(): |
| 96 | + yield assert_equal, getattr(outputs.traits()[key], metakey), value |
| 97 | + |
0 commit comments