Description Usage Arguments Value Author(s) Examples
Smooths data along the boundary into the missing region.
1 | basicInPaint(img, paintMask, speedimage = NULL, its = 0, gparam = 0.05)
|
img |
antsImage to be approximated / painted |
paintMask |
painting mask with values 1 or values 1 and 2 - if there is a 2 then it will learn from label 1 to paint label 2. should cover the brain. |
speedimage |
- larger means faster/better |
its |
- iterations of graddescent |
gparam |
- graddescent param e.g. 0.05 |
inpainted image
Brian B. Avants
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | set.seed(123)
fi<-abs(replicate(100, rnorm(100)))
fi[1:10,]<-fi[,1:10]<-fi[91:100,]<-fi[,91:100]<-0
mask<-fi
mask[ mask > 0 ]<-1
mask2<-mask
mask2[11:20,11:20]<-2
mask<-as.antsImage( mask2 )
fi<-as.antsImage( fi )
fi<-smoothImage( fi, 3 )
painted<-basicInPaint( fi, mask )
## Not run:
# lmask<-antsImageRead( "brainmask.nii.gz", 2 )
# limg<-antsImageRead( "r16slice_lesion.nii.gz", 2 )
# mm<-basicInPaint(limg,lmask)
# plot(mm)
# mm2<-basicInPaint(limg,lmask,its=10,gparam=0.05)
# plot(mm2)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.