Skip to content

FIX: DTITK nonlinear workflow origin reslicing #2561

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
May 24, 2018
Prev Previous commit
Next Next commit
moved origins to zero prior to any reslicing (this avoids a problem p…
…resent in some images where the volume gets truncated upon reslicing)
  • Loading branch information
kesshijordan committed Apr 29, 2018
commit 5407f0a2dbf35beff8d694bf8e416a4cb40cb3da
10 changes: 7 additions & 3 deletions nipype/workflows/dmri/dtitk/tensor_registration.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,9 @@ def diffeomorphic_tensor_pipeline(name='DiffeoTen',
fields=['out_file', 'out_file_xfm',
'fixed_resliced', 'moving_resliced']),
name='outputnode')

origin_node_fixed = pe.Node(dtitk.TVAdjustVoxSp(origin=(0, 0, 0)),
name='origin_node_fixed')
origin_node_moving = origin_node_fixed.clone(name='origin_node_moving')
reslice_node_pow2 = pe.Node(dtitk.TVResample(
origin=(0, 0, 0),
array_size=params['array_size']),
Expand All @@ -96,10 +98,12 @@ def diffeomorphic_tensor_pipeline(name='DiffeoTen',
wf = pe.Workflow(name=name)

# Reslice input images
wf.connect(inputnode, 'fixed_file', reslice_node_pow2, 'in_file')
wf.connect(inputnode, 'fixed_file', origin_node_fixed, 'in_file')
wf.connect(origin_node_fixed, 'out_file', reslice_node_pow2, 'in_file')
wf.connect(reslice_node_pow2, 'out_file',
reslice_node_moving, 'target_file')
wf.connect(inputnode, 'moving_file', reslice_node_moving, 'in_file')
wf.connect(inputnode, 'moving_file', origin_node_moving, 'in_file')
wf.connect(origin_node_moving, 'out_file', reslice_node_moving, 'in_file')
# Rigid registration
wf.connect(reslice_node_pow2, 'out_file', rigid_node, 'fixed_file')
wf.connect(reslice_node_moving, 'out_file', rigid_node, 'moving_file')
Expand Down