Skip to content

Commit

Permalink
Move reference from iterable to input.
Browse files Browse the repository at this point in the history
  • Loading branch information
FredLoney committed Jul 12, 2017
1 parent 0150699 commit 8d12128
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions qipipe/pipeline/registration.py
Original file line number Diff line number Diff line change
Expand Up @@ -273,22 +273,23 @@ def _create_workflow(self, **opts):
'reference', 'resource']
input_spec = pe.Node(IdentityInterface(fields=input_fields),
name='input_spec')
# The registration mask.
workflow.connect(input_spec, 'mask',
reg_image_wf.workflow, 'input_spec.mask')
# The initial fixed reference image.
input_spec.inputs.reference = self.reference
# The registration resource name.
input_spec.inputs.resource = self.resource
# The registration mask.
workflow.connect(input_spec, 'mask',
reg_image_wf.workflow, 'input_spec.mask')
# The fixed reference image.
workflow.connect(input_spec, 'reference',
reg_image_wf.workflow, 'input_spec.reference')

# The realignment child workflow iterator.
iter_reg_fields = ['in_file', 'reference']
iter_reg_fields = ['in_file']
iter_input = pe.Node(IdentityInterface(fields=iter_reg_fields),
name='iter_input')
name='iter_input')
workflow.connect(iter_input, 'in_file',
reg_image_wf.workflow, 'input_spec.in_file')
workflow.connect(iter_input, 'reference',
reg_image_wf.workflow, 'input_spec.reference')

# Collect the realigned images.
collect_realigned_xfc = IdentityInterface(fields=['realigned_files'])
Expand Down

0 comments on commit 8d12128

Please sign in to comment.