@@ -159,6 +159,7 @@ class Merge(FSLCommand):
159
159
160
160
Examples
161
161
--------
162
+
162
163
>>> from nipype.interfaces.fsl import Merge
163
164
>>> merger = Merge()
164
165
>>> merger.inputs.in_files = ['functional2.nii', 'functional3.nii']
@@ -169,6 +170,8 @@ class Merge(FSLCommand):
169
170
>>> merger.inputs.tr = 2.25
170
171
>>> merger.cmdline
171
172
'fslmerge -tr functional2_merged.nii.gz functional2.nii functional3.nii 2.25'
173
+
174
+
172
175
"""
173
176
174
177
_cmd = 'fslmerge'
@@ -223,6 +226,7 @@ class ExtractROI(FSLCommand):
223
226
extract voxels 10 to 12 inclusive you would specify 10 and 3 (not
224
227
10 and 12).
225
228
229
+
226
230
Examples
227
231
--------
228
232
@@ -232,6 +236,8 @@ class ExtractROI(FSLCommand):
232
236
... t_size=1)
233
237
>>> fslroi.cmdline == 'fslroi %s bar.nii 0 1' % anatfile
234
238
True
239
+
240
+
235
241
"""
236
242
237
243
_cmd = 'fslroi'
@@ -249,8 +255,10 @@ def _list_outputs(self):
249
255
by running the interface. Some files are always generated, others
250
256
depending on which ``inputs`` options are set.
251
257
258
+
252
259
Returns
253
260
-------
261
+
254
262
outputs : Bunch object
255
263
Bunch object containing all possible files generated by
256
264
interface object.
@@ -301,6 +309,7 @@ def _list_outputs(self):
301
309
302
310
Returns
303
311
-------
312
+
304
313
outputs : Bunch object
305
314
Bunch object containing all possible files generated by
306
315
interface object.
@@ -338,9 +347,9 @@ class ImageMathsOutputSpec(TraitedSpec):
338
347
339
348
class ImageMaths (FSLCommand ):
340
349
"""Use FSL fslmaths command to allow mathematical manipulation of images
341
-
342
350
`FSL info <http://www.fmrib.ox.ac.uk/fslcourse/lectures/practicals/intro/index.htm#fslutils>`_
343
351
352
+
344
353
Examples
345
354
--------
346
355
@@ -350,6 +359,8 @@ class ImageMaths(FSLCommand):
350
359
... out_file='foo_maths.nii')
351
360
>>> maths.cmdline == 'fslmaths %s -add 5 foo_maths.nii' % anatfile
352
361
True
362
+
363
+
353
364
"""
354
365
input_spec = ImageMathsInputSpec
355
366
output_spec = ImageMathsOutputSpec
@@ -465,8 +476,9 @@ class ImageStatsOutputSpec(TraitedSpec):
465
476
466
477
class ImageStats (FSLCommand ):
467
478
"""Use FSL fslstats command to calculate stats from images
479
+ `FSL info
480
+ <http://www.fmrib.ox.ac.uk/fslcourse/lectures/practicals/intro/index.htm#fslutils>`_
468
481
469
- `FSL info <http://www.fmrib.ox.ac.uk/fslcourse/lectures/practicals/intro/index.htm#fslutils>`_
470
482
471
483
Examples
472
484
--------
@@ -477,6 +489,7 @@ class ImageStats(FSLCommand):
477
489
>>> stats.cmdline == 'fslstats %s -M'%funcfile
478
490
True
479
491
492
+
480
493
"""
481
494
input_spec = ImageStatsInputSpec
482
495
output_spec = ImageStatsOutputSpec
@@ -543,9 +556,11 @@ class AvScale(FSLCommand):
543
556
544
557
Examples
545
558
--------
546
- avscale = AvScale()
547
- avscale.inputs.mat_file = 'flirt.mat'
548
- res = avscale.run() # doctest: +SKIP
559
+
560
+ >>> avscale = AvScale()
561
+ >>> avscale.inputs.mat_file = 'flirt.mat'
562
+ >>> res = avscale.run() # doctest: +SKIP
563
+
549
564
550
565
"""
551
566
input_spec = AvScaleInputSpec
@@ -634,8 +649,10 @@ class Overlay(FSLCommand):
634
649
""" Use FSL's overlay command to combine background and statistical images
635
650
into one volume
636
651
652
+
637
653
Examples
638
654
--------
655
+
639
656
>>> from nipype.interfaces import fsl
640
657
>>> combine = fsl.Overlay()
641
658
>>> combine.inputs.background_image = 'mean_func.nii.gz'
@@ -645,6 +662,7 @@ class Overlay(FSLCommand):
645
662
>>> combine.inputs.show_negative_stats = True
646
663
>>> res = combine.run() #doctest: +SKIP
647
664
665
+
648
666
"""
649
667
_cmd = 'overlay'
650
668
input_spec = OverlayInputSpec
@@ -745,8 +763,10 @@ class SlicerOutputSpec(TraitedSpec):
745
763
class Slicer (FSLCommand ):
746
764
"""Use FSL's slicer command to output a png image from a volume.
747
765
766
+
748
767
Examples
749
768
--------
769
+
750
770
>>> from nipype.interfaces import fsl
751
771
>>> from nipype.testing import example_data
752
772
>>> slice = fsl.Slicer()
@@ -755,6 +775,7 @@ class Slicer(FSLCommand):
755
775
>>> slice.inputs.image_width = 750
756
776
>>> res = slice.run() #doctest: +SKIP
757
777
778
+
758
779
"""
759
780
_cmd = 'slicer'
760
781
input_spec = SlicerInputSpec
@@ -835,13 +856,15 @@ class PlotTimeSeries(FSLCommand):
835
856
836
857
Examples
837
858
--------
859
+
838
860
>>> import nipype.interfaces.fsl as fsl
839
861
>>> plotter = fsl.PlotTimeSeries()
840
862
>>> plotter.inputs.in_file = 'functional.par'
841
863
>>> plotter.inputs.title = 'Functional timeseries'
842
864
>>> plotter.inputs.labels = ['run1', 'run2']
843
865
>>> plotter.run() #doctest: +SKIP
844
866
867
+
845
868
"""
846
869
_cmd = "fsl_tsplot"
847
870
input_spec = PlotTimeSeriesInputSpec
@@ -915,23 +938,28 @@ class PlotMotionParams(FSLCommand):
915
938
"""Use fsl_tsplot to plot the estimated motion parameters from a realignment
916
939
program.
917
940
941
+
918
942
Examples
919
943
--------
944
+
920
945
>>> import nipype.interfaces.fsl as fsl
921
946
>>> plotter = fsl.PlotMotionParams()
922
947
>>> plotter.inputs.in_file = 'functional.par'
923
948
>>> plotter.inputs.in_source = 'fsl'
924
949
>>> plotter.inputs.plot_type = 'rotations'
925
950
>>> res = plotter.run() #doctest: +SKIP
926
951
952
+
927
953
Notes
928
954
-----
955
+
929
956
The 'in_source' attribute determines the order of columns that are expected
930
957
in the source file. FSL prints motion parameters in the order rotations,
931
958
translations, while SPM prints them in the opposite order. This interface
932
959
should be able to plot timecourses of motion parameters generated from other
933
960
sources as long as they fall under one of these two patterns. For more
934
961
flexibilty, see the :class:`fsl.PlotTimeSeries` interface.
962
+
935
963
"""
936
964
_cmd = 'fsl_tsplot'
937
965
input_spec = PlotMotionParamsInputSpec
@@ -1024,13 +1052,16 @@ class ConvertXFM(FSLCommand):
1024
1052
1025
1053
Examples
1026
1054
--------
1055
+
1027
1056
>>> import nipype.interfaces.fsl as fsl
1028
1057
>>> invt = fsl.ConvertXFM()
1029
1058
>>> invt.inputs.in_file = "flirt.mat"
1030
1059
>>> invt.inputs.invert_xfm = True
1031
1060
>>> invt.inputs.out_file = 'flirt_inv.mat'
1032
1061
>>> invt.cmdline
1033
1062
'convert_xfm -omat flirt_inv.mat -inverse flirt.mat'
1063
+
1064
+
1034
1065
"""
1035
1066
1036
1067
_cmd = "convert_xfm"
@@ -1134,11 +1165,13 @@ class PowerSpectrum(FSLCommand):
1134
1165
1135
1166
Examples
1136
1167
--------
1168
+
1137
1169
>>> from nipype.interfaces import fsl
1138
1170
>>> pspec = fsl.PowerSpectrum()
1139
1171
>>> pspec.inputs.in_file = 'functional.nii'
1140
1172
>>> res = pspec.run() # doctest: +SKIP
1141
1173
1174
+
1142
1175
"""
1143
1176
1144
1177
_cmd = 'fslpspec'
@@ -1189,10 +1222,13 @@ class SigLoss(FSLCommand):
1189
1222
1190
1223
Examples
1191
1224
--------
1225
+
1192
1226
>>> sigloss = SigLoss()
1193
1227
>>> sigloss.inputs.in_file = "phase.nii"
1194
1228
>>> sigloss.inputs.echo_time = 0.03
1195
1229
>>> res = sigloss.run() # doctest: +SKIP
1230
+
1231
+
1196
1232
"""
1197
1233
input_spec = SigLossInputSpec
1198
1234
output_spec = SigLossOuputSpec
@@ -1226,8 +1262,10 @@ class Reorient2Std(FSLCommand):
1226
1262
"""fslreorient2std is a tool for reorienting the image to match the
1227
1263
approximate orientation of the standard template images (MNI152).
1228
1264
1265
+
1229
1266
Examples
1230
1267
--------
1268
+
1231
1269
>>> reorient = Reorient2Std()
1232
1270
>>> reorient.inputs.in_file = "functional.nii"
1233
1271
>>> res = reorient.run() # doctest: +SKIP
@@ -1310,7 +1348,9 @@ class InvWarpOutputSpec(TraitedSpec):
1310
1348
1311
1349
1312
1350
class InvWarp (FSLCommand ):
1313
- """Use FSL Invwarp to inverse a FNIRT warp
1351
+ """
1352
+ Use FSL Invwarp to invert a FNIRT warp
1353
+
1314
1354
1315
1355
Examples
1316
1356
--------
@@ -1322,6 +1362,8 @@ class InvWarp(FSLCommand):
1322
1362
>>> invwarp.cmdline
1323
1363
'invwarp --out=struct2mni_inverse.nii.gz --ref=anatomical.nii --warp=struct2mni.nii'
1324
1364
>>> res = invwarp.run() # doctest: +SKIP
1365
+
1366
+
1325
1367
"""
1326
1368
1327
1369
input_spec = InvWarpInputSpec
@@ -1390,13 +1432,16 @@ class ComplexOuputSpec(TraitedSpec):
1390
1432
1391
1433
class Complex (FSLCommand ):
1392
1434
"""fslcomplex is a tool for converting complex data
1435
+
1393
1436
Examples
1394
1437
--------
1438
+
1395
1439
>>> cplx = Complex()
1396
1440
>>> cplx.inputs.complex_in_file = "complex.nii"
1397
1441
>>> cplx.real_polar = True
1398
1442
>>> res = cplx.run() # doctest: +SKIP
1399
1443
1444
+
1400
1445
"""
1401
1446
_cmd = 'fslcomplex'
1402
1447
input_spec = ComplexInputSpec
@@ -1524,7 +1569,8 @@ class WarpUtils(FSLCommand):
1524
1569
to convert field->coefficients, coefficients->field, coefficients->other_coefficients etc
1525
1570
1526
1571
1527
- Examples::
1572
+ Examples
1573
+ --------
1528
1574
1529
1575
>>> from nipype.interfaces.fsl import WarpUtils
1530
1576
>>> warputils = WarpUtils()
@@ -1535,6 +1581,8 @@ class WarpUtils(FSLCommand):
1535
1581
>>> warputils.cmdline # doctest: +ELLIPSIS
1536
1582
'fnirtfileutils --in=warpfield.nii --outformat=spline --ref=T1.nii --warpres=10.0000,10.0000,10.0000 --out=warpfield_coeffs.nii.gz'
1537
1583
>>> res = invwarp.run() # doctest: +SKIP
1584
+
1585
+
1538
1586
"""
1539
1587
1540
1588
input_spec = WarpUtilsInputSpec
@@ -1649,7 +1697,8 @@ class ConvertWarp(FSLCommand):
1649
1697
for combining multiple transforms into one.
1650
1698
1651
1699
1652
- Examples::
1700
+ Examples
1701
+ --------
1653
1702
1654
1703
>>> from nipype.interfaces.fsl import ConvertWarp
1655
1704
>>> warputils = ConvertWarp()
@@ -1659,6 +1708,8 @@ class ConvertWarp(FSLCommand):
1659
1708
>>> warputils.cmdline # doctest: +ELLIPSIS
1660
1709
'convertwarp --ref=T1.nii --rel --warp1=warpfield.nii --out=T1_concatwarp.nii.gz'
1661
1710
>>> res = invwarp.run() # doctest: +SKIP
1711
+
1712
+
1662
1713
"""
1663
1714
1664
1715
input_spec = ConvertWarpInputSpec
@@ -1701,7 +1752,8 @@ class WarpPoints(CommandLine):
1701
1752
.. Note:: transformation of TrackVis trk files is not yet implemented
1702
1753
1703
1754
1704
- Examples::
1755
+ Examples
1756
+ --------
1705
1757
1706
1758
>>> from nipype.interfaces.fsl import WarpPoints
1707
1759
>>> warppoints = WarpPoints()
@@ -1713,6 +1765,8 @@ class WarpPoints(CommandLine):
1713
1765
>>> warppoints.cmdline # doctest: +ELLIPSIS
1714
1766
'img2imgcoord -mm -dest T1.nii -src epi.nii -warp warpfield.nii surf.txt'
1715
1767
>>> res = invwarp.run() # doctest: +SKIP
1768
+
1769
+
1716
1770
"""
1717
1771
1718
1772
input_spec = WarpPointsInputSpec
@@ -1858,7 +1912,9 @@ class WarpPointsToStd(WarpPoints):
1858
1912
1859
1913
.. Note:: transformation of TrackVis trk files is not yet implemented
1860
1914
1861
- Examples::
1915
+
1916
+ Examples
1917
+ --------
1862
1918
1863
1919
>>> from nipype.interfaces.fsl import WarpPointsToStd
1864
1920
>>> warppoints = WarpPointsToStd()
@@ -1870,6 +1926,8 @@ class WarpPointsToStd(WarpPoints):
1870
1926
>>> warppoints.cmdline # doctest: +ELLIPSIS
1871
1927
'img2stdcoord -mm -img T1.nii -std mni.nii -warp warpfield.nii surf.txt'
1872
1928
>>> res = invwarp.run() # doctest: +SKIP
1929
+
1930
+
1873
1931
"""
1874
1932
1875
1933
input_spec = WarpPointsToStdInputSpec
0 commit comments