class_docstr: Interface for executable reg_transform from NiftyReg platform.
  
  Tools to convert transformation parametrisation from one type to another
  as well as to compose, inverse or half transformations.
  
  `Source code <https://cmiclab.cs.ucl.ac.uk/mmodat/niftyreg>`_
  
  Examples
  --------
  >>> from nipype.interfaces import niftyreg
  >>> node = niftyreg.RegTransform()
  >>> node.inputs.def_input = 'warpfield.nii'
  >>> node.inputs.omp_core_val = 4
  >>> node.cmdline  # doctest: +ELLIPSIS
  'reg_transform -omp 4 -def warpfield.nii .../warpfield_trans.nii.gz'
class_docstr_tok: ["Interface","for","executable","reg_transform","from","NiftyReg","platform",".","Tools","to","convert","transformation","parametrisation","from","one","type","to","another","as","well","as","to","compose",",","inverse","or","half","transformations",".","`","Source","code","<","https",":","\/\/cmiclab.cs.ucl.ac.uk\/mmodat\/niftyreg",">","`","_","Examples","--","--","--","--",">",">",">","from","nipype.interfaces","import","niftyreg",">",">",">","node","=","niftyreg.RegTransform","(",")",">",">",">","node.inputs.def_input","=","'warpfield.nii'",">",">",">","node.inputs.omp_core_val","=","4",">",">",">","node.cmdline","#","doctest",":","+ELLIPSIS","'reg_transform","-omp","4","-def","warpfield.nii","...","\/warpfield_trans.nii.gz","'"]
code: def _gen_filename(self, name):
      if name == "out_file":
          if isdefined(self.inputs.make_aff_input):
              return self._gen_fname(
                  "matrix", suffix=self._suffix, ext=".txt"
              )
  
          if isdefined(self.inputs.comp_input) and isdefined(
              self.inputs.comp_input2
          ):
              _, bn1, ext1 = split_filename(self.inputs.comp_input)
              _, _, ext2 = split_filename(self.inputs.comp_input2)
              if ext1 in [
                  ".nii",
                  ".nii.gz",
                  ".hdr",
                  ".img",
                  ".img.gz",
              ] or ext2 in [
                  ".nii",
                  ".nii.gz",
                  ".hdr",
                  ".img",
                  ".img.gz",
              ]:
                  return self._gen_fname(
                      bn1, suffix=self._suffix, ext=".nii.gz"
                  )
              else:
                  return self._gen_fname(
                      bn1, suffix=self._suffix, ext=ext1
                  )
  
          if isdefined(self.inputs.flirt_2_nr_input):
              return self._gen_fname(
                  self.inputs.flirt_2_nr_input[0],
                  suffix=self._suffix,
                  ext=".txt",
              )
  
          input_to_use = self._find_input()
          _, _, ext = split_filename(input_to_use)
          if ext not in [".nii", ".nii.gz", ".hdr", ".img", ".img.gz"]:
              return self._gen_fname(
                  input_to_use, suffix=self._suffix, ext=ext
              )
          else:
              return self._gen_fname(
                  input_to_use, suffix=self._suffix, ext=".nii.gz"
              )
  
      return None
  
imports: import os
  from ..base import TraitedSpec, File, traits, isdefined
  from .base import get_custom_path, NiftyRegCommand, NiftyRegCommandInputSpec
  from ...utils.filemanip import split_filename
label_desc: Use image node_id 2 for calling the RegTransform obj's underlying member method code with example usage: obj._gen_filename(name) and returns: None, self, self, self, self, self, self