Skip to content

Commit cdd5361

Browse files
committed
Removed unnecessary outputsspecs
1 parent 88b8c98 commit cdd5361

File tree

1 file changed

+19
-106
lines changed

1 file changed

+19
-106
lines changed

nipype/interfaces/afni/preprocess.py

Lines changed: 19 additions & 106 deletions
Original file line numberDiff line numberDiff line change
@@ -121,10 +121,6 @@ class TShiftInputSpec(AFNICommandInputSpec):
121121
argstr="-rlt+")
122122

123123

124-
class TShiftOutputSpec(TraitedSpec):
125-
out_file = File(desc='post slice time shifted 4D image', exists=True)
126-
127-
128124
class TShift(AFNICommand):
129125
"""Shifts voxel time series from input
130126
so that seperate slices are aligned to the same
@@ -149,7 +145,7 @@ class TShift(AFNICommand):
149145

150146
_cmd = '3dTshift'
151147
input_spec = TShiftInputSpec
152-
output_spec = TShiftOutputSpec
148+
output_spec = AFNICommandOutputSpec
153149

154150

155151
class RefitInputSpec(AFNICommandInputSpec):
@@ -176,11 +172,6 @@ class RefitInputSpec(AFNICommandInputSpec):
176172
argstr='-zorigin %s')
177173

178174

179-
class RefitOutputSpec(TraitedSpec):
180-
out_file = File(desc='Same file as original in_file with modified matrix',
181-
exists=True)
182-
183-
184175
class Refit(AFNICommand):
185176
"""Changes some of the information inside a 3D dataset's header
186177
@@ -200,7 +191,7 @@ class Refit(AFNICommand):
200191

201192
_cmd = '3drefit'
202193
input_spec = RefitInputSpec
203-
output_spec = RefitOutputSpec
194+
output_spec = AFNICommandOutputSpec
204195

205196

206197
class WarpInputSpec(AFNICommandInputSpec):
@@ -242,10 +233,6 @@ class WarpInputSpec(AFNICommandInputSpec):
242233
suffix = traits.Str('_warp', desc="out_file suffix", usedefault=True)
243234

244235

245-
class WarpOutputSpec(TraitedSpec):
246-
out_file = File(desc='spatially transformed input image', exists=True)
247-
248-
249236
class Warp(AFNICommand):
250237
"""Use 3dWarp for spatially transforming a dataset
251238
@@ -265,7 +252,7 @@ class Warp(AFNICommand):
265252

266253
_cmd = '3dWarp'
267254
input_spec = WarpInputSpec
268-
output_spec = WarpOutputSpec
255+
output_spec = AFNICommandOutputSpec
269256

270257

271258
class ResampleInputSpec(AFNICommandInputSpec):
@@ -283,11 +270,6 @@ class ResampleInputSpec(AFNICommandInputSpec):
283270
argstr='-orient %s')
284271

285272

286-
class ResampleOutputSpec(TraitedSpec):
287-
out_file = File(desc='reoriented or resampled file',
288-
exists=True)
289-
290-
291273
class Resample(AFNIBaseCommand):
292274
"""Resample or reorient an image using AFNI 3dresample command
293275
@@ -307,7 +289,7 @@ class Resample(AFNIBaseCommand):
307289

308290
_cmd = '3dresample'
309291
input_spec = ResampleInputSpec
310-
output_spec = ResampleOutputSpec
292+
output_spec = AFNICommandOutputSpec
311293

312294
class AutoTcorrelateInputSpec(AFNICommandInputSpec):
313295
in_file = File(desc='timeseries x space (volume or surface) file',
@@ -328,10 +310,6 @@ class AutoTcorrelateInputSpec(AFNICommandInputSpec):
328310
out_file = File("%s_similarity_matrix.1D", desc='output image file name',
329311
argstr='-prefix %s', name_source="in_file", usedefault=True)
330312

331-
class AutoTcorrelateOutputSpec(TraitedSpec):
332-
out_file = File(desc='similarity, eta2 or correlation matrix',
333-
exists=True)
334-
335313
class AutoTcorrelate(AFNICommand):
336314
"""
337315
Examples
@@ -350,7 +328,7 @@ class AutoTcorrelate(AFNICommand):
350328
>>> res = corr.run() # doctest: +SKIP
351329
"""
352330
input_spec = AutoTcorrelateInputSpec
353-
output_spec = AutoTcorrelateOutputSpec
331+
output_spec = AFNICommandOutputSpec
354332
_cmd = '3dAutoTcorrelate'
355333

356334
def _overload_extension(self, value):
@@ -373,11 +351,6 @@ class TStatInputSpec(AFNICommandInputSpec):
373351
argstr='-prefix %s', name_source="in_file", usedefault=True)
374352

375353

376-
class TStatOutputSpec(TraitedSpec):
377-
out_file = File(desc='statistical file',
378-
exists=True)
379-
380-
381354
class TStat(AFNICommand):
382355
"""Compute voxel-wise statistics using AFNI 3dTstat command
383356
@@ -397,7 +370,7 @@ class TStat(AFNICommand):
397370

398371
_cmd = '3dTstat'
399372
input_spec = TStatInputSpec
400-
output_spec = TStatOutputSpec
373+
output_spec = AFNICommandOutputSpec
401374

402375

403376
class DetrendInputSpec(AFNICommandInputSpec):
@@ -411,11 +384,6 @@ class DetrendInputSpec(AFNICommandInputSpec):
411384
argstr='-prefix %s', name_source="in_file", usedefault=True)
412385

413386

414-
class DetrendOutputSpec(TraitedSpec):
415-
out_file = File(desc='statistical file',
416-
exists=True)
417-
418-
419387
class Detrend(AFNICommand):
420388
"""This program removes components from voxel time series using
421389
linear least squares
@@ -436,7 +404,7 @@ class Detrend(AFNICommand):
436404

437405
_cmd = '3dDetrend'
438406
input_spec = DetrendInputSpec
439-
output_spec = DetrendOutputSpec
407+
output_spec = AFNICommandOutputSpec
440408

441409

442410
class DespikeInputSpec(AFNICommandInputSpec):
@@ -450,11 +418,6 @@ class DespikeInputSpec(AFNICommandInputSpec):
450418
argstr='-prefix %s', name_source="in_file", usedefault=True)
451419

452420

453-
class DespikeOutputSpec(TraitedSpec):
454-
out_file = File(desc='despiked img',
455-
exists=True)
456-
457-
458421
class Despike(AFNICommand):
459422
"""Removes 'spikes' from the 3D+time input dataset
460423
@@ -473,7 +436,7 @@ class Despike(AFNICommand):
473436

474437
_cmd = '3dDespike'
475438
input_spec = DespikeInputSpec
476-
output_spec = DespikeOutputSpec
439+
output_spec = AFNICommandOutputSpec
477440

478441

479442
class AutomaskInputSpec(AFNICommandInputSpec):
@@ -665,11 +628,6 @@ class MergeInputSpec(AFNICommandInputSpec):
665628
units='mm')
666629

667630

668-
class MergeOutputSpec(TraitedSpec):
669-
out_file = File(desc='smoothed file',
670-
exists=True)
671-
672-
673631
class Merge(AFNICommand):
674632
"""Merge or edit volumes using AFNI 3dmerge command
675633
@@ -691,7 +649,7 @@ class Merge(AFNICommand):
691649

692650
_cmd = '3dmerge'
693651
input_spec = MergeInputSpec
694-
output_spec = MergeOutputSpec
652+
output_spec = AFNICommandOutputSpec
695653

696654

697655
class CopyInputSpec(AFNICommandInputSpec):
@@ -704,10 +662,6 @@ class CopyInputSpec(AFNICommandInputSpec):
704662
argstr='-prefix %s', name_source="in_file", usedefault=True)
705663

706664

707-
class CopyOutputSpec(TraitedSpec):
708-
out_file = File(desc='copied file', exists=True)
709-
710-
711665
class Copy(AFNICommand):
712666
"""Copies an image of one type to an image of the same
713667
or different type using 3dcopy command
@@ -728,7 +682,7 @@ class Copy(AFNICommand):
728682

729683
_cmd = '3dcopy'
730684
input_spec = CopyInputSpec
731-
output_spec = CopyOutputSpec
685+
output_spec = AFNICommandOutputSpec
732686

733687

734688
class FourierInputSpec(AFNICommandInputSpec):
@@ -749,10 +703,6 @@ class FourierInputSpec(AFNICommandInputSpec):
749703
mandatory=True)
750704

751705

752-
class FourierOutputSpec(TraitedSpec):
753-
out_file = File(desc='band-pass filtered file', exists=True)
754-
755-
756706
class Fourier(AFNICommand):
757707
"""Program to lowpass and/or highpass each voxel time series in a
758708
dataset, via the FFT
@@ -775,7 +725,7 @@ class Fourier(AFNICommand):
775725

776726
_cmd = '3dFourier'
777727
input_spec = FourierInputSpec
778-
output_spec = FourierOutputSpec
728+
output_spec = AFNICommandOutputSpec
779729

780730

781731
class ZCutUpInputSpec(AFNICommandInputSpec):
@@ -790,10 +740,6 @@ class ZCutUpInputSpec(AFNICommandInputSpec):
790740
argstr='-keep %s')
791741

792742

793-
class ZCutUpOutputSpec(TraitedSpec):
794-
out_file = File(desc='cut file', exists=True)
795-
796-
797743
class ZCutUp(AFNICommand):
798744
"""Cut z-slices from a volume using AFNI 3dZcutup command
799745
@@ -814,7 +760,7 @@ class ZCutUp(AFNICommand):
814760

815761
_cmd = '3dZcutup'
816762
input_spec = ZCutUpInputSpec
817-
output_spec = ZCutUpOutputSpec
763+
output_spec = AFNICommandOutputSpec
818764

819765

820766
class AllineateInputSpec(AFNICommandInputSpec):
@@ -831,10 +777,6 @@ class AllineateInputSpec(AFNICommandInputSpec):
831777
exists=True)
832778

833779

834-
class AllineateOutputSpec(TraitedSpec):
835-
out_file = File(desc='cut file', exists=True)
836-
837-
838780
class Allineate(AFNICommand):
839781
"""Program to align one dataset (the 'source') to a base dataset
840782
@@ -855,7 +797,7 @@ class Allineate(AFNICommand):
855797

856798
_cmd = '3dAllineate'
857799
input_spec = AllineateInputSpec
858-
output_spec = AllineateOutputSpec
800+
output_spec = AFNICommandOutputSpec
859801

860802

861803
class MaskaveInputSpec(AFNICommandInputSpec):
@@ -875,11 +817,6 @@ class MaskaveInputSpec(AFNICommandInputSpec):
875817
position=2)
876818

877819

878-
class MaskaveOutputSpec(TraitedSpec):
879-
out_file = File(desc='outfile',
880-
exists=True)
881-
882-
883820
class Maskave(AFNICommand):
884821
"""Computes average of all voxels in the input dataset
885822
which satisfy the criterion in the options list
@@ -903,7 +840,7 @@ class Maskave(AFNICommand):
903840

904841
_cmd = '3dmaskave'
905842
input_spec = MaskaveInputSpec
906-
output_spec = MaskaveOutputSpec
843+
output_spec = AFNICommandOutputSpec
907844

908845

909846
class SkullStripInputSpec(AFNICommandInputSpec):
@@ -916,11 +853,6 @@ class SkullStripInputSpec(AFNICommandInputSpec):
916853
argstr='-prefix %s', name_source="in_file", usedefault=True)
917854

918855

919-
class SkullStripOutputSpec(TraitedSpec):
920-
out_file = File(desc='outfile',
921-
exists=True)
922-
923-
924856
class SkullStrip(AFNICommand):
925857
"""A program to extract the brain from surrounding
926858
tissue from MRI T1-weighted images
@@ -940,7 +872,7 @@ class SkullStrip(AFNICommand):
940872
"""
941873
_cmd = '3dSkullStrip'
942874
input_spec = SkullStripInputSpec
943-
output_spec = SkullStripOutputSpec
875+
output_spec = AFNICommandOutputSpec
944876

945877

946878
class TCatInputSpec(AFNICommandInputSpec):
@@ -955,11 +887,6 @@ class TCatInputSpec(AFNICommandInputSpec):
955887
rlt = traits.Str(desc='options', argstr='-rlt%s', position=1)
956888

957889

958-
class TCatOutputSpec(TraitedSpec):
959-
out_file = File(desc='outfile',
960-
exists=True)
961-
962-
963890
class TCat(AFNICommand):
964891
"""Concatenate sub-bricks from input datasets into
965892
one big 3D+time dataset
@@ -981,7 +908,7 @@ class TCat(AFNICommand):
981908

982909
_cmd = '3dTcat'
983910
input_spec = TCatInputSpec
984-
output_spec = TCatOutputSpec
911+
output_spec = AFNICommandOutputSpec
985912

986913

987914
class FimInputSpec(AFNICommandInputSpec):
@@ -1003,11 +930,6 @@ class FimInputSpec(AFNICommandInputSpec):
1003930
argstr='-out %s', position=4)
1004931

1005932

1006-
class FimOutputSpec(TraitedSpec):
1007-
out_file = File(desc='outfile',
1008-
exists=True)
1009-
1010-
1011933
class Fim(AFNICommand):
1012934
"""Program to calculate the cross-correlation of
1013935
an ideal reference waveform with the measured FMRI
@@ -1032,7 +954,7 @@ class Fim(AFNICommand):
1032954

1033955
_cmd = '3dfim+'
1034956
input_spec = FimInputSpec
1035-
output_spec = FimOutputSpec
957+
output_spec = AFNICommandOutputSpec
1036958

1037959

1038960
class TCorrelateInputSpec(AFNIBaseCommandInputSpec):
@@ -1056,11 +978,6 @@ class TCorrelateInputSpec(AFNIBaseCommandInputSpec):
1056978
argstr='-polort %d', position=2)
1057979

1058980

1059-
class TCorrelateOutputSpec(TraitedSpec):
1060-
out_file = File(desc='outfile',
1061-
exists=True)
1062-
1063-
1064981
class TCorrelate(AFNIBaseCommand):
1065982
"""Computes the correlation coefficient between corresponding voxel
1066983
time series in two input 3D+time datasets 'xset' and 'yset'
@@ -1084,7 +1001,7 @@ class TCorrelate(AFNIBaseCommand):
10841001

10851002
_cmd = '3dTcorrelate'
10861003
input_spec = TCorrelateInputSpec
1087-
output_spec = TCorrelateOutputSpec
1004+
output_spec = AFNICommandOutputSpec
10881005

10891006

10901007
class BrickStatInputSpec(AFNIBaseCommandInputSpec):
@@ -1266,10 +1183,6 @@ class CalcInputSpec(AFNICommandInputSpec):
12661183
single_idx = traits.Int(desc='volume index for in_file_a')
12671184

12681185

1269-
class CalcOutputSpec(TraitedSpec):
1270-
out_file = File(desc=' output file', exists=True)
1271-
1272-
12731186
class Calc(AFNICommand):
12741187
"""This program does voxel-by-voxel arithmetic on 3D datasets
12751188
@@ -1293,7 +1206,7 @@ class Calc(AFNICommand):
12931206

12941207
_cmd = '3dcalc'
12951208
input_spec = CalcInputSpec
1296-
output_spec = CalcOutputSpec
1209+
output_spec = AFNICommandOutputSpec
12971210

12981211
def _format_arg(self, name, trait_spec, value):
12991212
if name == 'in_file_a':

0 commit comments

Comments
 (0)