Apply B-spline 1-D maps to an input image for intensity warping.

histogramWarpImageIntensities(
  image,
  breakPoints = c(0.25, 0.5, 0.75),
  displacements = NULL,
  clampEndPoints = c(FALSE, FALSE),
  sdDisplacements = 0.05,
  transformDomainSize = 20
)

Arguments

image

input image.

breakPoints

parametric points at which the intensity transform displacements are specified between [0, 1]. Alternatively, a single number can be given and the sequence is linearly spaced in [0, 1].

displacements

displacements to define intensity warping. Length must be equal to the breakPoints. Alternatively, if NULL random displacements are chosen (random normal: mean = 0, sd = sdDisplacements).

clampEndPoints

specify non-zero intensity change at the ends of the histogram.

sdDisplacements

characterize the randomness of the intensity displacement.

transformDomainSize

Defines the sampling resolution of the B-spline warping.

Value

warped intensity image

Author

Tustison NJ

Examples


library( ANTsR )
image <- antsImageRead( getANTsRData( "r16" ) )
transformedImage <- histogramWarpImageIntensities( image, transformDomainSize = 10 )
rm(image); gc()
#>           used  (Mb) gc trigger  (Mb) limit (Mb) max used  (Mb)
#> Ncells 3494150 186.7    6338411 338.6         NA  6338411 338.6
#> Vcells 6155195  47.0   16439144 125.5     102400 16439144 125.5
rm(transformedImage); gc()
#>           used  (Mb) gc trigger  (Mb) limit (Mb) max used  (Mb)
#> Ncells 3493983 186.6    6338411 338.6         NA  6338411 338.6
#> Vcells 6154953  47.0   16439144 125.5     102400 16439144 125.5