Skip to content

Commit

Permalink
RF: Remove _mat2itk wrapper around C3dAffineTool
Browse files Browse the repository at this point in the history
  • Loading branch information
effigies committed Nov 17, 2023
1 parent d0a9ecb commit 1bb630a
Showing 1 changed file with 0 additions and 24 deletions.
24 changes: 0 additions & 24 deletions niworkflows/interfaces/itk.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,30 +177,6 @@ def _run_interface(self, runtime):
return runtime


def _mat2itk(args):
from nipype.interfaces.c3 import C3dAffineTool
from nipype.utils.filemanip import fname_presuffix

in_file, in_ref, in_src, index, newpath = args
# Generate a temporal file name
out_file = fname_presuffix(in_file, suffix="_itk-%05d.txt" % index, newpath=newpath)

# Run c3d_affine_tool
C3dAffineTool(
transform_file=in_file,
reference_file=in_ref,
source_file=in_src,
fsl2ras=True,
itk_transform=out_file,
resource_monitor=False,
).run()
transform = "#Transform %d\n" % index
with open(out_file) as itkfh:
transform += "".join(itkfh.readlines()[2:])

return (index, transform)


def _applytfms(args):
"""
Applies ANTs' antsApplyTransforms to the input image.
Expand Down

0 comments on commit 1bb630a

Please sign in to comment.