View source: R/extractImagePatches.R
extractImagePatchCoordinates | R Documentation |
Extract 2-D or 3-D image patch coordinates.
extractImagePatchCoordinates(
image,
patchSize,
maxNumberOfPatches = "all",
strideLength = 1,
maskImage = NULL,
physicalCoordinates = TRUE,
cornerCoordinates = TRUE,
randomSeed,
randomize = TRUE
)
image |
Input ANTs image with one or more components. |
patchSize |
Width, height, and depth (if 3-D) of patches. |
maxNumberOfPatches |
Maximum number of patches returned. If
"all" is specified, then all patches in sequence (defined by the
|
strideLength |
Defines the sequential patch overlap for
|
maskImage |
optional image specifying the sampling region for
the patches when |
physicalCoordinates |
boolean to determine whether indices or spatial coordinates are returned. |
cornerCoordinates |
boolean to determine whether indices or spatial coordinates of the corner or the center are returned. |
randomSeed |
integer seed that allows reproducible patch extraction across runs. |
randomize |
boolean controlling whether we randomize indices when masking. |
a matrix of image patch spatial or index coordinates.
Tustison NJ, Avants B
library( ANTsR )
image <- antsImageRead( getANTsRData( "r16" ) )
maskImage <- getMask( image, 1, 1000 )
patchCoordsP <- extractImagePatchCoordinates( image, c( 32, 32 ), 10, c( 32, 32 ),
maskImage, randomSeed = 0, physicalCoordinates = TRUE )
patchCoordsI <- extractImagePatchCoordinates( image, c( 32, 32 ), 10, c( 32, 32 ),
maskImage, randomSeed = 0, physicalCoordinates = FALSE )
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.