multiChannelImageToPatches: multiChannelImageToPatches

Description Usage Arguments Value Author(s) Examples

Description

Convert an input image to a set of patches of given radius. Return the local patch position for each patch. Optionally return the ground truth data associated with each patch, if available.

Usage

1
2
multiChannelImageToPatches(image, mask = NA, radius = 5, npatches = NA,
  groundTruth = 0, randomize = FALSE)

Arguments

image

a reference image defining the image space

mask

mask for the image

radius

a scalar defining the patch size

npatches

number of patches to regular sample from the image

groundTruth

single scalar or vector (size of mask) with groundTruth

randomize

randomize the location of the patch sampling

Value

list containing the image patches and separately the data frame holding the patch coordinate and the ground truth.

Author(s)

Avants BB

Examples

1
2
3
4
i1 = makeImage( c(25,25) )
i2 = makeImage( c(25,25) )
rimg = mergeChannels( list( i1, i2 ) )
ptch = multiChannelImageToPatches( rimg, i1 * 0 + 1, npatches = 3  )

stnava/ANTsRNpy documentation built on May 30, 2019, 7:20 p.m.