randomImageTransformParametersAugmentation: Generate transform parameters and transformed images

View source: R/randomImageTransformAugmentation.R

randomImageTransformParametersAugmentationR Documentation

Generate transform parameters and transformed images

Description

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.

Usage

randomImageTransformParametersAugmentation(
  imageDomain,
  predictorImageList,
  n = 8,
  typeOfTransform = "Affine",
  interpolator = "linear",
  spatialSmoothing = 3,
  numberOfCompositions = 4,
  deformationBasis,
  txParamMeans,
  txParamSDs,
  center = FALSE
)

Arguments

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 antsImagePhysicalSpaceConsistency then call resampleImageToTarget upon failure.

predictorImageList

list of lists of image predictors

n

number of simulations to run

typeOfTransform

one of the following options c("Translation","Rigid","ScaleShear","Affine", "DeformationBasis")

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

Value

list of transformed images and transform parameters

Author(s)

Avants BB

See Also

randomImageTransformParametersBatchGenerator

Examples


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 )


ANTsX/ANTsRNet documentation built on Nov. 21, 2024, 4:07 a.m.