buildTemplate.Rd
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,
blendingWeight = 0.5,
segList,
weights,
verbose = TRUE,
...
)
fixed image to which we register the population.
moving image list from which template will be built.
A linear or non-linear registration type. Mutual
information metric by default. See antsRegistration.
should be greater than 1 less than 10.
speed of template shape update step, less than 1.
parameter between zero and one, default 0.5; higher values lead to sharper intensity but may also cause artifacts.
segmentations for each target image, this will trigger a joint label fusion call for each iteration and use masks during registration.
numeric vector, length of number of images providing weights
print diagnostic messages,
passed to antsRegistration
Additional options to pass to antsRegistration
template antsImage
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
#> ================================================================================
#> Blending template image2.60802504142812