4
4
import nipype .interfaces .utility as niu
5
5
import nipype .interfaces .fsl as fsl
6
6
import os
7
+ import warnings
7
8
8
9
def create_dmri_preprocessing (name = 'dMRI_preprocessing' , use_fieldmap = True , fieldmap_registration = False ):
9
- """Creates a workflow that chains the necessary pipelines to
10
+ """
11
+ Creates a workflow that chains the necessary pipelines to
10
12
correct for motion, eddy currents, and, if selected, susceptibility
11
13
artifacts in EPI dMRI sequences.
12
14
13
- .. warning::
15
+ .. deprecated:: 0.9.3
16
+ Use :func:`nipype.workflows.dmri.preprocess.epi.all_fmb_pipeline` or
17
+ :func:`nipype.workflows.dmri.preprocess.epi.all_peb_pipeline` instead.
18
+
14
19
15
- IMPORTANT NOTICE: this workflow rotates the b-vectors, so please be adviced
16
- that not all the dicom converters ensure the consistency between the resulting
17
- nifti orientation and the b matrix table (e.g. dcm2nii checks it).
20
+ .. warning:: This workflow rotates the b-vectors, so please be
21
+ advised that not all the dicom converters ensure the consistency between the resulting
22
+ nifti orientation and the b matrix table (e.g. dcm2nii checks it).
18
23
19
24
20
25
Example
@@ -54,12 +59,16 @@ def create_dmri_preprocessing(name='dMRI_preprocessing', use_fieldmap=True, fiel
54
59
55
60
56
61
Optional arguments::
62
+
57
63
use_fieldmap - True if there are fieldmap files that should be used (default True)
58
64
fieldmap_registration - True if registration to fieldmap should be performed (default False)
59
65
60
66
61
67
"""
62
68
69
+ warnings .warn (('This workflow is deprecated from v.1.0.0, use of available '
70
+ 'nipype.workflows.dmri.preprocess.epi.all_*' ), DeprecationWarning )
71
+
63
72
pipeline = pe .Workflow (name = name )
64
73
65
74
inputnode = pe .Node (niu .IdentityInterface (
@@ -118,10 +127,12 @@ def create_motion_correct_pipeline(name='motion_correct'):
118
127
(Leemans et al. 2009 - http://www.ncbi.nlm.nih.gov/pubmed/19319973),
119
128
making use of the rotation matrix obtained by FLIRT.
120
129
121
- .. deprecated:: 1.0.0.
122
- Use :func:`nipype.workflows.dmri.preprocess.epi.motion_correct` instead
123
130
124
- .. warning:: IMPORTANT NOTICE: this workflow rotates the b-vectors, so please be adviced
131
+ .. deprecated:: 0.9.3
132
+ Use :func:`nipype.workflows.dmri.preprocess.epi.hmc_pipeline` instead.
133
+
134
+
135
+ .. warning:: This workflow rotates the b-vectors, so please be adviced
125
136
that not all the dicom converters ensure the consistency between the resulting
126
137
nifti orientation and the b matrix table (e.g. dcm2nii checks it).
127
138
@@ -148,6 +159,10 @@ def create_motion_correct_pipeline(name='motion_correct'):
148
159
149
160
"""
150
161
162
+ warnings .warn (('This workflow is deprecated from v.1.0.0, use '
163
+ 'nipype.workflows.dmri.preprocess.epi.hmc_pipeline instead' ),
164
+ DeprecationWarning )
165
+
151
166
inputnode = pe .Node (
152
167
niu .IdentityInterface (
153
168
fields = ['in_file' , 'ref_num' , 'in_bvec' ]),
@@ -184,7 +199,13 @@ def create_motion_correct_pipeline(name='motion_correct'):
184
199
185
200
186
201
def create_eddy_correct_pipeline (name = 'eddy_correct' ):
187
- """Creates a pipeline that replaces eddy_correct script in FSL. It takes a
202
+ """
203
+
204
+ .. deprecated:: 0.9.3
205
+ Use :func:`nipype.workflows.dmri.preprocess.epi.ecc_pipeline` instead.
206
+
207
+
208
+ Creates a pipeline that replaces eddy_correct script in FSL. It takes a
188
209
series of diffusion weighted images and linearly co-registers them to one
189
210
reference image. No rotation of the B-matrix is performed, so this pipeline
190
211
should be executed after the motion correction pipeline.
@@ -207,6 +228,10 @@ def create_eddy_correct_pipeline(name='eddy_correct'):
207
228
outputnode.eddy_corrected
208
229
"""
209
230
231
+ warnings .warn (('This workflow is deprecated from v.1.0.0, use '
232
+ 'nipype.workflows.dmri.preprocess.epi.ecc_pipeline instead' ),
233
+ DeprecationWarning )
234
+
210
235
inputnode = pe .Node (
211
236
niu .IdentityInterface (fields = ['in_file' , 'ref_num' ]),
212
237
name = 'inputnode' )
@@ -238,6 +263,11 @@ def create_eddy_correct_pipeline(name='eddy_correct'):
238
263
239
264
def fieldmap_correction (name = 'fieldmap_correction' , nocheck = False ):
240
265
"""
266
+
267
+ .. deprecated:: 0.9.3
268
+ Use :func:`nipype.workflows.dmri.preprocess.epi.sdc_fmb` instead.
269
+
270
+
241
271
Fieldmap-based retrospective correction of EPI images for the susceptibility distortion
242
272
artifact (Jezzard et al., 1995). Fieldmap images are assumed to be already registered
243
273
to EPI data, and a brain mask is required.
@@ -247,7 +277,6 @@ def fieldmap_correction(name='fieldmap_correction', nocheck=False):
247
277
available as of FSL 5.0.
248
278
249
279
250
-
251
280
Example
252
281
-------
253
282
@@ -283,6 +312,10 @@ def fieldmap_correction(name='fieldmap_correction', nocheck=False):
283
312
284
313
"""
285
314
315
+ warnings .warn (('This workflow is deprecated from v.1.0.0, use '
316
+ 'nipype.workflows.dmri.preprocess.epi.sdc_fmb instead' ),
317
+ DeprecationWarning )
318
+
286
319
inputnode = pe .Node (niu .IdentityInterface (
287
320
fields = ['in_file' ,
288
321
'in_mask' ,
@@ -361,8 +394,13 @@ def fieldmap_correction(name='fieldmap_correction', nocheck=False):
361
394
362
395
def topup_correction ( name = 'topup_correction' ):
363
396
"""
364
- Corrects for susceptibilty distortion of EPI images when one reverse encoding dataset has
365
- been acquired
397
+
398
+ .. deprecated:: 0.9.3
399
+ Use :func:`nipype.workflows.dmri.preprocess.epi.sdc_peb` instead.
400
+
401
+
402
+ Corrects for susceptibilty distortion of EPI images when one reverse encoding dataset has
403
+ been acquired
366
404
367
405
368
406
Example
@@ -375,18 +413,26 @@ def topup_correction( name='topup_correction' ):
375
413
>>> nipype_epicorrect.inputs.inputnode.ref_num = 0
376
414
>>> nipype_epicorrect.run() # doctest: +SKIP
377
415
416
+
378
417
Inputs::
418
+
379
419
inputnode.in_file_dir - EPI volume acquired in 'forward' phase encoding
380
420
inputnode.in_file_rev - EPI volume acquired in 'reversed' phase encoding
381
421
inputnode.encoding_direction - Direction encoding of in_file_dir
382
422
inputnode.ref_num - Identifier of the reference volumes (usually B0 volume)
383
423
424
+
384
425
Outputs::
385
426
386
427
outputnode.epi_corrected
387
428
388
429
389
430
"""
431
+
432
+ warnings .warn (('This workflow is deprecated from v.1.0.0, use '
433
+ 'nipype.workflows.dmri.preprocess.epi.sdc_peb instead' ),
434
+ DeprecationWarning )
435
+
390
436
pipeline = pe .Workflow (name = name )
391
437
392
438
inputnode = pe .Node (niu .IdentityInterface (
@@ -436,11 +482,18 @@ def topup_correction( name='topup_correction' ):
436
482
437
483
438
484
def create_epidewarp_pipeline (name = 'epidewarp' , fieldmap_registration = False ):
439
- """ Replaces the epidewarp.fsl script (http://www.nmr.mgh.harvard.edu/~greve/fbirn/b0/epidewarp.fsl)
485
+ """
486
+ Replaces the epidewarp.fsl script (http://www.nmr.mgh.harvard.edu/~greve/fbirn/b0/epidewarp.fsl)
440
487
for susceptibility distortion correction of dMRI & fMRI acquired with EPI sequences and the fieldmap
441
488
information (Jezzard et al., 1995) using FSL's FUGUE. The registration to the (warped) fieldmap
442
489
(strictly following the original script) is available using fieldmap_registration=True.
443
490
491
+
492
+ .. warning:: This workflow makes use of ``epidewarp.fsl`` a script of FSL deprecated long
493
+ time ago. The use of this workflow is not recommended, use
494
+ :func:`nipype.workflows.dmri.preprocess.epi.sdc_fmb` instead.
495
+
496
+
444
497
Example
445
498
-------
446
499
@@ -480,6 +533,9 @@ def create_epidewarp_pipeline(name='epidewarp', fieldmap_registration=False):
480
533
481
534
"""
482
535
536
+ warnings .warn (('This workflow reproduces a deprecated FSL script.' ),
537
+ DeprecationWarning )
538
+
483
539
inputnode = pe .Node (niu .IdentityInterface (fields = ['in_file' ,
484
540
'fieldmap_mag' ,
485
541
'fieldmap_pha' ,
0 commit comments