<commit_before>from nipype.interfaces.base import (CommandLineInputSpec, traits, TraitedSpec,
				    File)
from nipype.interfaces.slicer.base import SlicerCommandLine

class C3dAffineToolInputSpec(CommandLineInputSpec):
    reference_file = File(exists=True, argstr="-ref %s", position=1)
    source_file =  File(exists=True, argstr='-src %s', position=2)
    transform_file = File(exists=True, argstr='%s', position=3)
    itk_transform = traits.Either(traits.Bool, File(), hash_files=False, desc="Export ITK transform.", argstr="-oitk %s", position=5)
    fsl2ras = traits.Bool(argstr='-fsl2ras', position=4)


class C3dAffineToolOutputSpec(TraitedSpec):
    itk_transform = File(exists=True)

class C3dAffineTool(SlicerCommandLine):
    """Converts fsl-style Affine registration into ANTS compatible itk format
    """
    input_spec=C3dAffineToolInputSpec
    output_spec=C3dAffineToolOutputSpec

    _cmd = 'c3d_affine_tool'
    _outputs_filenames = {'itk_transform':'itkTransform.txt'}<commit_msg>Renamed default output in accordance with what ANTS will expect.<commit_after>from nipype.interfaces.base import (CommandLineInputSpec, traits, TraitedSpec,
				    File)
from nipype.interfaces.slicer.base import SlicerCommandLine

class C3dAffineToolInputSpec(CommandLineInputSpec):
    reference_file = File(exists=True, argstr="-ref %s", position=1)
    source_file =  File(exists=True, argstr='-src %s', position=2)
    transform_file = File(exists=True, argstr='%s', position=3)
    itk_transform = traits.Either(traits.Bool, File(), hash_files=False, desc="Export ITK transform.", argstr="-oitk %s", position=5)
    fsl2ras = traits.Bool(argstr='-fsl2ras', position=4)


class C3dAffineToolOutputSpec(TraitedSpec):
    itk_transform = File(exists=True)

class C3dAffineTool(SlicerCommandLine):
    """Converts fsl-style Affine registration into ANTS compatible itk format
    """
    input_spec=C3dAffineToolInputSpec
    output_spec=C3dAffineToolOutputSpec

    _cmd = 'c3d_affine_tool'
    _outputs_filenames = {'itk_transform':'affine.txt'}
{'fraction_non_alphanumeric': 0.11251826595226498, 'fraction_numerical': 0.012664393570384803, 'mean_word_length': 5.778877887788779, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1515591', 'n_tokens_mistral': 708, 'n_tokens_neox': 686, 'n_words': 130}