Iteratively estimate a population shape and intensity average image. This can be computationally intensive and currently is not parallelized. Perhaps better to use official antsMultivariateTemplateConstruction* in ANTs. However, this code can be useful for smaller problems/populations.

buildTemplate(initialTemplate, imgList, typeofTransform, iterations = 3,
  gradientStep = 0.25, segList, verbose = TRUE, ...)

Arguments

initialTemplate

fixed image to which we register the population.

imgList

moving image list from which template will be built.

typeofTransform

A linear or non-linear registration type. Mutual information metric by default. See antsRegistration.

iterations

should be greater than 1 less than 10.

gradientStep

speed of template shape update step, less than 1.

segList

segmentations for each target image, this will trigger a joint label fusion call for each iteration and use masks during registration.

verbose

print diagnostic messages, passed to antsRegistration

...

Additional options to pass to antsRegistration

Value

template antsImage

Examples

pop = getANTsRData( "population" ) avg = antsAverageImages( pop ) # this is in ANTsR template = buildTemplate( avg, pop, 'SyN', iterations = 1)
#> Iteration: 1
#> Averaging images
#> Averaging warped composed transforms
#> Sharpening template image1.72272745768129