niworkflows.interfaces.itk module

ITK files handling.

class niworkflows.interfaces.itk.MCFLIRT2ITK(from_file=None, resource_monitor=None, **inputs)[source]

Bases: nipype.interfaces.base.core.SimpleInterface

Convert a list of MAT files from MCFLIRT into an ITK Transform file.

Mandatory Inputs
  • in_files (a list of items which are a pathlike object or string representing an existing file) – List of MAT files from MCFLIRT.

  • in_reference (a pathlike object or string representing an existing file) – Input image for spatial reference.

  • in_source (a pathlike object or string representing an existing file) – Input image for spatial source.

Optional Inputs

num_threads (an integer) – Number of parallel processes. (Nipype default value: 1)

Outputs

out_file (a pathlike object or string representing a file) – The output ITKTransform file.

class niworkflows.interfaces.itk.MultiApplyTransforms(from_file=None, resource_monitor=None, **inputs)[source]

Bases: nipype.interfaces.base.core.SimpleInterface

Apply the corresponding list of input transforms.

Mandatory Inputs
  • input_image (a list of items which are a pathlike object or string representing an existing file) – Input time-series as a list of volumes after splitting through the fourth dimension.

  • reference_image (a pathlike object or string representing an existing file) – Reference image space that you wish to warp INTO. Maps to a command-line argument: --reference-image %s.

  • transforms (a list of items which are a pathlike object or string representing an existing file or ‘identity’) – Transform files: will be applied in reverse order. For example, the last specified transform will be applied first. Maps to a command-line argument: %s.

Optional Inputs
  • args (a string) – Additional parameters to the command. Maps to a command-line argument: %s.

  • copy_dtype (a boolean) – Copy dtype from inputs to outputs. (Nipype default value: False)

  • default_value (a float) – Maps to a command-line argument: --default-value %g. (Nipype default value: 0.0)

  • dimension (2 or 3 or 4) – This option forces the image to be treated as a specified-dimensional image. If not specified, antsWarp tries to infer the dimensionality from the input image. Maps to a command-line argument: --dimensionality %d.

  • environ (a dictionary with keys which are a bytes or None or a value of class ‘str’ and with values which are a bytes or None or a value of class ‘str’) – Environment variables. (Nipype default value: {})

  • float (a boolean) – Use float instead of double for computations. Maps to a command-line argument: --float %d. (Nipype default value: False)

  • input_image_type (0 or 1 or 2 or 3) – Option specifying the input image type of scalar (default), vector, tensor, or time series. Maps to a command-line argument: --input-image-type %d.

  • interpolation (‘Linear’ or ‘NearestNeighbor’ or ‘CosineWindowedSinc’ or ‘WelchWindowedSinc’ or ‘HammingWindowedSinc’ or ‘LanczosWindowedSinc’ or ‘MultiLabel’ or ‘Gaussian’ or ‘BSpline’) – Maps to a command-line argument: %s. (Nipype default value: Linear)

  • interpolation_parameters (a tuple of the form: (an integer) or a tuple of the form: (a float, a float))

  • invert_transform_flags (a list of items which are a boolean)

  • num_threads (an integer) – Number of parallel processes. (Nipype default value: 1)

  • out_postfix (a string) – Postfix that is appended to all output files (default = _trans). (Nipype default value: _trans)

  • output_image (a string) – Output file name. Maps to a command-line argument: --output %s.

  • print_out_composite_warp_file (a boolean) – Output a composite warp file instead of a transformed image. Requires inputs: output_image.

  • save_cmd (a boolean) – Write a log of command lines that were applied. (Nipype default value: True)

Outputs
  • log_cmdline (a pathlike object or string representing a file) – A list of command lines used to apply transforms.

  • out_files (a list of items which are a pathlike object or string representing a file) – The output ITKTransform file.