@@ -307,7 +307,7 @@ def _overload_extension(self, value, name=None):
307
307
308
308
class ApplyTOPUPInputSpec (FSLCommandInputSpec ):
309
309
in_files = InputMultiPath (File (exists = True ), mandatory = True ,
310
- desc = 'name of 4D file with images' ,
310
+ desc = 'name of file with images' ,
311
311
argstr = '--imain=%s' , sep = ',' )
312
312
encoding_file = File (exists = True , mandatory = True ,
313
313
desc = 'name of text file with PE directions/times' ,
@@ -354,14 +354,14 @@ class ApplyTOPUP(FSLCommand):
354
354
355
355
>>> from nipype.interfaces.fsl import ApplyTOPUP
356
356
>>> applytopup = ApplyTOPUP()
357
- >>> applytopup.inputs.in_files = ["ds003_sub-01_mc .nii.gz ", "ds003_sub-01_mc .nii.gz "]
357
+ >>> applytopup.inputs.in_files = ["epi .nii", "epi_rev .nii"]
358
358
>>> applytopup.inputs.encoding_file = "topup_encoding.txt"
359
359
>>> applytopup.inputs.in_topup_fieldcoef = "topup_fieldcoef.nii.gz"
360
360
>>> applytopup.inputs.in_topup_movpar = "topup_movpar.txt"
361
361
>>> applytopup.inputs.output_type = "NIFTI_GZ"
362
362
>>> applytopup.cmdline # doctest: +ELLIPSIS +IGNORE_UNICODE
363
- 'applytopup --datain=topup_encoding.txt --imain=ds003_sub-01_mc .nii.gz,ds003_sub-01_mc .nii.gz \
364
- --inindex=1,2 --topup=topup --out=ds003_sub-01_mc_corrected .nii.gz'
363
+ 'applytopup --datain=topup_encoding.txt --imain=epi .nii,epi_rev .nii \
364
+ --inindex=1,2 --topup=topup --out=epi_corrected .nii.gz'
365
365
>>> res = applytopup.run() # doctest: +SKIP
366
366
367
367
"""
@@ -373,12 +373,6 @@ def _parse_inputs(self, skip=None):
373
373
if skip is None :
374
374
skip = []
375
375
376
- for filename in self .inputs .in_files :
377
- ndims = nib .load (filename ).header ['dim' ][0 ]
378
- if ndims != 4 :
379
- raise ValueError ('Input in_files for ApplyTopUp must be 4-D. {} is {}-D.'
380
- .format (filename , ndims ))
381
-
382
376
# If not defined, assume index are the first N entries in the
383
377
# parameters file, for N input images.
384
378
if not isdefined (self .inputs .in_index ):
0 commit comments