Program to align one dataset (the 'source') to a base dataset
Usage
ni_afni_allineate(
in_file,
allcostx = NULL,
args = NULL,
autobox = NULL,
automask = NULL,
autoweight = NULL,
center_of_mass = NULL,
check = NULL,
convergence = NULL,
cost = NULL,
epi = NULL,
final_interpolation = NULL,
fine_blur = NULL,
in_matrix = NULL,
in_param_file = NULL,
interpolation = NULL,
master = NULL,
maxrot = NULL,
maxscl = NULL,
maxshf = NULL,
maxshr = NULL,
newgrid = NULL,
nmatch = NULL,
no_pad = NULL,
nomask = NULL,
nwarp = NULL,
nwarp_fixdep = NULL,
nwarp_fixmot = NULL,
one_pass = NULL,
out_file = NULL,
out_matrix = NULL,
out_param_file = NULL,
out_weight_file = NULL,
overwrite = NULL,
quiet = NULL,
reference = NULL,
replacebase = NULL,
replacemeth = NULL,
source_automask = NULL,
source_mask = NULL,
two_best = NULL,
two_blur = NULL,
two_first = NULL,
two_pass = NULL,
usetemp = NULL,
verbose = NULL,
warp_type = NULL,
warpfreeze = NULL,
weight = NULL,
weight_file = NULL,
zclip = NULL,
.cwd = NULL,
.env = NULL,
.engine = NULL,
.profile = NULL,
dry_run = FALSE,
echo = interactive()
)Arguments
- in_file
Character; file path. input file to 3dAllineate Required.
- allcostx
Character; file path. Compute and print ALL available cost functionals for the un-warped inputsAND THEN QUIT. If you use this option none of the other expected outputs will be produced
- args
Character. Additional parameters to the command
- autobox
Logical. Expand the -automask function to enclose a rectangular box that holds the irregular mask.
- automask
Integer. Compute a mask function, set a value for dilation or 0.
- autoweight
Character. Compute a weight function using the 3dAutomask algorithm plus some blurring of the base image.
- center_of_mass
Character. Use the center-of-mass calculation to bracket the shifts.
- check
Character or numeric vector. After cost functional optimization is done, start at the final parameters and RE-optimize using this new cost functions. If the results are too different, a warning message will be printed. However, the final parameters from the original optimization will be used to create the output dataset.
- convergence
Numeric. Convergence test in millimeters (default 0.05mm).
- cost
Character; one of: "leastsq", "ls", "mutualinfo", "mi", "corratio_mul", "crM", "norm_mutualinfo", "nmi", "hellinger", "hel", "corratio_add", "crA", "corratio_uns", "crU". Defines the 'cost' function that defines the matching between the source and the base
- epi
Logical. Treat the source dataset as being composed of warped EPI slices, and the base as comprising anatomically 'true' images. Only phase-encoding direction image shearing and scaling will be allowed with this option.
- final_interpolation
Character; one of: "nearestneighbour", "linear", "cubic", "quintic", "wsinc5". Defines interpolation method used to create the output dataset
- fine_blur
Numeric. Set the blurring radius to use in the fine resolution pass to 'x' mm. A small amount (1-2 mm?) of blurring at the fine step may help with convergence, if there is some problem, especially if the base volume is very noisy. [Default == 0 mm = no blurring at the final alignment pass]
- in_matrix
Character; file path. matrix to align input file
- in_param_file
Character; file path. Read warp parameters from file and apply them to the source dataset, and produce a new dataset
- interpolation
Character; one of: "nearestneighbour", "linear", "cubic", "quintic". Defines interpolation method to use during matching
- master
Character; file path. Write the output dataset on the same grid as this file.
- maxrot
Numeric. Maximum allowed rotation in degrees.
- maxscl
Numeric. Maximum allowed scaling factor.
- maxshf
Numeric. Maximum allowed shift in mm.
- maxshr
Numeric. Maximum allowed shearing factor.
- newgrid
Numeric. Write the output dataset using isotropic grid spacing in mm.
- nmatch
Integer. Use at most n scattered points to match the datasets.
- no_pad
Logical. Do not use zero-padding on the base image.
- nomask
Logical. Don't compute the autoweight/mask; if -weight is not also used, then every voxel will be counted equally.
- nwarp
Character; one of: "bilinear", "cubic", "quintic", "heptic", "nonic", "poly3", "poly5", "poly7", "poly9". Experimental nonlinear warping: bilinear or legendre poly.
- nwarp_fixdep
Character or numeric vector. To fix non-linear warp dependency along directions.
- nwarp_fixmot
Character or numeric vector. To fix motion along directions.
- one_pass
Logical. Use only the refining pass – do not try a coarse resolution pass first. Useful if you know that only small amounts of image alignment are needed.
- out_file
Character; file path. output file from 3dAllineate
- out_matrix
Character; file path. Save the transformation matrix for each volume.
- out_param_file
Character; file path. Save the warp parameters in ASCII (.1D) format.
- out_weight_file
Character; file path. Write the weight volume to disk as a dataset
- overwrite
Logical. overwrite output file if it already exists
- quiet
Logical. Don't print out verbose progress reports.
- reference
Character; file path. file to be used as reference, the first volume will be used if not given the reference will be the first volume of in_file.
- replacebase
Logical. If the source has more than one volume, then after the first volume is aligned to the base.
- replacemeth
Character; one of: "leastsq", "ls", "mutualinfo", "mi", "corratio_mul", "crM", "norm_mutualinfo", "nmi", "hellinger", "hel", "corratio_add", "crA", "corratio_uns", "crU". After first volume is aligned, switch method for later volumes. For use with '-replacebase'.
- source_automask
Integer. Automatically mask the source dataset with dilation or 0.
- source_mask
Character; file path. mask the input dataset
- two_best
Integer. In the coarse pass, use the best 'bb' set of initialpoints to search for the starting point for the finepass. If bb==0, then no search is made for the beststarting point, and the identity transformation isused as the starting point. [Default=5; min=0 max=11]
- two_blur
Numeric. Set the blurring radius for the first pass in mm.
- two_first
Logical. Use -twopass on the first image to be registered, and then on all subsequent images from the source dataset, use results from the first image's coarse pass to start the fine pass.
- two_pass
Logical. Use a two pass alignment strategy for all volumes, searching for a large rotation+shift and then refining the alignment.
- usetemp
Logical. temporary file use
- verbose
Logical. Print out verbose progress reports.
- warp_type
Character; one of: "shift_only", "shift_rotate", "shift_rotate_scale", "affine_general". Set the warp type.
- warpfreeze
Logical. Freeze the non-rigid body parameters after first volume.
- weight
Character or numeric vector. Set the weighting for each voxel in the base dataset; larger weights mean that voxel count more in the cost function. If an image file is given, the volume must be defined on the same grid as the base dataset
- weight_file
Character; file path. Set the weighting for each voxel in the base dataset; larger weights mean that voxel count more in the cost function. Must be defined on the same grid as the base dataset
- zclip
Logical. Replace negative values in the input datasets (source & base) with zero.
- .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.