Skip to content

Commit 2677ea6

Browse files
committed
clean up white spaces
1 parent 92c02d1 commit 2677ea6

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

examples/fmri_ants_openfmri.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,6 @@ def create_reg_workflow(name='registration'):
228228
register.connect(stripper, 'out_file', reg, 'moving_image')
229229
register.connect(inputnode,'target_image_brain', reg,'fixed_image')
230230

231-
232231
"""
233232
Concatenate the affine and ants transforms into a list
234233
"""
@@ -239,7 +238,6 @@ def create_reg_workflow(name='registration'):
239238
register.connect(convert2itk, 'itk_transform', merge, 'in2')
240239
register.connect(reg, ('composite_transform', pickfirst), merge, 'in1')
241240

242-
243241
"""
244242
Transform the mean image. First to anatomical and then to target
245243
"""
@@ -271,7 +269,6 @@ def create_reg_workflow(name='registration'):
271269
register.connect(inputnode,'source_files', warpall, 'input_image')
272270
register.connect(merge, 'out', warpall, 'transforms')
273271

274-
275272
"""
276273
Assign all the output files
277274
"""
@@ -379,6 +376,7 @@ def create_fs_reg_workflow(name='registration'):
379376
"""
380377
Apply inverse transform to aparc file
381378
"""
379+
382380
aparcxfm = Node(freesurfer.ApplyVolTransform(inverse=True,
383381
interp='nearest'),
384382
name='aparc_inverse_transform')
@@ -439,7 +437,6 @@ def create_fs_reg_workflow(name='registration'):
439437
register.connect(stripper, 'out_file', reg, 'moving_image')
440438
register.connect(inputnode,'target_image', reg,'fixed_image')
441439

442-
443440
"""
444441
Concatenate the affine and ants transforms into a list
445442
"""
@@ -450,10 +447,10 @@ def create_fs_reg_workflow(name='registration'):
450447
register.connect(convert2itk, 'itk_transform', merge, 'in2')
451448
register.connect(reg, ('composite_transform', pickfirst), merge, 'in1')
452449

453-
454450
"""
455451
Transform the mean image. First to anatomical and then to target
456452
"""
453+
457454
warpmean = Node(ants.ApplyTransforms(), name='warpmean')
458455
warpmean.inputs.input_image_type = 0
459456
warpmean.inputs.interpolation = 'Linear'
@@ -492,7 +489,6 @@ def create_fs_reg_workflow(name='registration'):
492489
register.connect(inputnode,'source_files', warpall, 'input_image')
493490
register.connect(merge, 'out', warpall, 'transforms')
494491

495-
496492
"""
497493
Assign all the output files
498494
"""
@@ -659,6 +655,7 @@ def analyze_openfmri_dataset(data_dir, subject=None, model_id=None,
659655
"""
660656
Return data components as anat, bold and behav
661657
"""
658+
662659
contrast_file = os.path.join(data_dir, 'models', 'model%03d' % model_id,
663660
'task_contrasts.txt')
664661
has_contrast = os.path.exists(contrast_file)

examples/rsfmri_vol_surface_preprocessing_nipy.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -433,6 +433,7 @@ def create_reg_workflow(name='registration'):
433433
"""
434434
Apply inverse transform to take segmentations to functional space
435435
"""
436+
436437
applyxfm = MapNode(freesurfer.ApplyVolTransform(inverse=True,
437438
interp='nearest'),
438439
iterfield=['target_file'],
@@ -445,6 +446,7 @@ def create_reg_workflow(name='registration'):
445446
"""
446447
Apply inverse transform to aparc file
447448
"""
449+
448450
aparcxfm = Node(freesurfer.ApplyVolTransform(inverse=True,
449451
interp='nearest'),
450452
name='aparc_inverse_transform')
@@ -519,6 +521,7 @@ def create_reg_workflow(name='registration'):
519521
"""
520522
Transform the mean image. First to anatomical and then to target
521523
"""
524+
522525
warpmean = Node(ants.ApplyTransforms(), name='warpmean')
523526
warpmean.inputs.input_image_type = 3
524527
warpmean.inputs.interpolation = 'Linear'
@@ -608,6 +611,7 @@ def create_workflow(files,
608611

609612
"""Segment and Register
610613
"""
614+
611615
registration = create_reg_workflow(name='registration')
612616
wf.connect(calc_median, 'median_file', registration, 'inputspec.mean_image')
613617
registration.inputs.inputspec.subject_id = subject_id
@@ -616,6 +620,7 @@ def create_workflow(files,
616620

617621
"""Quantify TSNR in each freesurfer ROI
618622
"""
623+
619624
get_roi_tsnr = MapNode(fs.SegStats(default_color_table=True),
620625
iterfield=['in_file'], name='get_aparc_tsnr')
621626
get_roi_tsnr.inputs.avgwf_txt_file = True
@@ -951,7 +956,6 @@ def get_names(files, suffix):
951956
Creates the full workflow including getting information from dicom files
952957
"""
953958

954-
955959
def create_resting_workflow(args, name=None):
956960
TR = args.TR
957961
slice_times = args.slice_times

0 commit comments

Comments
 (0)