|
33 | 33 | )
|
34 | 34 |
|
35 | 35 | from nipype.interfaces.ants.base import Info as ANTsInfo
|
36 |
| -from nipype.interfaces.ants import N4BiasFieldCorrection |
| 36 | +from nipype.interfaces.ants import DenoiseImage, N4BiasFieldCorrection |
37 | 37 |
|
38 | 38 | from niworkflows.engine.workflows import LiterateWorkflow as Workflow
|
39 | 39 | from niworkflows.interfaces.fixes import FixHeaderApplyTransforms as ApplyTransforms
|
@@ -730,19 +730,28 @@ def init_anat_template_wf(
|
730 | 730 | name="outputnode",
|
731 | 731 | )
|
732 | 732 |
|
733 |
| - # 0. Reorient T1w image(s) to RAS and resample to common voxel space |
| 733 | + # 0. Denoise and reorient T1w image(s) to RAS and resample to common voxel space |
734 | 734 | anat_ref_dimensions = pe.Node(TemplateDimensions(), name="anat_ref_dimensions")
|
| 735 | + denoise = pe.MapNode( |
| 736 | + DenoiseImage(noise_model="Rician", num_threads=omp_nthreads), |
| 737 | + iterfield="input_image", |
| 738 | + name="denoise", |
| 739 | + ) |
735 | 740 | anat_conform = pe.MapNode(Conform(), iterfield="in_file", name="anat_conform")
|
736 | 741 |
|
737 | 742 | # fmt:off
|
738 | 743 | workflow.connect([
|
739 | 744 | (inputnode, anat_ref_dimensions, [('anat_files', 't1w_list')]),
|
| 745 | + (anat_ref_dimensions, denoise, [('t1w_valid_list', 'input_image')]), |
740 | 746 | (anat_ref_dimensions, anat_conform, [
|
741 |
| - ('t1w_valid_list', 'in_file'), |
742 | 747 | ('target_zooms', 'target_zooms'),
|
743 |
| - ('target_shape', 'target_shape')]), |
744 |
| - (anat_ref_dimensions, outputnode, [('out_report', 'out_report'), |
745 |
| - ('t1w_valid_list', 'anat_valid_list')]), |
| 748 | + ('target_shape', 'target_shape'), |
| 749 | + ]), |
| 750 | + (denoise, anat_conform, [('output_image', 'in_file')]), |
| 751 | + (anat_ref_dimensions, outputnode, [ |
| 752 | + ('out_report', 'out_report'), |
| 753 | + ('t1w_valid_list', 'anat_valid_list'), |
| 754 | + ]), |
746 | 755 | ])
|
747 | 756 | # fmt:on
|
748 | 757 |
|
|
0 commit comments