deepLocalPatchMatch.Rd
High-level function for deep patch matching constrained to be local.
deepLocalPatchMatch( movingImage, fixedImage, movingImageMask, fixedImageMask, patchSize = 32, knn = 1, localSearchRadius = 5, nSamples, block_name = "block2_conv2", kPackage = "RcppHNSW", verbose = FALSE )
movingImage | input image from which we extract patches that are transformed to the space of the fixed image |
---|---|
fixedImage | input image that provides the fixed reference domain. |
movingImageMask | defines the object of interest in the movingImage |
fixedImageMask | defines the object of interest in the fixedImage |
patchSize | integer greater than or equal to 32. |
knn | k-nearest neighbors ( should be >= 1 ) |
localSearchRadius | radius value passed to |
nSamples | number of local samples (optional), can speed things up at the cost of some accuracy |
block_name | name of vgg feature block, either block2_conv2 or integer. use the former for smaller patch sizes. |
kPackage | name of package to use for knn |
verbose | boolean |
correspondence data
Avants BB
library( keras ) library( ANTsR ) nP1 = 5 nP2 = 20 psz = 32 img <- ri( 1 ) %>% iMath( "Normalize" ) img2 <- ri( 2 ) %>% iMath( "Normalize" ) mask = randomMask( getMask( img ), nP1 ) mask2 = randomMask( getMask( img2 ), nP2 ) match = deepLocalPatchMatch( img2, img, mask, mask2 )#> 1 ...2 ...3 ...4 ...5 ...6 ...7 ...8 ...9 ...10 ...11 ...12 ...13 ...14 ...15 ...16 ...17 ...18 ...19 ...20 ...