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

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

Avants BB

Examples

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