35
35
)
36
36
37
37
from nibabies import config
38
+ from nibabies .interfaces import DerivativesDataSink
38
39
from nibabies .workflows .anatomical .brain_extraction import init_infant_brain_extraction_wf
39
40
from nibabies .workflows .anatomical .outputs import init_anat_reports_wf
40
41
from nibabies .workflows .anatomical .preproc import init_anat_preproc_wf , init_csf_norm_wf
@@ -741,36 +742,31 @@ def init_infant_anat_fit_wf(
741
742
probmap = probmap ,
742
743
)
743
744
744
- # TODO: Currently the XFMs are transform0GenericAffine.mat, transform1Warp.nii.gz
745
- # The coregistration should be changed to instead save
746
- # 'composite_transform' and 'inverse_composite_transform'
747
- # from antsRegistration (single h5 files)
748
- #
749
- # ds_t1w2t2w_xfm = pe.Node(
750
- # DerivativesDataSink(
751
- # base_directory=output_dir,
752
- # to='T2w',
753
- # mode='image',
754
- # suffix='xfm',
755
- # dismiss_entites=('desc', 'echo'),
756
- # **{'from': 'T1w'}
757
- # ),
758
- # name='ds_t1w2t2w_xfm',
759
- # run_without_submitting=True,
760
- # )
761
-
762
- # ds_t2w2t1w_xfm = pe.Node(
763
- # DerivativesDataSink(
764
- # base_directory=output_dir,
765
- # to='T1w',
766
- # mode='image',
767
- # suffix='xfm',
768
- # dismiss_entites=('desc', 'echo'),
769
- # **{'from': 'T2w'}
770
- # ),
771
- # name='ds_t2w2t1w_xfm',
772
- # run_without_submitting=True,
773
- # )
745
+ ds_t1w2t2w_xfm = pe .Node (
746
+ DerivativesDataSink (
747
+ base_directory = output_dir ,
748
+ to = 'T2w' ,
749
+ mode = 'image' ,
750
+ suffix = 'xfm' ,
751
+ dismiss_entites = ('desc' , 'echo' ),
752
+ ** {'from' : 'T1w' },
753
+ ),
754
+ name = 'ds_t1w2t2w_xfm' ,
755
+ run_without_submitting = True ,
756
+ )
757
+
758
+ ds_t2w2t1w_xfm = pe .Node (
759
+ DerivativesDataSink (
760
+ base_directory = output_dir ,
761
+ to = 'T1w' ,
762
+ mode = 'image' ,
763
+ suffix = 'xfm' ,
764
+ dismiss_entites = ('desc' , 'echo' ),
765
+ ** {'from' : 'T2w' },
766
+ ),
767
+ name = 'ds_t2w2t1w_xfm' ,
768
+ run_without_submitting = True ,
769
+ )
774
770
775
771
workflow .connect ([
776
772
(t1w_validate , coregistration_wf , [
@@ -780,18 +776,18 @@ def init_infant_anat_fit_wf(
780
776
('t2w_preproc' , 'inputnode.in_t2w' ),
781
777
('t2w_mask' , 'inputnode.in_mask' ),
782
778
]),
783
- # (coregistration_wf, ds_t1w2t2w_xfm, [
784
- # ('outputnode.t1w2t2w_xfm', 'in_file'),
785
- # ]),
786
- # (sourcefile_buffer, ds_t1w2t2w_xfm, [
787
- # ('t1w_source_files', 'source_file'),
788
- # ]),
789
- # (coregistration_wf, ds_t2w2t1w_xfm, [
790
- # ('outputnode.t2w2t1w_xfm', 'in_file'),
791
- # ]),
792
- # (sourcefile_buffer, ds_t2w2t1w_xfm, [
793
- # ('t2w_source_files', 'source_file'),
794
- # ]),
779
+ (coregistration_wf , ds_t1w2t2w_xfm , [
780
+ ('outputnode.t1w2t2w_xfm' , 'in_file' ),
781
+ ]),
782
+ (sourcefile_buffer , ds_t1w2t2w_xfm , [
783
+ ('t1w_source_files' , 'source_file' ),
784
+ ]),
785
+ (coregistration_wf , ds_t2w2t1w_xfm , [
786
+ ('outputnode.t2w2t1w_xfm' , 'in_file' ),
787
+ ]),
788
+ (sourcefile_buffer , ds_t2w2t1w_xfm , [
789
+ ('t2w_source_files' , 'source_file' ),
790
+ ]),
795
791
(coregistration_wf , coreg_buffer , [
796
792
('outputnode.t1w2t2w_xfm' , 't1w2t2w_xfm' ),
797
793
('outputnode.t2w2t1w_xfm' , 't2w2t1w_xfm' ),
0 commit comments