convertPatchCoordsToSpatialPoints: convert coordinates of deep feature patches to image-based...

View source: R/patchMatch.R

convertPatchCoordsToSpatialPointsR Documentation

convert coordinates of deep feature patches to image-based physical coordinates

Description

High-level function for handling the converion between voxel and corner-based indices of patches to center and physical-based landmark coordinates.

Usage

convertPatchCoordsToSpatialPoints(patchCoords, img, patchSize = 32)

Arguments

patchCoords

input patch coordinates (usually from deepFeatures)

img

reference image defining spatial domain

patchSize

vector or scalar defining patch dimensions

Value

spatial patch coordinates

Author(s)

Avants BB

Examples


library(ANTsR)
img <- ri( 1 ) %>% iMath( "Normalize" )
mask = randomMask( getMask( img ), 20 )
features = deepFeatures( img, mask, patchSize = 32 )
coords = convertPatchCoordsToSpatialPoints( features$patchCoords, img )


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