labelImageRegistration: Perform label image registration.

View source: R/labelImageRegistration.R

labelImageRegistrationR Documentation

Perform label image registration.

Description

Perform pairwise registration using fixed and moving sets of label images (and, optionally, sets of corresponding intensity images).

Usage

labelImageRegistration(
  fixedLabelImages,
  movingLabelImages,
  fixedIntensityImages = NULL,
  movingIntensityImages = NULL,
  fixedMask = NULL,
  movingMask = NULL,
  initialTransforms = "affine",
  typeOfLinearTransform = NULL,
  typeOfDeformableTransform = "antsRegistrationSyNQuick[so]",
  labelImageWeighting = 1,
  outputPrefix = "",
  randomSeed = NULL,
  verbose = FALSE
)

Arguments

fixedLabelImages

A single (or set of) fixed label image(s).

movingLabelImages

A single (or set of) moving label image(s).

fixedIntensityImages

Optional—a single (or set of) fixed intensity image(s).

movingIntensityImages

Optional—a single (or set of) moving intensity image(s).

fixedMask

Defines region for similarity metric calculation in the space of the fixed image.

movingMask

Defines region for similarity metric calculation in the space of the moving image.

initialTransforms

If specified, there are two options: 1) Use label images with the centers of mass to a calculate linear transform of type 'identity', 'rigid', 'similarity', 'affine'. 2) Specify a list of transform files, e.g., the output of antsRegistration.

typeOfLinearTransform

Use label images with the centers of mass to a calculate linear transform of type 'identity', 'rigid', 'similarity', 'affine'. Deprecated- subsumed by 'initialTransforms'.

typeOfDeformableTransform

Only works with deformable-only transforms, specifically the family of antsRegistrationSyN*[so] or antsRegistrationSyN*[bo] transforms. See 'typeOfTransform' in antsRegistration. Additionally, one can use a list to pass a more tailored deformable-only transform optimization using SyN or BSplineSyN transforms. The order of parameters in the list would be 1) transform specification, i.e. "SyN" or "BSplineSyN", 2) gradient (real), 3) intensity metric (string), 4) intensity metric parameter (real), 5) convergence iterations per level (vector) 6) smoothing factors per level (tuple), 7) shrink factors per level (vector). An example would typeOfDeformableTransform = list("SyN", 0.2, "CC", 4, c(100,50,10), c(2,1,0), c(4,2,1)).

labelImageWeighting

Float or vector of floats giving the relative weighting for the label images.

outputPrefix

String definining the output prefix for the filenames of the output transform files.

randomSeed

Definition for deformable registration.

verbose

Print progress to the screen.

Value

outputs a list containing:

fwdtransforms:

Transforms to move from moving to fixed image.

invtransforms:

Transforms to move from fixed to moving image.

Output of 1 indicates failure.

Author(s)

Tustison NJ

Examples

## Not run: 
r16 <- antsImageRead( getANTsRData( "r16" ) )
r16Seg1 <- thresholdImage( r16, "Kmeans", 3 ) - 1
r16Seg2 <- thresholdImage( r16, "Kmeans", 5 ) - 1
r64 <- antsImageRead( getANTsRData( "r64" ) )
r64Seg1 <- thresholdImage( r64, "Kmeans", 3 ) - 1
r64Seg2 <- thresholdImage( r64, "Kmeans", 5 ) - 1
reg <- labelImageRegistration( list( r16Seg1, r16Seg2 ),
                                     list( r64Seg1, r64Seg2 ),  
                                     fixedIntensityImages = r16,
                                     movingIntensityImages = r64,
                                     initialTransforms = 'affine',
                                     typeOfDeformableTransform = 'antsRegistrationSyNQuick[bo]',
                                     labelImageWeighting = c( 1.0, 2.0 ),
                                     verbose = TRUE )

## End(Not run)


stnava/ANTsR documentation built on April 13, 2025, 4:10 a.m.