|
141 | 141 | # import neuroimaging packages
|
142 | 142 | import nilearn.image as nl_img
|
143 | 143 | import nilearn.masking as nl_mask
|
144 |
| -import nibabel as nib |
145 | 144 |
|
146 | 145 | # Start tracking execution time
|
147 | 146 | start_time = time.time()
|
@@ -357,7 +356,7 @@ def fmripop_remove_confounds(args):
|
357 | 356 | *xyz, time_frames = temp_img.shape
|
358 | 357 | data = np.zeros(temp_img.shape, dtype=this_dtype)
|
359 | 358 |
|
360 |
| - if args.add_mean_img: |
| 359 | + if args.add_orig_mean_img: |
361 | 360 | # Compute the mean of the images (in the time dimension of 4th dimension)
|
362 | 361 | orig_mean_img = nl_img.mean_img(args.niipath)
|
363 | 362 | # Smooth mean image
|
@@ -504,7 +503,7 @@ def fmripop_check_args(args):
|
504 | 503 | Checks input arguments and sets other dependent arguments accrodingly
|
505 | 504 | """
|
506 | 505 |
|
507 |
| - # Check if we want to regress framwise displacement |
| 506 | + # Check if we want to regress framwise displacement or not |
508 | 507 | if args.fmw_disp_th is not None:
|
509 | 508 | # Add it to the default confound list
|
510 | 509 | args.confound_list.append(fd_label)
|
@@ -550,7 +549,6 @@ def fmripop_visual_debug(path_to_file, args):
|
550 | 549 | # Extract time series from seed regions
|
551 | 550 | time_series = masker.fit_transform(path_to_file)
|
552 | 551 |
|
553 |
| - |
554 | 552 | import matplotlib.pyplot as plt
|
555 | 553 |
|
556 | 554 | for this_time_series, this_label in zip(time_series.T, dmn_labels):
|
@@ -583,8 +581,8 @@ def fmripop_visual_debug(path_to_file, args):
|
583 | 581 | if args.scrubbing:
|
584 | 582 | out_img = fmripop_scrub_data(out_img, args, params_dict)
|
585 | 583 |
|
586 |
| - #if np.array(args.fwhm).sum() > 0.0: # If fwhm is not zero, performs smoothing |
587 |
| - # out_img = fmripop_smooth_data(out_img, args.fwhm) # NOTE: This here is a hack because this version (0.5.0)of nilearn does not really support a ndarray for fwhm |
| 584 | + if np.array(args.fwhm).sum() > 0.0: # If fwhm is not zero, performs smoothing |
| 585 | + out_img = fmripop_smooth_data(out_img, args.fwhm) |
588 | 586 |
|
589 | 587 | # Save output image and parameters used in this script
|
590 | 588 | params_dict = fmripop_save_imgdata(args, out_img, params_dict, output_tag=args.scrub_tag)
|
|
0 commit comments