randomImageTransformAugmentation: Apply random transforms to a predictor / outcome training...

View source: R/randomImageTransformAugmentation.R

randomImageTransformAugmentationR Documentation

Apply random transforms to a predictor / outcome training image set

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.

Usage

randomImageTransformAugmentation(
  imageDomain,
  predictorImageList,
  outcomeImageList,
  n = 8,
  typeOfTransform = "Affine",
  interpolator = c("linear", "nearestNeighbor"),
  sdAffine = 1,
  nControlPoints = 100,
  spatialSmoothing = 3,
  composeToField = FALSE,
  numberOfCompositions = 4,
  deformationBasis,
  directoryName,
  imageDomainY,
  normalization = "none"
)

Arguments

imageDomain

defines default spatial domain for 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. The domain will, by default, be applied to outcome images if imageDomainY is not set.

predictorImageList

list of lists of image predictors

outcomeImageList

optional list of image outcomes

n

number of simulations to run

typeOfTransform

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

interpolator

nearestNeighbor or linear (string) for predictor and outcome images respectively

sdAffine

roughly controls deviation from identity matrix

nControlPoints

number of control points for simulated deformation

spatialSmoothing

spatial smoothing for simulated deformation

composeToField

defaults to FALSE, will return deformation fields otherwise i.e. maps any transformation to a single deformation field.

numberOfCompositions

integer greater than or equal to one

deformationBasis

list containing deformationBasis set

directoryName

where to write to disk (optional)

imageDomainY

optional spatial domain for outcome images.

normalization

optional intensity normalization either none, standardize or 01.

Value

list (if no directory set) or boolean for success, failure

Author(s)

Avants BB

See Also

randomImageTransformBatchGenerator

Examples


library( ANTsR )
i1 = antsImageRead( getANTsRData( "r16" ) )
i2 = antsImageRead( getANTsRData( "r64" ) )
s1 = thresholdImage( i1, "Otsu", 3 )
s2 = thresholdImage( i2, "Otsu", 3 )
rand = randomImageTransformAugmentation( i1,
  list( list(i1), list(i2) ),  list( s1, s2 ) )


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