@@ -307,7 +307,7 @@ def _overload_extension(self, value, name=None):
307307
308308class ApplyTOPUPInputSpec (FSLCommandInputSpec ):
309309 in_files = InputMultiPath (File (exists = True ), mandatory = True ,
310- desc = 'name of 4D file with images' ,
310+ desc = 'name of file with images' ,
311311 argstr = '--imain=%s' , sep = ',' )
312312 encoding_file = File (exists = True , mandatory = True ,
313313 desc = 'name of text file with PE directions/times' ,
@@ -354,14 +354,14 @@ class ApplyTOPUP(FSLCommand):
354354
355355 >>> from nipype.interfaces.fsl import ApplyTOPUP
356356 >>> 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"]
358358 >>> applytopup.inputs.encoding_file = "topup_encoding.txt"
359359 >>> applytopup.inputs.in_topup_fieldcoef = "topup_fieldcoef.nii.gz"
360360 >>> applytopup.inputs.in_topup_movpar = "topup_movpar.txt"
361361 >>> applytopup.inputs.output_type = "NIFTI_GZ"
362362 >>> 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'
365365 >>> res = applytopup.run() # doctest: +SKIP
366366
367367 """
@@ -373,12 +373,6 @@ def _parse_inputs(self, skip=None):
373373 if skip is None :
374374 skip = []
375375
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-
382376 # If not defined, assume index are the first N entries in the
383377 # parameters file, for N input images.
384378 if not isdefined (self .inputs .in_index ):
0 commit comments