xcp_d.interfaces.ants.CompositeInvTransformUtil
- class xcp_d.interfaces.ants.CompositeInvTransformUtil(**inputs)[source]
Wrapped executable:
CompositeTransformUtil
.Wrapper for the ANTS CompositeTransformUtil command.
ANTs utility which can combine or break apart transform files into their individual constituent components.
Examples
>>> from nipype.interfaces.ants import CompositeInvTransformUtil >>> tran = CompositeInvTransformUtil() >>> tran.inputs.process = 'disassemble' >>> tran.inputs.in_file = 'output_Composite.h5' >>> tran.cmdline 'CompositeTransformUtil --disassemble output_Composite.h5 transform' >>> tran.run() example for assembling transformation files >>> from nipype.interfaces.ants import CompositeInvTransformUtil >>> tran = CompositeInvTransformUtil() >>> tran.inputs.process = 'assemble' >>> tran.inputs.out_file = 'my.h5' >>> tran.inputs.in_file = ['AffineTransform.mat', 'DisplacementFieldTransform.nii.gz'] >>> tran.cmdline 'CompositeTransformUtil --assemble my.h5 AffineTransform.mat DisplacementFieldTransform.nii.gz ' >>> tran.run()
- Mandatory Inputs:
in_file (a list of items which are a pathlike object or string representing an existing file) – Input transform file(s). Maps to a command-line argument:
%s...
(position: 3).- Optional Inputs:
args (a string) – Additional parameters to the command. Maps to a command-line argument:
%s
.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:
{}
)num_threads (an integer) – Number of ITK threads to use. (Nipype default value:
1
)out_file (a pathlike object or string representing a file) – Output file path (only used for disassembly). Maps to a command-line argument:
%s
(position: 2).output_prefix (a string) – A prefix that is prepended to all output files (only used for assembly). Maps to a command-line argument:
%s
(position: 4). (Nipype default value:transform
)process (‘assemble’ or ‘disassemble’) – What to do with the transform inputs (assemble or disassemble). Maps to a command-line argument:
--%s
(position: 1). (Nipype default value:assemble
)
- Outputs:
affine_transform (a pathlike object or string representing a file) – Affine transform component.
displacement_field (a pathlike object or string representing a file) – Displacement field component.
out_file (a pathlike object or string representing a file) – Compound transformation file.
Methods
__init__
(**inputs)Subclasses must implement __init__
aggregate_outputs
([runtime, needed_outputs])Collate expected outputs and apply output traits validation.
help
([returnhelp])Prints class help
load_inputs_from_json
(json_file[, overwrite])A convenient way to load pre-set inputs from a JSON file.
raise_exception
(runtime)run
([cwd, ignore_exception])Execute this interface.
save_inputs_to_json
(json_file)A convenient way to save current inputs to a JSON file.
set_default_num_threads
(num_threads)Set the default number of threads for ITK calls
set_default_terminal_output
(output_type)Set the default terminal output for CommandLine Interfaces.
version_from_command
([flag, cmd])Attributes
always_run
Should the interface be always run even if the inputs were not changed? Only applies to interfaces being run within a workflow context.
can_resume
Defines if the interface can reuse partial results after interruption.
cmd
sets base command, immutable
cmdline
command plus any arguments (args) validates arguments and generates command line
resource_monitor
terminal_output
version
interfaces should implement a version property
write_cmdline