deepPatchMatchMultiStart: deepPatchMatch with multiple starting points

View source: R/patchMatch.R

deepPatchMatchMultiStartR Documentation

deepPatchMatch with multiple starting points

Description

High-level function for deep patch matching that uses multiple starting points to reduce sensitivity to initialization.

Usage

deepPatchMatchMultiStart(
  movingImage,
  fixedImage,
  movingImageMask,
  fixedImageMask,
  movingPatchSize = 16,
  fixedPatchSize = 16,
  block_name = 20,
  vggmodel,
  subtractor = 127.5,
  patchVarEx = 0.95,
  meanCenter = FALSE,
  numberOfStarts = 1,
  sdAffine = 5,
  transformType = "Rigid",
  verbose = FALSE
)

Arguments

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

movingPatchSize

integer greater than or equal to 32.

fixedPatchSize

integer greater than or equal to 32.

block_name

name of vgg feature block, either block2_conv2 or integer. use the former for smaller patch sizes.

vggmodel

prebuilt feature model

subtractor

value to subtract when scaling image intensity; should be chosen to match training paradigm eg 127.5 for vgg and 0.5 for resnet like.

patchVarEx

patch variance explained for ripmmarc

meanCenter

boolean to mean center each patch for ripmmarc

numberOfStarts

the number of starting points to try

sdAffine

standard deviation parameter e.g. 0.15

transformType

one of Rigid, Affine and ScaleShear

verbose

boolean

Value

matched points and transformation

Author(s)

Avants BB

Examples

## Not run: 
library( tensorflow )
library( ANTsR )
nP1 = 250
nP2 = 500
psz = 12
img <- ri( 1 ) %>% iMath( "Normalize" )
img2 <- ri( 2 ) %>% iMath( "Normalize" )
mask = randomMask( getMask( img ), nP1 )
mask2 = randomMask( getMask( img2 ), nP2 )
match = deepPatchMatchMultiStart( img2, img, mask, mask2, numberOfStarts=3, verbose=FALSE )

## End(Not run)

stnava/patchMatchR documentation built on March 23, 2022, 6:47 a.m.