feat: Add N4 parameters to init_syn_preprocessing_wf #503
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
These are changes that are patched in to the epi_reference_wf in SyN-SDC in https://github.com/nipreps/fmriprep-rodents/pull/55/files.
The expected diff would be:
syn_preprocessing_wf = init_syn_preprocessing_wf( omp_nthreads=config.nipype.omp_nthreads, debug=config.execution.debug is True, auto_bold_nss=True, t1w_inversion=False, + n4_iterations=[50] * 4, + n4_shrink_factor=1, + calculate_n4_spline_grid=True, name=f"syn_preprocessing_{estimator.bids_id}", ) syn_preprocessing_wf.inputs.inputnode.in_epis = sources syn_preprocessing_wf.inputs.inputnode.in_meta = source_meta - - # The default N4 shrink factor (4) appears to artificially blur values across - # anisotropic voxels. Shrink factors are intended to speed up calculation - # but in most cases, the extra calculation time appears to be minimal. - syn_preprocessing_wf.inputs.epi_reference_wf.n4_avgs.shrink_factor = 1 - # Similarly, the use of an asymmetric bspline grid improves performance - # in anisotropic voxels, so set INU bspline grid based on voxel size - syn_preprocessing_wf.inputs.epi_reference_wf.n4_avgs.args = _bspline_grid(sources[0]) - # The number of N4 iterations are also reduced. - syn_preprocessing_wf.inputs.epi_reference_wf.n4_avgs.n_iterations = [50] * 4cc @eilidhmacnicol