Use FSL fnirtfileutils <http://fsl.fmrib.ox.ac.uk/fsl/fsl-4.1.9/fnirt/warp_utils.html>_
Usage
ni_fsl_warp_utils(
in_file,
reference,
write_jacobian,
args = NULL,
knot_space = NULL,
out_file = NULL,
out_format = NULL,
out_jacobian = NULL,
warp_resolution = NULL,
with_affine = NULL,
.cwd = NULL,
.env = NULL,
.engine = NULL,
.profile = NULL,
dry_run = FALSE,
echo = interactive()
)Arguments
- in_file
Character; file path. Name of file containing warp-coefficients/fields. This would typically be the output from the –cout switch of fnirt (but can also use fields, like the output from –fout). Required.
- reference
Character; file path. Name of a file in target space. Note that the target space is now different from the target space that was used to create the –warp file. It would typically be the file that was specified with the –in argument when running fnirt. Required.
- write_jacobian
Logical. Switch on –jac flag with automatically generated filename Required.
- args
Character. Additional parameters to the command
- knot_space
Character or numeric vector. Alternative (to –warpres) specification of the resolution of the output spline-field.
- out_file
Character; file path. Name of output file. The format of the output depends on what other parameters are set. The default format is a (4D) field-file. If the –outformat is set to spline the format will be a (4D) file of spline coefficients.
- out_format
Character; one of: "spline", "field". Specifies the output format. If set to field (default) the output will be a (4D) field-file. If set to spline the format will be a (4D) file of spline coefficients.
- out_jacobian
Character; file path. Specifies that a (3D) file of Jacobian determinants corresponding to –in should be produced and written to filename.
- warp_resolution
Character or numeric vector. Specifies the resolution/knot-spacing of the splines pertaining to the coefficients in the –out file. This parameter is only relevant if –outformat is set to spline. It should be noted that if the –in file has a higher resolution, the resulting coefficients will pertain to the closest (in a least-squares sense) file in the space of fields with the –warpres resolution. It should also be noted that the resolution will always be an integer multiple of the voxel size.
- with_affine
Logical. Specifies that the affine transform (i.e. that which was specified for the –aff parameter in fnirt) should be included as displacements in the –out file. That can be useful for interfacing with software that cannot decode FSL/fnirt coefficient-files (where the affine transform is stored separately from the displacements).
- .cwd
Working directory override.
- .env
Named character vector of environment variables.
- .engine
Execution engine override.
- .profile
Runtime profile override.
- dry_run
Logical; preview command without executing.
- echo
Logical; echo stdout/stderr in real time.