@@ -204,14 +204,10 @@ class FieldMapOutputSpec(TraitedSpec):
204204
205205class FieldMap (SPMCommand ):
206206 """Use the fieldmap toolbox from spm to calculate the voxel displacement map (VDM).
207-
208207 http://www.fil.ion.ucl.ac.uk/spm/doc/manual.pdf#page=173
209-
210208 .. important::
211-
212209 This interface does not deal with real/imag magnitude images nor
213210 with the two phase files case.
214-
215211 Examples
216212 --------
217213 >>> from nipype.interfaces.spm import FieldMap
@@ -223,7 +219,6 @@ class FieldMap(SPMCommand):
223219 >>> fm.inputs.total_readout_time = 15.6
224220 >>> fm.inputs.epi_file = 'epi.nii'
225221 >>> fm.run() # doctest: +SKIP
226-
227222 """
228223
229224 input_spec = FieldMapInputSpec
@@ -258,13 +253,11 @@ def _list_outputs(self):
258253class ApplyVDMInputSpec (SPMCommandInputSpec ):
259254
260255 in_files = InputMultiObject (
261- traits .Either (
262- ImageFileSPM (exists = True ), traits .List (ImageFileSPM (exists = True ))
263- ),
264- field = 'data.scans' ,
256+ ImageFileSPM (exists = True ),
257+ field = "data.scans" ,
265258 mandatory = True ,
266259 copyfile = True ,
267- desc = ' list of filenames to apply the vdm to' ,
260+ desc = " list of filenames to apply the vdm to" ,
268261 )
269262 vdmfile = File (
270263 field = "data.vdmfile" ,
@@ -321,14 +314,10 @@ class ApplyVDMOutputSpec(TraitedSpec):
321314
322315class ApplyVDM (SPMCommand ):
323316 """Use the fieldmap toolbox from spm to apply the voxel displacement map (VDM) to some epi files.
324-
325317 http://www.fil.ion.ucl.ac.uk/spm/doc/manual.pdf#page=173
326-
327318 .. important::
328-
329319 This interface does not deal with real/imag magnitude images nor
330320 with the two phase files case.
331-
332321 """
333322
334323 input_spec = ApplyVDMInputSpec
@@ -339,11 +328,7 @@ class ApplyVDM(SPMCommand):
339328 def _format_arg (self , opt , spec , val ):
340329 """Convert input to appropriate format for spm"""
341330
342- if opt == 'in_files' :
343- return scans_for_fnames (
344- ensure_list (val ), keep4d = False , separate_sessions = False
345- )
346- if opt == 'vdmfile' :
331+ if opt in ["in_files" , "vdmfile" ]:
347332 return scans_for_fname (ensure_list (val ))
348333 return super (ApplyVDM , self )._format_arg (opt , spec , val )
349334
@@ -435,12 +420,9 @@ class SliceTimingOutputSpec(TraitedSpec):
435420
436421class SliceTiming (SPMCommand ):
437422 """Use spm to perform slice timing correction.
438-
439423 http://www.fil.ion.ucl.ac.uk/spm/doc/manual.pdf#page=19
440-
441424 Examples
442425 --------
443-
444426 >>> from nipype.interfaces.spm import SliceTiming
445427 >>> st = SliceTiming()
446428 >>> st.inputs.in_files = 'functional.nii'
@@ -450,7 +432,6 @@ class SliceTiming(SPMCommand):
450432 >>> st.inputs.slice_order = list(range(32,0,-1))
451433 >>> st.inputs.ref_slice = 1
452434 >>> st.run() # doctest: +SKIP
453-
454435 """
455436
456437 input_spec = SliceTimingInputSpec
@@ -587,18 +568,14 @@ class RealignOutputSpec(TraitedSpec):
587568
588569class Realign (SPMCommand ):
589570 """Use spm_realign for estimating within modality rigid body alignment
590-
591571 http://www.fil.ion.ucl.ac.uk/spm/doc/manual.pdf#page=25
592-
593572 Examples
594573 --------
595-
596574 >>> import nipype.interfaces.spm as spm
597575 >>> realign = spm.Realign()
598576 >>> realign.inputs.in_files = 'functional.nii'
599577 >>> realign.inputs.register_to_mean = True
600578 >>> realign.run() # doctest: +SKIP
601-
602579 """
603580
604581 input_spec = RealignInputSpec
@@ -851,19 +828,15 @@ class RealignUnwarp(SPMCommand):
851828 of time series. Function accepts only one single field map. If in_files is a
852829 list of files they will be treated as separate sessions but associated to the
853830 same fieldmap.
854-
855831 http://www.fil.ion.ucl.ac.uk/spm/doc/manual.pdf#page=31
856-
857832 Examples
858833 --------
859-
860834 >>> import nipype.interfaces.spm as spm
861835 >>> realignUnwarp = spm.RealignUnwarp()
862836 >>> realignUnwarp.inputs.in_files = ['functional.nii', 'functional2.nii']
863837 >>> realignUnwarp.inputs.phase_map = 'voxeldisplacemap.vdm'
864838 >>> realignUnwarp.inputs.register_to_mean = True
865839 >>> realignUnwarp.run() # doctest: +SKIP
866-
867840 """
868841
869842 input_spec = RealignUnwarpInputSpec
@@ -1028,18 +1001,14 @@ class CoregisterOutputSpec(TraitedSpec):
10281001
10291002class Coregister (SPMCommand ):
10301003 """Use spm_coreg for estimating cross-modality rigid body alignment
1031-
10321004 http://www.fil.ion.ucl.ac.uk/spm/doc/manual.pdf#page=39
1033-
10341005 Examples
10351006 --------
1036-
10371007 >>> import nipype.interfaces.spm as spm
10381008 >>> coreg = spm.Coregister()
10391009 >>> coreg.inputs.target = 'functional.nii'
10401010 >>> coreg.inputs.source = 'structural.nii'
10411011 >>> coreg.run() # doctest: +SKIP
1042-
10431012 """
10441013
10451014 input_spec = CoregisterInputSpec
@@ -1205,16 +1174,13 @@ class NormalizeOutputSpec(TraitedSpec):
12051174
12061175class Normalize (SPMCommand ):
12071176 """use spm_normalise for warping an image to a template
1208-
12091177 http://www.fil.ion.ucl.ac.uk/spm/doc/manual.pdf#page=203
1210-
12111178 Examples
12121179 --------
12131180 >>> import nipype.interfaces.spm as spm
12141181 >>> norm = spm.Normalize()
12151182 >>> norm.inputs.source = 'functional.nii'
12161183 >>> norm.run() # doctest: +SKIP
1217-
12181184 """
12191185
12201186 input_spec = NormalizeInputSpec
@@ -1437,17 +1403,14 @@ class Normalize12(SPMCommand):
14371403 known as ``New Segment`` in SPM8). Note that the normalisation in SPM12
14381404 is done towards a file containing multiple tissue probability maps, which
14391405 was not the case in SPM8.
1440-
14411406 http://www.fil.ion.ucl.ac.uk/spm/doc/manual.pdf#page=49
1442-
14431407 Examples
14441408 --------
14451409 >>> import nipype.interfaces.spm as spm
14461410 >>> norm12 = spm.Normalize12()
14471411 >>> norm12.inputs.image_to_align = 'structural.nii'
14481412 >>> norm12.inputs.apply_to_files = 'functional.nii'
14491413 >>> norm12.run() # doctest: +SKIP
1450-
14511414 """
14521415
14531416 input_spec = Normalize12InputSpec
@@ -1679,16 +1642,13 @@ class SegmentOutputSpec(TraitedSpec):
16791642class Segment (SPMCommand ):
16801643 """use spm_segment to separate structural images into different
16811644 tissue classes.
1682-
16831645 http://www.fil.ion.ucl.ac.uk/spm/doc/manual.pdf#page=209
1684-
16851646 Examples
16861647 --------
16871648 >>> import nipype.interfaces.spm as spm
16881649 >>> seg = spm.Segment()
16891650 >>> seg.inputs.data = 'structural.nii'
16901651 >>> seg.run() # doctest: +SKIP
1691-
16921652 """
16931653
16941654 input_spec = SegmentInputSpec
@@ -1840,22 +1800,17 @@ class NewSegmentOutputSpec(TraitedSpec):
18401800class NewSegment (SPMCommand ):
18411801 """Use spm_preproc8 (New Segment) to separate structural images into
18421802 different tissue classes. Supports multiple modalities.
1843-
18441803 NOTE: This interface currently supports single channel input only
1845-
18461804 http://www.fil.ion.ucl.ac.uk/spm/doc/manual.pdf#page=43
1847-
18481805 Examples
18491806 --------
18501807 >>> import nipype.interfaces.spm as spm
18511808 >>> seg = spm.NewSegment()
18521809 >>> seg.inputs.channel_files = 'structural.nii'
18531810 >>> seg.inputs.channel_info = (0.0001, 60, (True, True))
18541811 >>> seg.run() # doctest: +SKIP
1855-
18561812 For VBM pre-processing [http://www.fil.ion.ucl.ac.uk/~john/misc/VBMclass10.pdf],
18571813 TPM.nii should be replaced by /path/to/spm8/toolbox/Seg/TPM.nii
1858-
18591814 >>> seg = NewSegment()
18601815 >>> seg.inputs.channel_files = 'structural.nii'
18611816 >>> tissue1 = (('TPM.nii', 1), 2, (True,True), (False, False))
@@ -1865,7 +1820,6 @@ class NewSegment(SPMCommand):
18651820 >>> tissue5 = (('TPM.nii', 5), 2, (False,False), (False, False))
18661821 >>> seg.inputs.tissues = [tissue1, tissue2, tissue3, tissue4, tissue5]
18671822 >>> seg.run() # doctest: +SKIP
1868-
18691823 """
18701824
18711825 input_spec = NewSegmentInputSpec
@@ -2088,19 +2042,15 @@ class MultiChannelNewSegmentOutputSpec(TraitedSpec):
20882042class MultiChannelNewSegment (SPMCommand ):
20892043 """Use spm_preproc8 (New Segment) to separate structural images into
20902044 different tissue classes. Supports multiple modalities and multichannel inputs.
2091-
20922045 http://www.fil.ion.ucl.ac.uk/spm/doc/manual.pdf#page=45
2093-
20942046 Examples
20952047 --------
20962048 >>> import nipype.interfaces.spm as spm
20972049 >>> seg = spm.MultiChannelNewSegment()
20982050 >>> seg.inputs.channels = [('structural.nii',(0.0001, 60, (True, True)))]
20992051 >>> seg.run() # doctest: +SKIP
2100-
21012052 For VBM pre-processing [http://www.fil.ion.ucl.ac.uk/~john/misc/VBMclass10.pdf],
21022053 TPM.nii should be replaced by /path/to/spm8/toolbox/Seg/TPM.nii
2103-
21042054 >>> seg = MultiChannelNewSegment()
21052055 >>> channel1= ('T1.nii',(0.0001, 60, (True, True)))
21062056 >>> channel2= ('T2.nii',(0.0001, 60, (True, True)))
@@ -2112,7 +2062,6 @@ class MultiChannelNewSegment(SPMCommand):
21122062 >>> tissue5 = (('TPM.nii', 5), 2, (False,False), (False, False))
21132063 >>> seg.inputs.tissues = [tissue1, tissue2, tissue3, tissue4, tissue5]
21142064 >>> seg.run() # doctest: +SKIP
2115-
21162065 """
21172066
21182067 input_spec = MultiChannelNewSegmentInputSpec
@@ -2270,9 +2219,7 @@ class SmoothOutputSpec(TraitedSpec):
22702219
22712220class Smooth (SPMCommand ):
22722221 """Use spm_smooth for 3D Gaussian smoothing of image volumes.
2273-
22742222 http://www.fil.ion.ucl.ac.uk/spm/doc/manual.pdf#page=55
2275-
22762223 Examples
22772224 --------
22782225 >>> import nipype.interfaces.spm as spm
@@ -2345,12 +2292,10 @@ class DARTELInputSpec(SPMCommandInputSpec):
23452292 field = "warp.settings.param" ,
23462293 desc = """\
23472294List of tuples for each iteration
2348-
23492295 * Inner iterations
23502296 * Regularization parameters
23512297 * Time points for deformation model
23522298 * smoothing parameter
2353-
23542299""" ,
23552300 )
23562301 optimization_parameters = traits .Tuple (
@@ -2360,11 +2305,9 @@ class DARTELInputSpec(SPMCommandInputSpec):
23602305 field = "warp.settings.optim" ,
23612306 desc = """\
23622307Optimization settings a tuple:
2363-
23642308 * LM regularization
23652309 * cycles of multigrid solver
23662310 * relaxation iterations
2367-
23682311""" ,
23692312 )
23702313
@@ -2379,16 +2322,13 @@ class DARTELOutputSpec(TraitedSpec):
23792322
23802323class DARTEL (SPMCommand ):
23812324 """Use spm DARTEL to create a template and flow fields
2382-
23832325 http://www.fil.ion.ucl.ac.uk/spm/doc/manual.pdf#page=185
2384-
23852326 Examples
23862327 --------
23872328 >>> import nipype.interfaces.spm as spm
23882329 >>> dartel = spm.DARTEL()
23892330 >>> dartel.inputs.image_files = [['rc1s1.nii','rc1s2.nii'],['rc2s1.nii', 'rc2s2.nii']]
23902331 >>> dartel.run() # doctest: +SKIP
2391-
23922332 """
23932333
23942334 input_spec = DARTELInputSpec
@@ -2503,9 +2443,7 @@ class DARTELNorm2MNIOutputSpec(TraitedSpec):
25032443
25042444class DARTELNorm2MNI (SPMCommand ):
25052445 """Use spm DARTEL to normalize data to MNI space
2506-
25072446 http://www.fil.ion.ucl.ac.uk/spm/doc/manual.pdf#page=188
2508-
25092447 Examples
25102448 --------
25112449 >>> import nipype.interfaces.spm as spm
@@ -2515,7 +2453,6 @@ class DARTELNorm2MNI(SPMCommand):
25152453 >>> nm.inputs.apply_to_files = ['c1s1.nii', 'c1s3.nii']
25162454 >>> nm.inputs.modulate = True
25172455 >>> nm.run() # doctest: +SKIP
2518-
25192456 """
25202457
25212458 input_spec = DARTELNorm2MNIInputSpec
@@ -2598,17 +2535,14 @@ class CreateWarpedOutputSpec(TraitedSpec):
25982535
25992536class CreateWarped (SPMCommand ):
26002537 """Apply a flow field estimated by DARTEL to create warped images
2601-
26022538 http://www.fil.ion.ucl.ac.uk/spm/doc/manual.pdf#page=190
2603-
26042539 Examples
26052540 --------
26062541 >>> import nipype.interfaces.spm as spm
26072542 >>> create_warped = spm.CreateWarped()
26082543 >>> create_warped.inputs.image_files = ['rc1s1.nii', 'rc1s2.nii']
26092544 >>> create_warped.inputs.flowfield_files = ['u_rc1s1_Template.nii', 'u_rc1s2_Template.nii']
26102545 >>> create_warped.run() # doctest: +SKIP
2611-
26122546 """
26132547
26142548 input_spec = CreateWarpedInputSpec
@@ -2890,7 +2824,6 @@ class VBMSegmentOuputSpec(TraitedSpec):
28902824class VBMSegment (SPMCommand ):
28912825 """Use VBM8 toolbox to separate structural images into different
28922826 tissue classes.
2893-
28942827 Example
28952828 -------
28962829 >>> import nipype.interfaces.spm as spm
0 commit comments