Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Taylor Salo <[email protected]>
  • Loading branch information
mgxd and tsalo authored Jan 22, 2025
1 parent d155295 commit 29c87b6
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion nibabies/workflows/anatomical/registration.py
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,7 @@ def init_concat_registrations_wf(
'template', # template identifier (name[+cohort])
'intermediate', # intermediate space (name[+cohort])
'anat2int_xfm', # anatomical -> intermediate
'int2anat_xfm', # std -> intermediate
'int2anat_xfm', # intermediate -> anatomical
]
),
name='inputnode',
Expand Down Expand Up @@ -537,6 +537,22 @@ def _load_intermediate_xfms(intermediate, std):


def _create_inverse_composite(in_file, out_file='inverse_composite.h5'):
"""Build a composite transform with SimpleITK.

This serves as a workaround for a bug in ANTs's CompositeTransformUtil
where composite transforms cannot be created with a displacement field placed first.

Parameters
----------
in_file : list of str
List of input transforms to concatenate into a composite transform.
out_file : str, optional
File to write the composite transform to.

Returns
-------
out_file : str
Absolute path to the composite transform.
from pathlib import Path

import SimpleITK as sitk
Expand Down

0 comments on commit 29c87b6

Please sign in to comment.