Description Usage Arguments Value Author(s) Examples
Register a pair of images either through the full or simplified interface. Uses file I/O to manage images / transformations.
1 | antsRegistration( fixed , moving , typeofTransform = c("Rigid","Affine","SyN"), outprefix="./antsRegOut")
|
fixed |
fixed image to which we register the moving image. |
movingImage |
moving image to be mapped to fixed space. |
typeofTransform |
Either a one stage rigid/affine mapping or a 2-stage affine+syn mapping. Mutual information metric by default. |
outprefix |
output will be named with this prefix. |
outputs a list containing warped images and transforms. 1 – Failure
Shrinidhi KL, Avants BB
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | ## Not run:
# will give the full form of help
antsRegistration( "-h")
# example 1 - simplified, uses antsImages for I/O
antsRegOut<-antsRegistration(fixed=img1,moving=img2,typeofTransform="Affine",outprefix="./test")
# example 2
fi<-antsImageRead( getANTsRData('r16') ,2)
mi<-antsImageRead( getANTsRData('r64') ,2)
mytx<-antsRegistration(fixed=fi , moving=mi , typeofTransform = c("SyN"), outprefix=paste(tempdir(),"/Z",sep=''))
mywarpedimage<-antsApplyTransforms(fixed=fi,moving=mi,transformlist=mytx$fwdtransforms)
par(mfrow=c(1,2))
plotANTsImage(fi)
plotANTsImage(mywarpedimage)
# example 3 - full access, only uses file-based I/O
antsRegistration( list( d=2,m="mi[r16slice.nii.gz,r64slice.nii.gz,1,20,Regular,0.05]", t="affine[1.0]", c="2100x1200x1200x0", s="3x2x1x0", f="4x3x2x1", u="1", o="[xtest,xtest.nii.gz,xtest_inv.nii.gz]" ) )
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.