Skip to content

Commit

Permalink
Include the fixed image in the 4D time series.
Browse files Browse the repository at this point in the history
  • Loading branch information
FredLoney committed Jul 13, 2017
1 parent 09e16a4 commit 094a4b4
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions qipipe/pipeline/registration.py
Original file line number Diff line number Diff line change
Expand Up @@ -300,13 +300,6 @@ def _create_workflow(self, **opts):
workflow.connect(reg_image_wf.workflow, 'output_spec.out_file',
collect_realigned, 'realigned_files')

# Merge the registered images into a 4D time series.
reg_ts_name = self.resource + '_ts'
merge_xfc = MergeNifti(out_format=reg_ts_name)
merge = pe.Node(merge_xfc, name='merge_volumes')
workflow.connect(collect_realigned, 'realigned_files',
merge, 'in_files')

# Make the profile.
cr_prf_fields = ['technique', 'configuration', 'sections',
'reference', 'resource']
Expand Down Expand Up @@ -338,6 +331,12 @@ def _create_workflow(self, **opts):
workflow.connect(collect_realigned, 'realigned_files',
collect_volumes, 'in2')

# Merge the fixed and realigned images into a 4D time series.
reg_ts_name = self.resource + '_ts'
merge_xfc = MergeNifti(out_format=reg_ts_name)
merge = pe.Node(merge_xfc, name='merge_volumes')
workflow.connect(collect_volumes, 'out', merge, 'in_files')

# Collect the profile, volumes and time series into one list.
collect_uploads = pe.Node(Merge(3), name='collect_uploads')
workflow.connect(collect_volumes, 'out', collect_uploads, 'in1')
Expand Down

0 comments on commit 094a4b4

Please sign in to comment.