View source: R/randomImageTransformAugmentation.R
randomImageTransformParametersAugmentation | R Documentation |
The function will apply rigid, affine or deformable maps to an input set of training images. The reference image domain defines the space in which this happens. The outcome here is the transform parameters themselves. This is intended for use with low-dimensional transformations.
randomImageTransformParametersAugmentation(
imageDomain,
predictorImageList,
n = 8,
typeOfTransform = "Affine",
interpolator = "linear",
spatialSmoothing = 3,
numberOfCompositions = 4,
deformationBasis,
txParamMeans,
txParamSDs,
center = FALSE
)
imageDomain |
defines the spatial domain for all images. NOTE: if the
input images do not match the spatial domain of the domain image, we
internally resample the target to the domain. This may have unexpected
consequences if you are not aware of this. This operation will test
|
predictorImageList |
list of lists of image predictors |
n |
number of simulations to run |
typeOfTransform |
one of the following options
|
interpolator |
nearestNeighbor or linear (string) for predictor images |
spatialSmoothing |
spatial smoothing for simulated deformation |
numberOfCompositions |
integer greater than or equal to one |
deformationBasis |
list containing deformationBasis set or a matrix if the basis is low-dimensional i.e. affine |
txParamMeans |
list containing deformationBasis set means |
txParamSDs |
list containing deformationBasis standard deviations |
center |
center the parameters before passing as ground truth output |
list of transformed images and transform parameters
Avants BB
randomImageTransformParametersBatchGenerator
library( ANTsR )
i1 = antsImageRead( getANTsRData( "r16" ) )
i2 = antsImageRead( getANTsRData( "r64" ) )
s1 = thresholdImage( i1, "Otsu", 3 )
s2 = thresholdImage( i2, "Otsu", 3 )
rand = randomImageTransformParametersAugmentation( i1,
list( i1, i2 ), txParamMeans=c(1,0,0,1), txParamSDs=diag(4)*0.01 )
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.