View source: R/randomlyTransformImageData.R
randomlyTransformImageData | R Documentation |
Apply rigid, affine and/or deformable maps to an input set of training images. The reference image domain defines the space in which this happens.
randomlyTransformImageData(
referenceImage,
inputImageList,
segmentationImageList = NULL,
numberOfSimulations = 10,
transformType = "affine",
sdAffine = 0.02,
deformationTransformType = c("bspline", "exponential"),
numberOfRandomPoints = 1000,
sdNoise = 10,
numberOfFittingLevels = 4,
meshSize = 1,
sdSmoothing = 4,
inputImageInterpolator = "linear",
segmentationImageInterpolator = "nearestNeighbor"
)
referenceImage |
defines the spatial domain for all output images. If
the input images do not match the spatial domain of the reference image, we
internally resample the target to the reference image. This could have
unexpected consequences. Resampling to the reference domain is performed by
testing using |
inputImageList |
list of lists of input images to warp. The internal list sets contains one or more images (per subject) which are assumed to be mutually aligned. The outer list contains multiple subject lists which are randomly sampled to produce output image list. |
segmentationImageList |
list of segmentation images corresponding to the input image list (optional). |
numberOfSimulations |
number of output images. Default = 10. |
transformType |
one of the following options
|
sdAffine |
parameter dictating deviation amount from identity for random linear transformations. Default = 0.02. |
deformationTransformType |
one of the following options
|
numberOfRandomPoints |
number of displacement points for the deformation field. Default = 1000. |
sdNoise |
standard deviation of the displacement field noise (in mm). Default = 10.0. |
numberOfFittingLevels |
(bspline deformation only) number of fitting levels. Default = 4. |
meshSize |
(bspline deformation only) scalar or n-D vector determining fitting resolution. Default = 1. |
sdSmoothing |
(exponential deformation only) standard deviation of the Gaussian smoothing in mm. Default = 4.0. |
inputImageInterpolator |
one of the following options
|
segmentationImageInterpolator |
one of the following options
|
list (if no directory set) or boolean for success, failure
Avants BB, Tustison NJ
library( ANTsR )
image1 <- antsImageRead( getANTsRData( "r16" ) )
image2 <- antsImageRead( getANTsRData( "r64" ) )
segmentation1 <- thresholdImage( image1, "Otsu", 3 )
segmentation2 <- thresholdImage( image2, "Otsu", 3 )
data <- randomlyTransformImageData( image1,
list( list( image1 ), list( image2 ) ),
list( segmentation1, segmentation2 ) )
rm(segmentation1); gc()
rm(segmentation2); gc()
rm(image1); gc()
rm(image2); gc()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.