registration: Registration Wrapper function

Description Usage Arguments Value

View source: R/ants_regwrite2.R

Description

This function performs registration using ANTsR, carries out the transformation on other images, and can back-transform image in registered space to the native space of the original image. Returns the transforms

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
registration(
  filename,
  skull_strip = FALSE,
  correct = FALSE,
  correction = "N4",
  retimg = TRUE,
  outfile = NULL,
  template.file = file.path(fsldir(), "data", "standard", "MNI152_T1_1mm_brain.nii.gz"),
  interpolator = "Linear",
  other_interpolator = interpolator,
  other.files = NULL,
  other.outfiles = NULL,
  other.init = NULL,
  invert_interpolator = interpolator,
  invert.native.fname = NULL,
  invert.file = NULL,
  typeofTransform = "SyN",
  remove.warp = FALSE,
  outprefix = NULL,
  bet.opts = "-B -f 0.1 -v",
  betcmd = "bet",
  copy_origin = TRUE,
  verbose = TRUE,
  reproducible = TRUE,
  seed = 1,
  force_registration = TRUE,
  ...
)

Arguments

filename

filename of image to be registered

skull_strip

do skull stripping with FSL BET

correct

do bias correction on the filename

correction

N3 or N4 correction, see bias_correct

retimg

return a nifti object from function

outfile

output filename should have .nii or .nii.gz extension

template.file

Filename of image to warp to

interpolator

interpolation done for antsApplyTransforms

other_interpolator

interpolation done for antsApplyTransforms for other.files

other.files

Filenames of other iamges to be transformed with the T1

other.outfiles

Output filenames of other.files to be written

other.init

Initial transformation lists (same length as other.files) to use in before the estimated transformation for one interpolation

invert_interpolator

interpolation done for antsApplyTransforms for invert.file

invert.native.fname

filename of output native file, must have same length as invert.file or be NULL.

invert.file

Filename of image to invert to native space

typeofTransform

type of transformed used, passed to antsRegistration

remove.warp

(logical) Should warping images be deleted?

outprefix

Character path of where the warp files should be stored. Required if remove.warp = FALSE

bet.opts

Options passed to fslbet

betcmd

BET command used, passed to fslbet

copy_origin

Copy image origin from t1, using antsCopyOrigin

verbose

Print diagnostic messages

reproducible

Sets the seed and Sys.setenv(ITK_GLOBAL_DEFAULT_NUMBER_OF_THREADS = 1). See https://github.com/ANTsX/ANTs/wiki/antsRegistration-reproducibility-issues for discussion.

seed

will execute Sys.setenv(ANTS_RANDOM_SEED = seed) before running to attempt a more reproducible result. If NULL, will not set anything, but reproducible must be FALSE.

force_registration

If TRUE, then registration will be run even if transforms exist.

...

arguments to antsRegistration

Value

List of the output filenames and transformations


neuroconductor/extrantsr documentation built on Sept. 28, 2020, 11:31 a.m.