Skip to content

Commit 9c12e44

Browse files
committed
ran make specs and make check-before-commit
1 parent bc83e71 commit 9c12e44

13 files changed

+805
-34
lines changed

nipype/interfaces/brainsuite/brainsuite.py

Lines changed: 34 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -66,18 +66,18 @@ class Bse(CommandLine):
6666
"""
6767
brain surface extractor (BSE)
6868
This program performs automated skull and scalp removal on T1-weighted MRI volumes.
69-
69+
7070
http://brainsuite.org/processing/surfaceextraction/bse/
71-
71+
7272
Examples
7373
--------
74-
74+
7575
>>> from nipype.interfaces import brainsuite
7676
>>> from nipype.testing import example_data
7777
>>> bse = brainsuite.Bse()
7878
>>> bse.inputs.inputMRIFile = example_data('structural.nii')
7979
>>> results = bse.run() #doctest: +SKIP
80-
80+
8181
"""
8282

8383
input_spec = BseInputSpec
@@ -178,17 +178,17 @@ class Bfc(CommandLine):
178178
This program corrects gain variation in T1-weighted MRI.
179179
180180
http://brainsuite.org/processing/surfaceextraction/bfc/
181-
181+
182182
Examples
183183
--------
184-
184+
185185
>>> from nipype.interfaces import brainsuite
186186
>>> from nipype.testing import example_data
187187
>>> bfc = brainsuite.Bfc()
188188
>>> bfc.inputs.inputMRIFile = example_data('structural.nii')
189189
>>> bfc.inputs.inputMaskFile = example_data('mask.nii')
190190
>>> results = bfc.run() #doctest: +SKIP
191-
191+
192192
"""
193193

194194

@@ -242,19 +242,19 @@ class Pvc(CommandLine):
242242
partial volume classifier (PVC) tool.
243243
This program performs voxel-wise tissue classification T1-weighted MRI.
244244
Image should be skull-stripped and bias-corrected before tissue classification.
245-
245+
246246
http://brainsuite.org/processing/surfaceextraction/pvc/
247-
247+
248248
Examples
249249
--------
250-
250+
251251
>>> from nipype.interfaces import brainsuite
252252
>>> from nipype.testing import example_data
253253
>>> pvc = brainsuite.Pvc()
254254
>>> pvc.inputs.inputMRIFile = example_data('structural.nii')
255255
>>> pvc.inputs.inputMaskFile = example_data('mask.nii')
256256
>>> results = pvc.run() #doctest: +SKIP
257-
257+
258258
"""
259259

260260
input_spec = PvcInputSpec
@@ -283,9 +283,9 @@ class CerebroInputSpec(CommandLineInputSpec):
283283
inputAtlasLabelFile = File(
284284
mandatory=True, desc='atlas labeling', argstr='--atlaslabels %s')
285285
inputBrainMaskFile = File(desc='brain mask file', argstr='-m %s')
286-
outputCerebrumMaskFile = File(desc='output cerebrum mask volume. If unspecified, output file name will be auto generated.',
286+
outputCerebrumMaskFile = File(desc='output cerebrum mask volume. If unspecified, output file name will be auto generated.',
287287
argstr='-o %s', genfile=True)
288-
outputLabelMaskFile = File(desc='output labeled hemisphere/cerebrum volume. If unspecified, output file name will be auto generated.',
288+
outputLabelMaskFile = File(desc='output labeled hemisphere/cerebrum volume. If unspecified, output file name will be auto generated.',
289289
argstr='-l %s', genfile=True)
290290
costFunction = traits.Int(2, usedefault=True, desc='0,1,2', argstr='-c %d')
291291
useCentroids = traits.Bool(
@@ -336,9 +336,9 @@ class Cerebro(CommandLine):
336336
>>> cerebro.inputs.inputAtlasLabelFile = 'atlasLabels.img'
337337
>>> cerebro.inputs.inputBrainMaskFile = example_data('mask.nii')
338338
>>> results = cerebro.run() #doctest: +SKIP
339-
339+
340340
"""
341-
341+
342342
input_spec = CerebroInputSpec
343343
output_spec = CerebroOutputSpec
344344
_cmd = 'cerebro'
@@ -397,7 +397,7 @@ class Cortex(CommandLine):
397397
>>> cortex.inputs.inputHemisphereLabelFile = example_data('mask.nii')
398398
>>> cortex.inputs.inputTissueFractionFile = example_data('tissues.nii.gz')
399399
>>> results = cortex.run() #doctest: +SKIP
400-
400+
401401
"""
402402

403403
input_spec = CortexInputSpec
@@ -451,7 +451,7 @@ class Scrubmask(CommandLine):
451451
>>> scrubmask = brainsuite.Scrubmask()
452452
>>> scrubmask.inputs.inputMaskFile = example_data('mask.nii')
453453
>>> results = scrubmask.run() #doctest: +SKIP
454-
454+
455455
"""
456456
input_spec = ScrubmaskInputSpec
457457
output_spec = ScrubmaskOutputSpec
@@ -464,8 +464,8 @@ def _gen_filename(self, name):
464464

465465
if name == 'outputMaskFile':
466466
return getFileName(self, self.inputs.inputMaskFile, name, '.nii.gz')
467-
468-
467+
468+
469469
return None
470470

471471
def _list_outputs(self):
@@ -497,15 +497,15 @@ class Tca(CommandLine):
497497
This program removes topological handles from a binary object.
498498
499499
http://brainsuite.org/processing/surfaceextraction/tca/
500-
500+
501501
Examples
502502
--------
503503
>>> from nipype.interfaces import brainsuite
504504
>>> from nipype.testing import example_data
505505
>>> tca = brainsuite.Tca()
506506
>>> tca.inputs.inputMaskFile = example_data('mask.nii')
507507
>>> results = tca.run() #doctest: +SKIP
508-
508+
509509
"""
510510
input_spec = TcaInputSpec
511511
output_spec = TcaOutputSpec
@@ -551,7 +551,7 @@ class Dewisp(CommandLine):
551551
can be before it is considered part of the image.
552552
553553
http://brainsuite.org/processing/surfaceextraction/dewisp/
554-
554+
555555
Examples
556556
--------
557557
@@ -560,9 +560,9 @@ class Dewisp(CommandLine):
560560
>>> dewisp = brainsuite.Dewisp()
561561
>>> dewisp.inputs.inputMaskFile = example_data('mask.nii')
562562
>>> results = dewisp.run() #doctest: +SKIP
563-
563+
564564
"""
565-
565+
566566
input_spec = DewispInputSpec
567567
output_spec = DewispOutputSpec
568568
_cmd = 'dewisp'
@@ -703,9 +703,9 @@ class Pialmesh(CommandLine):
703703
"""
704704
pialmesh
705705
computes a pial surface model using an inner WM/GM mesh and a tissue fraction map.
706-
706+
707707
http://brainsuite.org/processing/surfaceextraction/pial/
708-
708+
709709
Examples
710710
--------
711711
@@ -716,9 +716,9 @@ class Pialmesh(CommandLine):
716716
>>> pialmesh.inputs.inputTissueFractionFile = 'frac_file.nii.gz'
717717
>>> pialmesh.inputs.inputMaskFile = example_data('mask.nii')
718718
>>> results = pialmesh.run() #doctest: +SKIP
719-
719+
720720
"""
721-
721+
722722
input_spec = PialmeshInputSpec
723723
output_spec = PialmeshOutputSpec
724724
_cmd = 'pialmesh'
@@ -771,17 +771,17 @@ class SkullfinderOutputSpec(TraitedSpec):
771771
class Skullfinder(CommandLine):
772772
"""
773773
Skull and scalp segmentation algorithm.
774-
774+
775775
Examples
776776
--------
777-
777+
778778
>>> from nipype.interfaces import brainsuite
779779
>>> from nipype.testing import example_data
780780
>>> skullfinder = brainsuite.Skullfinder()
781781
>>> skullfinder.inputs.inputMRIFile = example_data('structural.nii')
782782
>>> skullfinder.inputs.inputMaskFile = example_data('mask.nii')
783783
>>> results = skullfinder.run() #doctest: +SKIP
784-
784+
785785
"""
786786
input_spec = SkullfinderInputSpec
787787
output_spec = SkullfinderOutputSpec
@@ -836,15 +836,15 @@ class Hemisplit(CommandLine):
836836
837837
Examples
838838
--------
839-
839+
840840
>>> from nipype.interfaces import brainsuite
841841
>>> from nipype.testing import example_data
842842
>>> hemisplit = brainsuite.Hemisplit()
843843
>>> hemisplit.inputs.inputSurfaceFile = 'input_surf.dfs'
844844
>>> hemisplit.inputs.inputHemisphereLabelFile = 'label.nii'
845845
>>> hemisplit.inputs.pialSurfaceFile = 'pial.dfs'
846-
>>> results = hemisplit.run() #doctest: +SKIP
847-
846+
>>> results = hemisplit.run() #doctest: +SKIP
847+
848848
"""
849849

850850
input_spec = HemisplitInputSpec
Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
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
Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT
2+
from ....testing import assert_equal
3+
from ..brainsuite import Bse
4+
5+
6+
def test_Bse_inputs():
7+
input_map = dict(args=dict(argstr='%s',
8+
),
9+
diffusionConstant=dict(argstr='-d %f',
10+
usedefault=True,
11+
),
12+
diffusionIterations=dict(argstr='-n %d',
13+
usedefault=True,
14+
),
15+
dilateFinalMask=dict(argstr='-p',
16+
usedefault=True,
17+
),
18+
edgeDetectionConstant=dict(argstr='-s %f',
19+
usedefault=True,
20+
),
21+
environ=dict(nohash=True,
22+
usedefault=True,
23+
),
24+
ignore_exception=dict(nohash=True,
25+
usedefault=True,
26+
),
27+
inputMRIFile=dict(argstr='-i %s',
28+
mandatory=True,
29+
),
30+
noRotate=dict(argstr='--norotate',
31+
),
32+
outputCortexFile=dict(argstr='--cortex %s',
33+
hash_files=False,
34+
),
35+
outputDetailedBrainMask=dict(argstr='--hires %s',
36+
hash_files=False,
37+
),
38+
outputDiffusionFilter=dict(argstr='--adf %s',
39+
hash_files=False,
40+
),
41+
outputEdgeMap=dict(argstr='--edge %s',
42+
hash_files=False,
43+
),
44+
outputMRIVolume=dict(argstr='-o %s',
45+
genfile=True,
46+
hash_files=False,
47+
),
48+
outputMaskFile=dict(argstr='--mask %s',
49+
hash_files=False,
50+
),
51+
radius=dict(argstr='-r %f',
52+
usedefault=True,
53+
),
54+
terminal_output=dict(nohash=True,
55+
),
56+
timer=dict(argstr='--timer',
57+
),
58+
trim=dict(argstr='--trim',
59+
usedefault=True,
60+
),
61+
verbosityLevel=dict(argstr='-v %f',
62+
usedefault=True,
63+
),
64+
)
65+
inputs = Bse.input_spec()
66+
67+
for key, metadata in list(input_map.items()):
68+
for metakey, value in list(metadata.items()):
69+
yield assert_equal, getattr(inputs.traits()[key], metakey), value
70+
71+
72+
def test_Bse_outputs():
73+
output_map = dict(outputCortexFile=dict(),
74+
outputDetailedBrainMask=dict(),
75+
outputDiffusionFilter=dict(),
76+
outputEdgeMap=dict(),
77+
outputMRIVolume=dict(),
78+
outputMaskFile=dict(),
79+
)
80+
outputs = Bse.output_spec()
81+
82+
for key, metadata in list(output_map.items()):
83+
for metakey, value in list(metadata.items()):
84+
yield assert_equal, getattr(outputs.traits()[key], metakey), value

0 commit comments

Comments
 (0)