@@ -348,20 +348,7 @@ def create_workflow(files,
348
348
"""
349
349
350
350
smooth = Node (interface = spm .Smooth (), name = "smooth" )
351
-
352
- """`write_voxel_sizes` is the input of the normalize interface that is recommended to be set to
353
- the voxel sizes of the target volume. There is no need to set it manually since we van infer it from data
354
- using the following function:
355
- """
356
-
357
- def get_vox_dims (volume ):
358
- import nibabel as nb
359
- if isinstance (volume , list ):
360
- volume = volume [0 ]
361
- nii = nb .load (volume )
362
- hdr = nii .get_header ()
363
- voxdims = hdr .get_zooms ()
364
- return [float (voxdims [0 ]), float (voxdims [1 ]), float (voxdims [2 ])]
351
+ smooth .inputs .fwhm = vol_fwhm
365
352
366
353
"""Here we are connecting all the nodes together. Notice that we add the merge node only if you choose
367
354
to use 4D. Also `get_vox_dims` function is passed along the input volume of normalise to set the optimal
@@ -495,14 +482,8 @@ def merge_files(in1, in2):
495
482
name = 'bandpass_unsmooth' )
496
483
bandpass1 .inputs .fs = 1. / TR
497
484
498
- if highpass_freq < 0 :
499
- bandpass1 .inputs .highpass_freq = - 1
500
- else :
501
- bandpass1 .inputs .highpass_freq = highpass_freq
502
- if lowpass_freq < 0 :
503
- bandpass1 .inputs .lowpass_freq = - 1
504
- else :
505
- bandpass1 .inputs .lowpass_freq = lowpass_freq
485
+ bandpass1 .inputs .highpass_freq = highpass_freq
486
+ bandpass1 .inputs .lowpass_freq = lowpass_freq
506
487
wf .connect (filter2 , 'out_res' , bandpass1 , 'files' )
507
488
508
489
bandpass2 = bandpass1 .clone (name = 'bandpass_smooth' )
0 commit comments